Skip to content

Commit cbe3793

Browse files
committed
Use the ARM runner for some 32-bit tests
This turns the `test-32bit` job into a matrix job definition with two jobs: the i386 job, which already existed, and a new ARMv7 job, which is able to run (still without emulation) in a container on the new ARM64 runner. As written, this is not expected to work, and is even expected to break the old job, because I've commented out the code that installs libraries for the 64-bit host architecture inside the container to allow the 64-bit Node.js on the host to run in the container for script steps. This is just to make sure that is still needed, before attempting to generalize it to cover both platforms.
1 parent 87387c2 commit cbe3793

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,21 @@ jobs:
199199
etc/test-fixtures-windows-expected-failures-see-issue-1358.txt actual-failures.txt
200200
201201
test-32bit:
202-
runs-on: ubuntu-latest
202+
strategy:
203+
matrix:
204+
container-arch: [ i386, arm32v7 ]
205+
include:
206+
- container-arch: i386
207+
runner-os: ubuntu-latest
208+
toolchain: stable-i686-unknown-linux-gnu
209+
- container-arch: arm32v7
210+
runner-os: ubuntu-24.04-arm
211+
toolchain: stable-armv7-unknown-linux-gnueabihf
212+
fail-fast: false # FIXME: Probably remove this.
213+
214+
runs-on: ${{ matrix.runner-os }}
203215

204-
container: i386/debian:stable-slim
216+
container: ${{ matrix.container-arch }}/debian:stable-slim
205217

206218
steps:
207219
- name: Prerequisites
@@ -214,17 +226,18 @@ jobs:
214226
git
215227
jq
216228
libssl-dev
217-
libstdc++6:amd64 # To support external 64-bit Node.js for actions.
229+
# libstdc++6:amd64 # To support external 64-bit Node.js for actions.
218230
pkgconf
219231
)
220-
dpkg --add-architecture amd64
232+
# dpkg --add-architecture amd64
221233
apt-get update
222234
apt-get install --no-install-recommends -y -- "${prerequisites[@]}"
223235
shell: bash
224236
- uses: actions/checkout@v4
225237
- uses: dtolnay/rust-toolchain@stable
226238
with:
227-
toolchain: stable-i686-unknown-linux-gnu # Otherwise it may misdetect based on the amd64 kernel.
239+
# Avoid possible misdetection based on the 64-bit running kernel.
240+
toolchain: ${{ matrix.toolchain }}
228241
- uses: Swatinem/rust-cache@v2
229242
- uses: taiki-e/install-action@v2
230243
with:
@@ -260,8 +273,9 @@ jobs:
260273
run: cross check -p gix --target ${{ matrix.target }}
261274
- name: Test (unit)
262275
run: |
263-
# Run some high-level unit tests that exercise various pure Rust code to ease building test binaries.
264-
# We would prefer `-p gix`. But with `cross`, fixture scripts try to run amd64 `git` as an armv7 binary.
276+
# Run some high-level unit tests that exercise various pure Rust code to ease building
277+
# test binaries. We would prefer `-p gix`. But with `cross`, fixture scripts try to run
278+
# the host `git` as an armv7 binary.
265279
cross test -p gix-hashtable --target ${{ matrix.target }}
266280
267281
lint:

0 commit comments

Comments
 (0)