Test #396
This file contains 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
on: | |
push: | |
pull_request: | |
merge_group: | |
schedule: # Trigger a job on default branch at 4AM PST everyday | |
- cron: "0 11 * * *" | |
name: Test | |
jobs: | |
test: | |
name: Test | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
wdk: | |
- Microsoft.WindowsWDK.10.0.22621 # NI WDK | |
rust_toolchain: | |
- stable | |
- beta | |
- nightly | |
cargo_profile: | |
- dev | |
- release | |
target_triple: | |
- x86_64-pc-windows-msvc | |
# - aarch64-pc-windows-msvc FIXME: Add support for executing ARM64 tests. Maybe use target specific test runner in emulator: https://doc.rust-lang.org/cargo/reference/config.html#target | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Winget | |
uses: ./.github/actions/winget-install | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install WDK (${{ matrix.wdk }}) | |
run: | | |
if (!(winget list --exact --source winget --id ${{ matrix.wdk }})[-1].contains("${{ matrix.wdk }}")) { | |
winget install --disable-interactivity --source winget --exact --id ${{ matrix.wdk }} | |
} | |
- name: Install Rust Toolchain (${{ matrix.rust_toolchain }}) | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust_toolchain }} | |
targets: ${{ matrix.target_triple }} | |
- name: Install Cargo Expand | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-expand | |
# FIXME: wdk-sys layout tests fail, but only on github hosted runner | |
- name: Run Cargo Test | |
run: cargo +${{ matrix.rust_toolchain }} test --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --workspace --exclude wdk-sys | |
- name: Run Cargo Test (--features nightly) | |
if: matrix.rust_toolchain == 'nightly' | |
run: cargo +${{ matrix.rust_toolchain }} test --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --workspace --exclude wdk-sys --features nightly |