Skip to content

Commit 57a3dea

Browse files
authored
Merge branch 'microsoft:main' into fix-inx-readme
2 parents e59bc7a + 0a3a3cd commit 57a3dea

10 files changed

Lines changed: 128 additions & 145 deletions

File tree

.github/workflows/build.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
name: Build
1818
runs-on: windows-latest
1919
strategy:
20+
fail-fast: false # Allow all matrix variants to complete even if some fail
2021
matrix:
2122
wdk:
2223
- Microsoft.WindowsWDK.10.0.22621 # NI WDK
@@ -34,8 +35,10 @@ jobs:
3435
- release
3536

3637
target_triple:
37-
- x86_64-pc-windows-msvc
38-
- aarch64-pc-windows-msvc
38+
- name: x86_64-pc-windows-msvc
39+
arch: amd64
40+
- name: aarch64-pc-windows-msvc
41+
arch: arm64
3942

4043
steps:
4144
- name: Checkout Repository
@@ -70,15 +73,24 @@ jobs:
7073
uses: dtolnay/rust-toolchain@master
7174
with:
7275
toolchain: ${{ matrix.rust_toolchain }}
73-
targets: ${{ matrix.target_triple }}
76+
targets: ${{ matrix.target_triple.name }}
7477

7578
- name: Run Cargo Build
76-
run: cargo +${{ matrix.rust_toolchain }} build --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --workspace
79+
run: cargo +${{ matrix.rust_toolchain }} build --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --workspace
7780

81+
# Steps to use cargo-make to build and package drivers
7882
- name: Install Cargo Make
7983
uses: taiki-e/install-action@v2
8084
with:
8185
tool: cargo-make
8286

8387
- name: Build and Package Sample Drivers
84-
run: cargo make default +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }}
88+
run: cargo make default +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }}
89+
90+
# Steps to use cargo-wdk to build and package drivers (uses cargo-wdk at specific commit https://github.com/microsoft/windows-drivers-rs/commit/5b9aa0a14e385daf5217c0f5232bcd4d3f4780a6)
91+
- name: Install cargo-wdk binary
92+
run: cargo +${{ matrix.rust_toolchain }} install --git https://github.com/microsoft/windows-drivers-rs.git cargo-wdk --branch main --rev 5b9aa0a14e385daf5217c0f5232bcd4d3f4780a6 --locked --force
93+
94+
- name: Build and Package Sample Drivers with cargo-wdk
95+
run: cargo +${{ matrix.rust_toolchain }} wdk build --profile ${{ matrix.cargo_profile }} --target-arch ${{ matrix.target_triple.arch }}
96+
continue-on-error: true # cargo-wdk build fails for a known reason

.github/workflows/lint.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
if: matrix.rust_toolchain == 'nightly'
7878
run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --all-targets --features nightly -- -D warnings
7979

80-
udeps:
80+
machete:
8181
name: Detect Unused Cargo Dependencies
8282
runs-on: windows-latest
8383
strategy:
@@ -104,17 +104,13 @@ jobs:
104104
Install-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
105105
}
106106
107-
- name: Install Rust Toolchain (Nightly)
108-
# Cargo udeps only supports running on nightly due to reliance on unstable dep-info feature: https://github.com/est31/cargo-udeps/issues/113, https://github.com/est31/cargo-udeps/issues/136
109-
uses: dtolnay/rust-toolchain@nightly
107+
- name: Install Rust Toolchain
108+
uses: dtolnay/rust-toolchain@stable
110109

111-
- name: Install Cargo Udeps
110+
- name: Install Cargo Machete
112111
uses: taiki-e/install-action@v2
113112
with:
114-
tool: cargo-udeps@0.1.48
113+
tool: cargo-machete
115114

116-
- name: Run Cargo Udeps
117-
run: cargo +nightly udeps --locked --all-targets
118-
119-
- name: Run Cargo Udeps (--features nightly)
120-
run: cargo +nightly udeps --locked --all-targets --features nightly
115+
- name: Run Cargo Machete
116+
run: cargo machete

0 commit comments

Comments
 (0)