-
Notifications
You must be signed in to change notification settings - Fork 71
60 lines (49 loc) · 2 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
on:
push:
pull_request:
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
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 }}
- 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
# Final driver crates must be excluded since theres no way to prevent linker args from being passed to their unit tests: https://github.com/rust-lang/cargo/issues/12663
run: cargo test --locked --profile ${{ matrix.cargo_profile }} --workspace --exclude sample-* --exclude wdk-sys
- name: Run Cargo Test (--features nightly)
if: matrix.rust_toolchain == 'nightly'
# Final driver crates must be excluded since theres no way to prevent linker args from being passed to their unit tests: https://github.com/rust-lang/cargo/issues/12663
run: cargo test --locked --profile ${{ matrix.cargo_profile }} --features nightly --workspace --exclude sample-* --exclude wdk-sys