summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorLN Liberda <msgh@selfisekai.rocks>2025-03-03 14:10:58 +0100
committerGitHub <noreply@github.com>2025-03-03 13:10:58 +0000
commit63fda9935f9da069781d18d5861ee6e50c78ea05 (patch)
tree6f50d0ed46f250103c379671e18f344fd7c75b88 /.github
parent8820a00beb08b7253a99a7cf66bb752cd181bb03 (diff)
Run tests on 32-bit via Ubuntu multilib (#5937)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml24
1 files changed, 19 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9f0ada9f..41f17d13 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -5,6 +5,7 @@ env:
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"
TYPST_TESTS_EXTENDED: true
+ PKG_CONFIG_i686-unknown-linux-gnu: /usr/bin/i686-linux-gnu-pkgconf
jobs:
# This allows us to have one branch protection rule for the full test matrix.
@@ -27,30 +28,43 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
+ bits: [64]
+ include:
+ - os: ubuntu-latest
+ bits: 32
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
+ - if: startsWith(matrix.os, 'ubuntu-') && matrix.bits == 32
+ run: |
+ sudo dpkg --add-architecture i386
+ sudo apt update
+ sudo apt install -y gcc-multilib libssl-dev:i386 pkg-config:i386
- uses: dtolnay/rust-toolchain@1.85.0
+ with:
+ targets: ${{ matrix.bits == 32 && 'i686-unknown-linux-gnu' || '' }}
- uses: Swatinem/rust-cache@v2
- - run: cargo test --workspace --no-run
- - run: cargo test --workspace --no-fail-fast
+ with:
+ key: ${{ matrix.bits }}
+ - run: cargo test --workspace --no-run ${{ matrix.bits == 32 && '--target i686-unknown-linux-gnu' || '' }}
+ - run: cargo test --workspace --no-fail-fast ${{ matrix.bits == 32 && '--target i686-unknown-linux-gnu' || '' }}
- name: Upload rendered test output
if: failure()
uses: actions/upload-artifact@v4
with:
- name: tests-rendered-${{ matrix.os }}
+ name: tests-rendered-${{ matrix.os }}-${{ matrix.bits }}
path: tests/store/render/**
retention-days: 3
- name: Update test artifacts
if: failure()
run: |
- cargo test --workspace --test tests -- --update
+ cargo test --workspace --test tests ${{ matrix.bits == 32 && '--target i686-unknown-linux-gnu' || '' }} -- --update
echo 'updated_artifacts=1' >> "$GITHUB_ENV"
- name: Upload updated reference output (for use if the test changes are desired)
if: failure() && env.updated_artifacts
uses: actions/upload-artifact@v4
with:
- name: tests-updated-${{ matrix.os }}
+ name: tests-updated-${{ matrix.os }}-${{ matrix.bits }}
path: tests/ref/**
retention-days: 3