diff --git a/.gitea/workflows/build-hilink.yml b/.gitea/workflows/build-hilink.yml new file mode 100644 index 0000000..b17071c --- /dev/null +++ b/.gitea/workflows/build-hilink.yml @@ -0,0 +1,53 @@ +name: Build HiLink URLLC firmware + +on: + workflow_dispatch: + +jobs: + build: + runs-on: debian-docker + timeout-minutes: 360 + env: + DEVICE: ssc338q_fpv_openipc-urllc-aio + BR2_DL_DIR: /tmp/builder-dl + + steps: + - name: Checkout builder branch + uses: actions/checkout@v4 + + - name: Install Buildroot host dependencies + shell: bash + run: | + set -eux + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + bash bc bison build-essential ccache cpio curl file flex gawk git \ + gzip libncurses-dev make patch perl python3 rsync sed tar tree \ + unzip wget xz-utils + + - name: Build exactly the HiLink URLLC profile + shell: bash + run: | + set -euo pipefail + export GIT_HASH="$(git rev-parse --short HEAD)" + export GIT_BRANCH="$(git branch --show-current)" + mkdir -p "$BR2_DL_DIR" /tmp/ccache + ln -s /tmp/ccache "$HOME/.ccache" + + bash builder.sh "$DEVICE" + + mkdir -p dist + firmware=$(find openipc/output/images -type f -name 'openipc*nor*.tgz' -print -quit) + test -n "$firmware" + cp "$firmware" "dist/${DEVICE}-nor.tgz" + sha256sum "dist/${DEVICE}-nor.tgz" > "dist/${DEVICE}-nor.tgz.sha256" + + find dist -maxdepth 1 -type f -printf '%f %s bytes\n' + cat "dist/${DEVICE}-nor.tgz.sha256" + + - name: Upload firmware artifact + uses: actions/upload-artifact@v4 + with: + name: hilink-urllc-${{ github.sha }} + retention-days: 30 + path: dist/*