windows-reactor module privacy convention
#5885
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/workflows/web.yml' | |
| - 'crates/libs/rdl/rdl.md' | |
| - 'docs/**' | |
| - 'web/**' | |
| push: | |
| paths-ignore: | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/workflows/web.yml' | |
| - 'crates/libs/rdl/rdl.md' | |
| - 'docs/**' | |
| - 'web/**' | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
| jobs: | |
| test: | |
| name: ${{ matrix.name }} | |
| strategy: | |
| matrix: | |
| include: | |
| - name: stable x64 | |
| host: x86_64-pc-windows-msvc | |
| target: x86_64-pc-windows-msvc | |
| runner: windows-2025-vs2026 | |
| - name: stable i686 | |
| host: x86_64-pc-windows-msvc | |
| target: i686-pc-windows-msvc | |
| runner: windows-2025-vs2026 | |
| - name: stable arm64 | |
| host: aarch64-pc-windows-msvc | |
| target: aarch64-pc-windows-msvc | |
| runner: windows-11-arm | |
| runs-on: ${{ matrix.runner }} | |
| env: | |
| RUSTFLAGS: -D warnings | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update toolchain | |
| run: rustup update --no-self-update stable && rustup default stable-${{ matrix.host }} | |
| - name: Add toolchain target | |
| run: rustup target add ${{ matrix.target }} | |
| - name: Install fmt | |
| run: rustup component add rustfmt | |
| - name: Fix environment | |
| if: runner.os == 'Windows' | |
| uses: ./.github/actions/fix-environment | |
| with: | |
| target: ${{ matrix.target }} | |
| - name: Install LLVM and Clang (Windows) | |
| if: runner.os == 'Windows' | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "18" | |
| - name: Install LLVM and Clang (Linux) | |
| if: runner.os == 'Linux' | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "20" | |
| - name: Set LIBCLANG_PATH (Windows) | |
| if: runner.os == 'Windows' | |
| run: echo "LIBCLANG_PATH=${{ env.LLVM_PATH }}/bin" >> "$GITHUB_ENV" | |
| shell: bash | |
| - name: Set LIBCLANG_PATH (Linux) | |
| if: runner.os == 'Linux' | |
| run: echo "LIBCLANG_PATH=${{ env.LLVM_PATH }}/lib" >> "$GITHUB_ENV" | |
| shell: bash | |
| - name: Install .NET 9 x86 runtime | |
| # The windows-2025-vs2026 image ships .NET 9 only for x64/arm64; the | |
| # i686 csharp_client test launches a win-x86 process that needs the | |
| # x86 .NET 9 runtime. | |
| if: matrix.target == 'i686-pc-windows-msvc' | |
| shell: pwsh | |
| run: | | |
| $script = Join-Path $env:RUNNER_TEMP 'dotnet-install.ps1' | |
| Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1' -OutFile $script | |
| & $script -Channel 9.0 -Runtime dotnet -Architecture x86 -InstallDir "${env:ProgramFiles(x86)}\dotnet" | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Test | |
| # The 32-bit i686 test process has a 2 GB user-mode address space; the | |
| # ~110 bindgen fixtures in test_fixtures each load the large default | |
| # winmd and exhaust it at default parallelism, so test_fixtures is | |
| # excluded on that target. | |
| run: cargo test --all --target ${{ matrix.target }} --exclude windows_aarch64_gnullvm --exclude windows_aarch64_msvc --exclude windows_i686_gnu --exclude windows_i686_gnullvm --exclude windows_i686_msvc --exclude windows_x86_64_gnu --exclude windows_x86_64_gnullvm --exclude windows_x86_64_msvc ${{ matrix.target == 'i686-pc-windows-msvc' && '--exclude test_bindgen' || '' }} | |
| - name: Check diff | |
| shell: bash | |
| run: | | |
| git add -N . | |
| git diff --exit-code || (echo 'Tests changed code in the repo.'; exit 1) | |