Files
openipc-builder/.gitea/workflows/build-hilink.yml
T

67 lines
2.1 KiB
YAML

name: Build HiLink URLLC firmware
on:
workflow_dispatch:
jobs:
build:
runs-on: openipc-builder
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: Verify provisioned Buildroot toolchain
shell: bash
run: |
set -eu
id
missing=0
for tool in \
bash bc bison ccache cpio curl file flex gawk gcc git gzip make \
patch perl python3 rsync sed tar tree unzip wget xz; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "::error::Missing runner dependency: $tool"
missing=1
fi
done
test "$missing" = 0
- 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"
if ! bash builder.sh "$DEVICE"; then
echo '--- largest files retained in the failed rootfs ---'
find openipc/output/target -type f -printf '%s\t%p\n' | \
sort -nr | sed -n '1,100p' || true
echo '--- rootfs target usage ---'
du -sh openipc/output/target 2>/dev/null || true
exit 1
fi
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/*