Skip to content

ci: consolidate release workflows into a matrix; add arm64 #29

ci: consolidate release workflows into a matrix; add arm64

ci: consolidate release workflows into a matrix; add arm64 #29

Workflow file for this run

name: PR Build Check
on:
pull_request:
branches: [master]
jobs:
build:
name: Build ${{ matrix.target }} (musl static)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: arm32
toolchain_url: https://github.com/OpenIPC/firmware/releases/download/toolchain/toolchain.hisilicon-hi3516cv100.tgz
toolchain_dir: arm-openipc-linux-musleabi_sdk-buildroot
cc: arm-openipc-linux-musleabi-gcc
- target: mips32
toolchain_url: https://github.com/OpenIPC/firmware/releases/download/toolchain/toolchain.ingenic-t31.tgz
toolchain_dir: mipsel-openipc-linux-musl_sdk-buildroot
cc: mipsel-openipc-linux-musl-gcc
- target: arm64
# musl.cc occasionally truncates large downloads; the
# more.musl.cc mirror serves the same 100 MB tarball
# from a different CDN edge.
toolchain_url: https://musl.cc/aarch64-linux-musl-cross.tgz
toolchain_url_fallback: https://more.musl.cc/x86_64-linux-musl/aarch64-linux-musl-cross.tgz
toolchain_dir: aarch64-linux-musl-cross
cc: aarch64-linux-musl-gcc
steps:
- uses: actions/checkout@v4
- name: Fetch toolchain
run: |
# Download to file (with retries) before extracting — piping
# wget -> tar makes transient stream truncations look like
# corrupt archives; the wget retry only helps with discrete
# files.
for url in ${{ matrix.toolchain_url }} ${{ matrix.toolchain_url_fallback }}; do
[ -z "$url" ] && continue
echo "::group::Downloading $url"
if wget --tries=3 --timeout=60 -O /tmp/toolchain.tgz "$url"; then
echo "::endgroup::"
break
fi
echo "::endgroup::"
rm -f /tmp/toolchain.tgz
done
test -s /tmp/toolchain.tgz
tar xfz /tmp/toolchain.tgz -C /opt
rm /tmp/toolchain.tgz
- name: Build
run: |
export PATH=/opt/${{ matrix.toolchain_dir }}/bin:$PATH
cmake -H. -Bbuild -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_BUILD_TYPE=Release
cmake --build build
test-extraction-pipeline:
name: Test sensor extraction pipeline
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run end-to-end pipeline smoke test
run: tools/test_pipeline.sh