build #1668
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 22 * * *' | |
workflow_dispatch: | |
env: | |
TAG_NAME: latest | |
jobs: | |
buildroot: | |
name: Firmware | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Sigmastar [I6] | |
- {"platform": "ssc325", "release": "lite"} | |
- {"platform": "ssc325de", "release": "lite"} | |
# Sigmastar [I6B] | |
- {"platform": "ssc333", "release": "lite"} | |
- {"platform": "ssc333", "release": "ultimate"} | |
- {"platform": "ssc335", "release": "lite"} | |
- {"platform": "ssc335", "release": "ultimate"} | |
- {"platform": "ssc335de", "release": "lite"} | |
- {"platform": "ssc335de", "release": "ultimate"} | |
- {"platform": "ssc337", "release": "lite"} | |
- {"platform": "ssc337", "release": "ultimate"} | |
- {"platform": "ssc337de", "release": "lite"} | |
- {"platform": "ssc337de", "release": "ultimate"} | |
# Sigmastar [I6C] | |
- {"platform": "ssc377", "release": "lite"} | |
- {"platform": "ssc377d", "release": "lite"} | |
- {"platform": "ssc377de", "release": "lite"} | |
- {"platform": "ssc378de", "release": "lite"} | |
# Sigmastar [I6E] | |
- {"platform": "ssc30kd", "release": "lite"} | |
- {"platform": "ssc30kd", "release": "ultimate"} | |
- {"platform": "ssc30kq", "release": "fpv"} | |
- {"platform": "ssc30kq", "release": "rubyfpv"} | |
- {"platform": "ssc30kq", "release": "lite"} | |
- {"platform": "ssc30kq", "release": "ultimate"} | |
- {"platform": "ssc338q", "release": "fpv"} | |
- {"platform": "ssc338q", "release": "rubyfpv"} | |
- {"platform": "ssc338q", "release": "lite"} | |
- {"platform": "ssc338q", "release": "ultimate"} | |
# Ingenic [T21] | |
- {"platform": "t10", "release": "lite"} | |
- {"platform": "t20", "release": "lite"} | |
- {"platform": "t20", "release": "ultimate"} | |
- {"platform": "t21", "release": "lite"} | |
- {"platform": "t21", "release": "ultimate"} | |
- {"platform": "t30", "release": "lite"} | |
# Ingenic [T31] | |
- {"platform": "t31", "release": "lite"} | |
- {"platform": "t31", "release": "ultimate"} | |
# Ingenic [T40] | |
- {"platform": "t40", "release": "lite"} | |
- {"platform": "t40", "release": "ultimate"} | |
# Hisilicon [HI3516AV100] | |
- {"platform": "hi3516av100", "release": "lite"} | |
- {"platform": "hi3516av100", "release": "ultimate"} | |
- {"platform": "hi3516dv100", "release": "lite"} | |
- {"platform": "hi3516dv100", "release": "ultimate"} | |
# Hisilicon [HI3516CV100] | |
- {"platform": "hi3516cv100", "release": "lite"} | |
- {"platform": "hi3518cv100", "release": "lite"} | |
- {"platform": "hi3518ev100", "release": "lite"} | |
# Hisilicon [HI3516CV200] | |
- {"platform": "hi3516cv200", "release": "lite"} | |
- {"platform": "hi3518ev200", "release": "mini"} | |
- {"platform": "hi3518ev200", "release": "lite"} | |
- {"platform": "hi3518ev200", "release": "ultimate"} | |
# Hisilicon [HI3516CV300] | |
- {"platform": "hi3516cv300", "release": "mini"} | |
- {"platform": "hi3516cv300", "release": "lite"} | |
- {"platform": "hi3516cv300", "release": "ultimate"} | |
- {"platform": "hi3516ev100", "release": "lite"} | |
# Hisilicon [HI3516CV500] | |
- {"platform": "hi3516av300", "release": "lite"} | |
- {"platform": "hi3516cv500", "release": "lite"} | |
- {"platform": "hi3516dv300", "release": "lite"} | |
# Hisilicon [HI3516EV200] | |
- {"platform": "hi3516dv200", "release": "lite"} | |
- {"platform": "hi3516ev200", "release": "lte"} | |
- {"platform": "hi3516ev200", "release": "fpv"} | |
- {"platform": "hi3516ev200", "release": "lite"} | |
- {"platform": "hi3516ev200", "release": "ultimate"} | |
- {"platform": "hi3516ev300", "release": "lte"} | |
- {"platform": "hi3516ev300", "release": "fpv"} | |
- {"platform": "hi3516ev300", "release": "lite"} | |
- {"platform": "hi3516ev300", "release": "ultimate"} | |
- {"platform": "hi3518ev300", "release": "lite"} | |
- {"platform": "hi3518ev300", "release": "ultimate"} | |
# Hisilicon [HI3519V101] | |
- {"platform": "hi3516av200", "release": "lite"} | |
- {"platform": "hi3516av200", "release": "ultimate"} | |
- {"platform": "hi3519v101", "release": "lite"} | |
# Hisilicon [HI3536CV100] | |
- {"platform": "hi3536cv100", "release": "lite"} | |
# Hisilicon [HI3536DV100] | |
- {"platform": "hi3536dv100", "release": "fpv"} | |
- {"platform": "hi3536dv100", "release": "lite"} | |
# Goke [GK710X] | |
- {"platform": "gk7102", "release": "lite"} | |
- {"platform": "gk7102s", "release": "lite"} | |
# Goke [GK7205V200] | |
- {"platform": "gk7202v300", "release": "lite"} | |
- {"platform": "gk7205v200", "release": "lte"} | |
- {"platform": "gk7205v200", "release": "fpv"} | |
- {"platform": "gk7205v200", "release": "rubyfpv"} | |
- {"platform": "gk7205v200", "release": "venc"} | |
- {"platform": "gk7205v200", "release": "lite"} | |
- {"platform": "gk7205v200", "release": "ultimate"} | |
- {"platform": "gk7205v210", "release": "fpv"} | |
- {"platform": "gk7205v210", "release": "rubyfpv"} | |
- {"platform": "gk7205v210", "release": "venc"} | |
- {"platform": "gk7205v210", "release": "lite"} | |
- {"platform": "gk7205v300", "release": "lte"} | |
- {"platform": "gk7205v300", "release": "fpv"} | |
- {"platform": "gk7205v300", "release": "rubyfpv"} | |
- {"platform": "gk7205v300", "release": "venc"} | |
- {"platform": "gk7205v300", "release": "lite"} | |
- {"platform": "gk7205v300", "release": "ultimate"} | |
- {"platform": "gk7605v100", "release": "lite"} | |
# Allwinner | |
- {"platform": "v851s", "release": "lite"} | |
# Fullhan | |
- {"platform": "fh8852v100", "release": "lite"} | |
- {"platform": "fh8852v200", "release": "lite"} | |
# Grainmedia | |
- {"platform": "gm8135", "release": "lite"} | |
- {"platform": "gm8136", "release": "lite"} | |
# Novatek | |
- {"platform": "nt98562", "release": "lite"} | |
- {"platform": "nt98566", "release": "lite"} | |
# Rockchip | |
- {"platform": "rv1109", "release": "lite"} | |
- {"platform": "rv1126", "release": "lite"} | |
# Xiongmai | |
- {"platform": "xm510", "release": "lite"} | |
- {"platform": "xm530", "release": "lite"} | |
- {"platform": "xm550", "release": "lite"} | |
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}} | |
files: | | |
${{env.NORFW}} | |
${{env.NANDFW}} | |
- name: Send binary | |
if: github.event_name != 'pull_request' && env.NORFW | |
run: | | |
TG_MSG="Commit: ${GIT_HASH}\nBranch: ${GIT_BRANCH}\nTag: ${TAG_NAME}\nTime: ${TIME}\n\n" | |
TG_ICON="\xE2\x9C\x85 GitHub Actions" | |
TG_HEADER=$(echo -e ${TG_MSG}${TG_ICON}) | |
TG_TOKEN=${{secrets.TELEGRAM_TOKEN_BOT_OPENIPC}} | |
TG_CHANNEL=${{secrets.TELEGRAM_CHANNEL_OPENIPC_DEV}} | |
HTTP=$(curl -s -o /dev/null -w %{http_code} https://api.telegram.org/bot${TG_TOKEN}/sendDocument -F chat_id=${TG_CHANNEL} -F caption="${TG_HEADER}" -F document=@${NORFW}) | |
echo Telegram response: ${HTTP} |