Run tests on 32-bit via Ubuntu multilib (#5937)

Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
LN Liberda 2025-03-03 14:10:58 +01:00 committed by GitHub
parent 8820a00beb
commit 63fda9935f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 6 deletions

View File

@ -5,6 +5,7 @@ env:
RUSTFLAGS: "-Dwarnings" RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings" RUSTDOCFLAGS: "-Dwarnings"
TYPST_TESTS_EXTENDED: true TYPST_TESTS_EXTENDED: true
PKG_CONFIG_i686-unknown-linux-gnu: /usr/bin/i686-linux-gnu-pkgconf
jobs: jobs:
# This allows us to have one branch protection rule for the full test matrix. # This allows us to have one branch protection rule for the full test matrix.
@ -27,30 +28,43 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest]
bits: [64]
include:
- os: ubuntu-latest
bits: 32
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - 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 - uses: dtolnay/rust-toolchain@1.85.0
with:
targets: ${{ matrix.bits == 32 && 'i686-unknown-linux-gnu' || '' }}
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo test --workspace --no-run with:
- run: cargo test --workspace --no-fail-fast 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 - name: Upload rendered test output
if: failure() if: failure()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: tests-rendered-${{ matrix.os }} name: tests-rendered-${{ matrix.os }}-${{ matrix.bits }}
path: tests/store/render/** path: tests/store/render/**
retention-days: 3 retention-days: 3
- name: Update test artifacts - name: Update test artifacts
if: failure() if: failure()
run: | 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" echo 'updated_artifacts=1' >> "$GITHUB_ENV"
- name: Upload updated reference output (for use if the test changes are desired) - name: Upload updated reference output (for use if the test changes are desired)
if: failure() && env.updated_artifacts if: failure() && env.updated_artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: tests-updated-${{ matrix.os }} name: tests-updated-${{ matrix.os }}-${{ matrix.bits }}
path: tests/ref/** path: tests/ref/**
retention-days: 3 retention-days: 3

View File

@ -49,7 +49,6 @@
2000000001, "βΜκʹ, αʹ", 2000000001, "βΜκʹ, αʹ",
2000010001, "βΜκʹ, αΜαʹ, αʹ", 2000010001, "βΜκʹ, αΜαʹ, αʹ",
2056839184, "βΜκʹ, αΜ͵εχπγ, ͵θρπδ", 2056839184, "βΜκʹ, αΜ͵εχπγ, ͵θρπδ",
12312398676, "βΜρκγʹ, αΜ͵ασλθ, ͵ηχοϛ",
) )
#t( #t(
pat: sym.Alpha, pat: sym.Alpha,