Skip to content

Commit 1683801

Browse files
committed
ci: workaround RUSTFLAGS leaking into cargo-make/cargo-wdk rust-script builds
Unset RUSTFLAGS for cargo-make and cargo-wdk steps in build.yaml to prevent -D warnings from leaking into rust-script compilation of wdk-build. Temporary workaround until microsoft/windows-drivers-rs#629 is merged and a new wdk-build is published. Tracked in ADO Bug #5396440.
1 parent de907c7 commit 1683801

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

.github/workflows/build.yaml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,27 @@ jobs:
107107
tool: cargo-make
108108

109109
- name: Build and Package Sample Drivers
110-
run: cargo make default +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }}
110+
# Unset RUSTFLAGS for cargo-make to work around RUSTFLAGS leaking into
111+
# rust-script compilation of wdk-build (path dep via symlink defeats
112+
# --cap-lints). Upstream fix: microsoft/windows-drivers-rs#629
113+
run: |
114+
$env:RUSTFLAGS = $null
115+
cargo make default +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }}
116+
shell: pwsh
111117

112118
# Steps to use cargo-wdk to build and package drivers
113119
- name: Install cargo-wdk binary
114-
run: cargo +${{ matrix.rust_toolchain }} install cargo-wdk --locked --force
120+
# Unset RUSTFLAGS for cargo-wdk install to avoid same RUSTFLAGS leak
121+
# as cargo-make. Upstream fix: microsoft/windows-drivers-rs#629
122+
run: |
123+
$env:RUSTFLAGS = $null
124+
cargo +${{ matrix.rust_toolchain }} install cargo-wdk --locked --force
125+
shell: pwsh
115126

116127
- name: Build and Package Sample Drivers with cargo-wdk
117-
run: cargo +${{ matrix.rust_toolchain }} wdk build --sample --profile ${{ matrix.cargo_profile }} --target-arch ${{ matrix.target_triple.arch }}
128+
# Unset RUSTFLAGS for cargo-wdk to avoid same RUSTFLAGS leak
129+
# as cargo-make. Upstream fix: microsoft/windows-drivers-rs#629
130+
run: |
131+
$env:RUSTFLAGS = $null
132+
cargo +${{ matrix.rust_toolchain }} wdk build --sample --profile ${{ matrix.cargo_profile }} --target-arch ${{ matrix.target_triple.arch }}
133+
shell: pwsh

0 commit comments

Comments
 (0)