From 63fda9935f9da069781d18d5861ee6e50c78ea05 Mon Sep 17 00:00:00 2001 From: LN Liberda Date: Mon, 3 Mar 2025 14:10:58 +0100 Subject: [PATCH] Run tests on 32-bit via Ubuntu multilib (#5937) Co-authored-by: Laurenz --- .github/workflows/ci.yml | 24 +++++++++++++++++++----- tests/suite/model/numbering.typ | 1 - 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f0ada9f9..41f17d137 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 diff --git a/tests/suite/model/numbering.typ b/tests/suite/model/numbering.typ index 6af989ff1..ccd7cfc18 100644 --- a/tests/suite/model/numbering.typ +++ b/tests/suite/model/numbering.typ @@ -49,7 +49,6 @@ 2000000001, "βΜκʹ, αʹ", 2000010001, "βΜκʹ, αΜαʹ, αʹ", 2056839184, "βΜκʹ, αΜ͵εχπγ, ͵θρπδ", - 12312398676, "βΜρκγʹ, αΜ͵ασλθ, ͵ηχοϛ", ) #t( pat: sym.Alpha,