Skip to content

Show weirdness of Windows on CI #26649

Show weirdness of Windows on CI

Show weirdness of Windows on CI #26649

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
defaults:
run:
shell: bash
jobs:
test:
name: Test
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
opt_level: ['', '--release']
defines: ['-DGOOD', '-DBAD -DBAD_V1', '-DBAD -DBAD_V2']
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/install-rust
- run: rustup target add x86_64-pc-windows-gnu
- run: echo CARGO_BUILD_TARGET=x86_64-pc-windows-gnu >> $GITHUB_ENV
# Update binutils if MinGW due to https://github.com/rust-lang/rust/issues/112368
- run: C:/msys64/usr/bin/pacman.exe -S --needed mingw-w64-x86_64-gcc --noconfirm
if: matrix.target == 'x86_64-pc-windows-gnu'
- shell: pwsh
run: echo "C:\msys64\mingw64\bin" >> $Env:GITHUB_PATH
if: matrix.target == 'x86_64-pc-windows-gnu'
- run: |
set +ex
cargo run ${{ matrix.opt_level }} test.wat
if [ $? = 3 ]; then
exit 0
else
exit 1
fi
env:
CFLAGS: ${{ matrix.defines }} -g0