Skip to content

Commit be1026a

Browse files
committed
run miri with a windows target too
it's allocator is quite different, so let's test that
1 parent 77ee765 commit be1026a

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/checks.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,22 +397,34 @@ jobs:
397397
miri:
398398
name: "Miri"
399399
runs-on: ubuntu-latest
400+
strategy:
401+
matrix:
402+
include:
403+
- target: x86_64-unknown-linux-gnu
404+
- target: x86_64-pc-windows-gnu
400405
steps:
401406
- uses: actions/checkout@v3
402407
- name: Install Miri
403408
run: |
409+
rustup target add ${{ matrix.target }}
404410
rustup toolchain install nightly --component miri
405411
cargo +nightly miri setup
412+
- name: Install gcc
413+
- uses: awalsh128/[email protected]
414+
with:
415+
packages: gcc-mingw-w64-x86-64
416+
version: 1.0
417+
if: ${{ contains(matrix.target, 'windows') }}
406418
- name: Install cargo-nextest
407419
uses: taiki-e/install-action@56ab7930c591507f833cbaed864d201386d518a8
408420
with:
409421
tool: cargo-nextest
410422
- name: Test public C api with NULL arguments
411-
run: "cargo +nightly miri nextest run -j4 -p test-libz-rs-sys null::"
423+
run: "cargo +nightly miri nextest run -j4 -p test-libz-rs-sys --target ${{ matrix.target }} null::"
412424
env:
413425
RUSTFLAGS: "-Ctarget-feature=+avx2"
414426
- name: Test allocator with miri
415-
run: "cargo +nightly miri nextest run -j4 -p zlib-rs allocate::"
427+
run: "cargo +nightly miri nextest run -j4 -p zlib-rs --target ${{ matrix.target }} allocate::"
416428

417429
run-flate2-test-suite:
418430
name: run flate2 test suite

0 commit comments

Comments
 (0)