Skip to content

Commit 731e439

Browse files
committed
ci: add a big endian job
1 parent 063b98e commit 731e439

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ on:
77

88
env:
99
RUSTUP_MAX_RETRIES: 10
10-
MSRV: 1.85.0 # (keep this in sync with `Cargo.toml`'s `rust-version`)
1110
# Tests have to run as root on GHA since the VM image is very restrictive about
1211
# who can open "fun" device files like `/dev/uinput`.
1312
CICD_SUDO: 1
1413

14+
CROSS_VERSION: v0.2.5
15+
16+
MSRV: 1.85.0 # (keep this in sync with `Cargo.toml`'s `rust-version`)
17+
18+
1519
jobs:
1620
msrv:
1721
name: MSRV
@@ -85,6 +89,26 @@ jobs:
8589
rustc --version
8690
cargo test
8791
92+
big-endian:
93+
runs-on: ubuntu-latest
94+
name: Test on Big Endian emulator
95+
steps:
96+
- name: Checkout repository
97+
uses: actions/checkout@v4
98+
99+
- name: Install cross
100+
run: |
101+
mkdir -p "$RUNNER_TEMP/cross"
102+
echo "$RUNNER_TEMP/cross" >> $GITHUB_PATH
103+
cd "$RUNNER_TEMP/cross"
104+
curl -LO https://github.com/cross-rs/cross/releases/download/$CROSS_VERSION/cross-x86_64-unknown-linux-musl.tar.gz
105+
tar xf cross-x86_64-unknown-linux-musl.tar.gz
106+
107+
- name: Run unit tests on PowerPC
108+
run: cross test --lib --target powerpc64-unknown-linux-gnu
109+
# We only run unit tests, not the integration tests, because QEMU doesn't translate the
110+
# evdev/uinput ioctls between architectures.
111+
88112
ci:
89113
name: CI
90114
strategy:
@@ -124,7 +148,7 @@ jobs:
124148

125149
cd:
126150
name: CD
127-
needs: [msrv, build, ci, freebsd]
151+
needs: [msrv, build, ci, freebsd, big-endian]
128152
runs-on: ubuntu-latest
129153

130154
permissions:

0 commit comments

Comments
 (0)