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
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.
  • Loading branch information
EliahKagan committed Jan 18, 2025
1 parent 87387c2 commit cbe3793
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 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.

runs-on: ${{ matrix.runner-os }}

container: i386/debian:stable-slim
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 Down Expand Up @@ -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 cbe3793

Please sign in to comment.