A reusable GitHub Actions workflow for continuous cross-architecture testing of
strace on rarely-tested CPU architectures. It builds a
cross toolchain and minimal root filesystem with
Buildroot (version pinned in
ci/buildroot-version), cross-compiles strace and its
test suite, boots the target under QEMU system emulation, and runs make check
in the guest.
# .github/workflows/cross.yml
name: cross
on: [push, pull_request]
jobs:
cross:
uses: gabifalk/strace-github-cross-testing/.github/workflows/cross.yml@v1This tests the pushed commit. To restrict arches or shards:
with:
arches: 'm68k s390x' # subset; omit for all built-in arches
shards: 10 # default 20| Input | Type | Default | Meaning |
|---|---|---|---|
arches |
string | '' |
Space-separated. Empty -> all arches in ci/arches. |
shards |
number | 20 |
Test shards per arch. |
strace-repository |
string | '' |
Empty -> the calling repo (github.repository). |
strace-ref |
string | '' |
Empty -> the calling commit (github.sha). |
- Add the arch name to
ci/arches. - Add
ci/buildroot-config-<arch>(with a# CONFIG_VERSION:marker). - Add the per-arch QEMU/guest settings to the
case "$ARCH"block inci/lib.sh.
cross.yml (the engine, workflow_call only) resolves the arch list and strace
source, then fans out a matrix calling arch.yml per arch. arch.yml builds
the toolchain + strace (caching both), then runs the test suite sharded across
parallel QEMU jobs.
Two patches are applied to the cross toolchain during the Buildroot build (via
BR2_GLOBAL_PATCH_DIR in the arch configs that need them), fixing
build-environment bugs that would otherwise cause false strace failures:
ci/patches/gcc/-- m68kfold-mem-offsetsmiscompile breakingsendfile/splice.ci/patches/elfutils/-- mips64el MIPS unwinding bug breakingstrace -k/-kk.
The ci/ scripts are plain POSIX shell:
export STRACE_SRC=$PWD/strace BUILDROOT_SRC=$PWD/buildroot OUTPUT_BASE=$PWD/output
./ci/build-buildroot s390x # toolchain, kernel, rootfs (slow)
STRACE_PATCHES=ci/strace-patches ./ci/build-strace s390x # cross-compile (patches optional)
./ci/run-qemu s390x # boot under QEMU, run make checkGPL-2.0-or-later. See LICENSE.