From 731e439189db38951d1c3d0dda655976e4c18dcb Mon Sep 17 00:00:00 2001 From: Sludge Date: Mon, 8 Dec 2025 14:36:25 +0100 Subject: [PATCH] ci: add a big endian job --- .github/workflows/ci.yaml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ab6f827..1a1d0e8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,11 +7,15 @@ on: env: RUSTUP_MAX_RETRIES: 10 - MSRV: 1.85.0 # (keep this in sync with `Cargo.toml`'s `rust-version`) # Tests have to run as root on GHA since the VM image is very restrictive about # who can open "fun" device files like `/dev/uinput`. CICD_SUDO: 1 + CROSS_VERSION: v0.2.5 + + MSRV: 1.85.0 # (keep this in sync with `Cargo.toml`'s `rust-version`) + + jobs: msrv: name: MSRV @@ -85,6 +89,26 @@ jobs: rustc --version cargo test + big-endian: + runs-on: ubuntu-latest + name: Test on Big Endian emulator + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install cross + run: | + mkdir -p "$RUNNER_TEMP/cross" + echo "$RUNNER_TEMP/cross" >> $GITHUB_PATH + cd "$RUNNER_TEMP/cross" + curl -LO https://github.com/cross-rs/cross/releases/download/$CROSS_VERSION/cross-x86_64-unknown-linux-musl.tar.gz + tar xf cross-x86_64-unknown-linux-musl.tar.gz + + - name: Run unit tests on PowerPC + run: cross test --lib --target powerpc64-unknown-linux-gnu + # We only run unit tests, not the integration tests, because QEMU doesn't translate the + # evdev/uinput ioctls between architectures. + ci: name: CI strategy: @@ -124,7 +148,7 @@ jobs: cd: name: CD - needs: [msrv, build, ci, freebsd] + needs: [msrv, build, ci, freebsd, big-endian] runs-on: ubuntu-latest permissions: