From 0cb72e8a606106ce3fc5b4349b8a8370eefde356 Mon Sep 17 00:00:00 2001 From: osobh Date: Mon, 21 Sep 2026 20:31:05 -0700 Subject: [PATCH] ci: test the aarch64 kernels on an arm64 runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The NEON kernels in clawhdf5-accel — `dot_i8` including its SDOT path, and the f32 NEON kernels that predate it — are cfg'd out on x86, so the existing job has never compiled, linted or tested a line of them. They were verified once, by hand, on a Raspberry Pi 5. `test-arm64` runs on `linux_arm64`, which two runners serve in different ways: vision-01 executes steps on the host with Rust preinstalled, and vision-02 executes them in docker.gitea.com/runner-images. The job is written to work in both: no `container:`, no JavaScript actions (those are fetched from GitHub, which not every runner reliably reaches), and an explicit `+stable` toolchain so a host's default — vision-01's is a January nightly — is neither relied on nor changed. Fetches retry, since one runner's outbound network was seen failing intermittently. It lints the accel crate and tests accel, ann and format. It reports rather than requires the dot-product extension: on a core without it the plain-NEON kernel is the one that runs, and the tests cover whichever is present. Co-Authored-By: Claude Opus 5 (1M context) --- .gitea/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2e09af0..7cb4547 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -44,3 +44,40 @@ jobs: CLAWHDF5_PYTHON: /opt/interop/bin/python CLAWHDF5_REQUIRE_INTEROP: "1" run: bash scripts/ci-test.sh + + test-arm64: + # The aarch64 kernels in clawhdf5-accel — NEON `dot_i8`, including the + # SDOT path, and the f32 NEON kernels — are cfg'd out on x86, so the job + # above never compiles, lints or tests them. + # + # `linux_arm64` is served by two runners that execute differently: + # vision-01 runs steps on the host (Rust already installed) and vision-02 + # runs them in docker.gitea.com/runner-images. So the steps work in both: + # no `container:`, no JavaScript actions (they are fetched from GitHub, + # which not every runner reliably reaches), and an explicit `+stable` + # toolchain rather than whatever a host happens to default to. + runs-on: linux_arm64 + env: + CARGO_NET_RETRY: "10" + CARGO_TERM_COLOR: always + steps: + - name: Check out + run: | + git init -q . + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + for i in 1 2 3; do git fetch -q --depth 1 origin "${GITHUB_SHA}" && break; sleep 5; done + git checkout -q FETCH_HEAD + - name: Rust stable + run: | + export PATH="$HOME/.cargo/bin:$PATH" + command -v rustup >/dev/null || curl -sSf --retry 5 https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain none + rustup toolchain install stable --profile minimal --component clippy + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + - name: Confirm aarch64 + run: | + test "$(uname -m)" = aarch64 + if grep -q asimddp /proc/cpuinfo; then echo "dot-product extension present: SDOT kernel runs"; else echo "no dot-product extension: plain NEON kernel runs"; fi + - name: Clippy (aarch64 kernels) + run: cargo +stable clippy -p clawhdf5-accel --all-targets -- -D warnings + - name: Test + run: cargo +stable test -p clawhdf5-accel -p clawhdf5-ann -p clawhdf5-format