Skip to content

Commit

Permalink
Use the ARM runner for some 32-bit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EliahKagan committed Jan 18, 2025
1 parent 87387c2 commit 5d43baf
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,21 @@ jobs:
etc/test-fixtures-windows-expected-failures-see-issue-1358.txt actual-failures.txt
test-32bit:
runs-on: ubuntu-latest
strategy:
matrix:
container-arch: [ i386, arm32v7 ]
include:
- container-arch: i386
runner-os: ubuntu-latest
toolchain: stable-i686-unknown-linux-gnu
- container-arch: arm32v7
runner-os: ubuntu-24.04-arm
toolchain: stable-armv7-unknown-linux-gnueabihf
fail-fast: false # FIXME: Probably remove this.

container: i386/debian:stable-slim
runs-on: ${{ matrix.runner-os }}

container: ${{ matrix.container-arch }}/debian:stable-slim

steps:
- name: Prerequisites
Expand All @@ -214,17 +226,18 @@ jobs:
git
jq
libssl-dev
libstdc++6:amd64 # To support external 64-bit Node.js for actions.
# libstdc++6:amd64 # To support external 64-bit Node.js for actions.
pkgconf
)
dpkg --add-architecture amd64
# dpkg --add-architecture amd64
apt-get update
apt-get install --no-install-recommends -y -- "${prerequisites[@]}"
shell: bash
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable-i686-unknown-linux-gnu # Otherwise it may misdetect based on the amd64 kernel.
# Avoid possible misdetection based on the 64-bit running kernel.
toolchain: ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
Expand All @@ -237,7 +250,7 @@ jobs:
run: cargo nextest run --workspace --no-fail-fast

test-32bit-cross:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm

strategy:
matrix:
Expand All @@ -260,8 +273,9 @@ jobs:
run: cross check -p gix --target ${{ matrix.target }}
- name: Test (unit)
run: |
# Run some high-level unit tests that exercise various pure Rust code to ease building test binaries.
# We would prefer `-p gix`. But with `cross`, fixture scripts try to run amd64 `git` as an armv7 binary.
# Run some high-level unit tests that exercise various pure Rust code to ease building
# test binaries. We would prefer `-p gix`. But with `cross`, fixture scripts try to run
# the host `git` as an armv7 binary.
cross test -p gix-hashtable --target ${{ matrix.target }}
lint:
Expand Down

0 comments on commit 5d43baf

Please sign in to comment.