build #243
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: '30 23 * * *' | |
workflow_dispatch: | |
env: | |
TAG_NAME: latest | |
jobs: | |
buildroot: | |
name: Firmware | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Sigmastar [I6E] | |
- {"platform": "ssc30kq", "release": "fpv_8733bu"} | |
- {"platform": "ssc30kq", "release": "fpv_8188fu"} | |
- {"platform": "ssc30kq", "release": "rubyfpv"} | |
- {"platform": "ssc30kq", "release": "fpv_8812eu_8192eu"} | |
- {"platform": "ssc30kq", "release": "fpv_8812cu"} | |
- {"platform": "ssc338q", "release": "fpv_8733bu"} | |
- {"platform": "ssc338q", "release": "fpv_8188fu"} | |
- {"platform": "ssc338q", "release": "fpv_8812eu_8192eu"} | |
- {"platform": "ssc338q", "release": "fpv_8812cu"} | |
# Hisilicon [HI3516EV200] | |
- {"platform": "hi3516ev200", "release": "fpv_8733bu"} | |
- {"platform": "hi3516ev200", "release": "fpv_8188fu"} | |
- {"platform": "hi3516ev200", "release": "fpv_8812au_8812eu"} | |
- {"platform": "hi3516ev300", "release": "fpv_8733bu"} | |
- {"platform": "hi3516ev300", "release": "fpv_8812au_8812eu"} | |
# Hisilicon [HI3536DV100] (NVR) | |
- {"platform": "hi3536dv100", "release": "fpv_8812au_8812eu"} | |
- {"platform": "hi3536dv100", "release": "fpv_8812cu"} | |
# Goke [GK7205V200] | |
- {"platform": "gk7205v200", "release": "venc_8733bu"} | |
- {"platform": "gk7205v200", "release": "venc_8812au_8812eu"} | |
- {"platform": "gk7205v300", "release": "venc_8733bu"} | |
- {"platform": "gk7205v300", "release": "venc_8812au_8812eu"} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Prepare firmware | |
run: | | |
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf | |
echo CACHE_DATE=$(date +%m) >> ${GITHUB_ENV} | |
make BOARD=${{matrix.platform}}_${{matrix.release}} br-source | |
- name: Setup ccache | |
if: github.event_name != 'pull_request' | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/ccache | |
key: ${{matrix.platform}}_${{matrix.release}}-${{env.CACHE_DATE}} | |
- name: Restore ccache | |
if: github.event_name == 'pull_request' | |
uses: actions/cache/restore@v4 | |
with: | |
path: /tmp/ccache | |
key: ${{matrix.platform}}_${{matrix.release}}-${{env.CACHE_DATE}} | |
- name: Build firmware | |
run: | | |
export GIT_HASH=$(git rev-parse --short ${GITHUB_SHA}) | |
export GIT_BRANCH=${GITHUB_REF_NAME} | |
echo GIT_HASH=${GIT_HASH} >> ${GITHUB_ENV} | |
echo GIT_BRANCH=${GIT_BRANCH} >> ${GITHUB_ENV} | |
mkdir -p /tmp/ccache | |
ln -s /tmp/ccache ${HOME}/.ccache | |
make BOARD=${{matrix.platform}}_${{matrix.release}} | |
TIME=$(date -d @${SECONDS} +%M:%S) | |
echo TIME=${TIME} >> ${GITHUB_ENV} | |
NORFW=${GITHUB_WORKSPACE}/output/images/openipc.${{matrix.platform}}-nor-${{matrix.release}}.tgz | |
if [ -e ${NORFW} ]; then | |
echo NORFW=${NORFW} >> ${GITHUB_ENV} | |
fi | |
NANDFW=${GITHUB_WORKSPACE}/output/images/openipc.${{matrix.platform}}-nand-${{matrix.release}}.tgz | |
if [ -e ${NANDFW} ]; then | |
echo NANDFW=${NANDFW} >> ${GITHUB_ENV} | |
fi | |
- name: Upload firmware | |
if: github.event_name != 'pull_request' | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{env.TAG_NAME}} | |
token: ${{ secrets.RELEASE_TOKEN }} | |
files: | | |
${{env.NORFW}} | |
${{env.NANDFW}} | |