From 9a556d3d2029fdd2c564e0640698294552002fb7 Mon Sep 17 00:00:00 2001 From: Alan Ngo Date: Fri, 31 Jul 2026 14:48:48 -0700 Subject: [PATCH 1/6] - add opt out env var to prevent using build-dir v2 in nightly --- .github/workflows/build.yaml | 2 ++ .github/workflows/test.yaml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 125b29250..036e16592 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,6 +14,8 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: + # TODO: Remove when cargo-wdk supports Cargo build-dir layout v2. + __CARGO_TEMPORARY_BUILD_DIR_NEW_LAYOUT_OPT_OUT: '1' RUSTFLAGS: >- -D warnings -C target-feature=+crt-static diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3e0dfa6fe..9b3dc157b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,6 +13,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} +env: + # TODO: Remove when cargo-wdk supports Cargo build-dir layout v2. + __CARGO_TEMPORARY_BUILD_DIR_NEW_LAYOUT_OPT_OUT: '1' + jobs: test: name: Test From 7faf928cd365d9e3d06ef052608a182e096775c8 Mon Sep 17 00:00:00 2001 From: Alan632 Date: Mon, 3 Aug 2026 09:35:02 -0700 Subject: [PATCH 2/6] Change to using the public config override for build-dir opt out Co-authored-by: Melvin Wang Signed-off-by: Alan632 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 036e16592..afc99d365 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,7 @@ concurrency: env: # TODO: Remove when cargo-wdk supports Cargo build-dir layout v2. - __CARGO_TEMPORARY_BUILD_DIR_NEW_LAYOUT_OPT_OUT: '1' + CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT: 'false' RUSTFLAGS: >- -D warnings -C target-feature=+crt-static From 416025443b6b37e2cb53a6cd296242888214acca Mon Sep 17 00:00:00 2001 From: Alan632 Date: Mon, 3 Aug 2026 10:04:06 -0700 Subject: [PATCH 3/6] update env variable in test.yaml to use the public override Signed-off-by: Alan632 --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9b3dc157b..53d70ebdb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,7 +15,7 @@ concurrency: env: # TODO: Remove when cargo-wdk supports Cargo build-dir layout v2. - __CARGO_TEMPORARY_BUILD_DIR_NEW_LAYOUT_OPT_OUT: '1' + CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT: 'false' jobs: test: From f68eb7b75b7be23d5a65aaa7a352ebbd59c6451b Mon Sep 17 00:00:00 2001 From: Alan632 Date: Mon, 3 Aug 2026 10:05:53 -0700 Subject: [PATCH 4/6] link gh issue in TODO comment Signed-off-by: Alan632 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index afc99d365..2fe8be7c8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: - # TODO: Remove when cargo-wdk supports Cargo build-dir layout v2. + # TODO: Remove when cargo-wdk supports Cargo build-dir layout v2 (see https://github.com/microsoft/windows-drivers-rs/issues/709). CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT: 'false' RUSTFLAGS: >- -D warnings From 314fe583148b56c313185bc7f5ecf3c2d475f802 Mon Sep 17 00:00:00 2001 From: Alan632 Date: Mon, 3 Aug 2026 10:06:56 -0700 Subject: [PATCH 5/6] linkgh issue in test.yaml TODO comment Signed-off-by: Alan632 --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 53d70ebdb..e8af0f29f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,7 +14,7 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: - # TODO: Remove when cargo-wdk supports Cargo build-dir layout v2. + # TODO: Remove when cargo-wdk supports Cargo build-dir layout v2 (see https://github.com/microsoft/windows-drivers-rs/issues/709). CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT: 'false' jobs: From 1c34c7eff6a8debd29b0ea2b4b48a8c48c5ff3df Mon Sep 17 00:00:00 2001 From: Alan Ngo Date: Mon, 3 Aug 2026 12:16:10 -0700 Subject: [PATCH 6/6] - add an exception for the build-dir v2 public override env var in the logic which selects which env vars to sanitize in the test workflow --- .github/workflows/test.yaml | 1 + crates/cargo-wdk/tests/test_utils/mod.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e8af0f29f..2b26ea315 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,6 +15,7 @@ concurrency: env: # TODO: Remove when cargo-wdk supports Cargo build-dir layout v2 (see https://github.com/microsoft/windows-drivers-rs/issues/709). + # The whitelist in function `sanitize_env_vars` in crates/cargo-wdk/tests/test_utils/mod.rs should also be removed once this env var is removed. CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT: 'false' jobs: diff --git a/crates/cargo-wdk/tests/test_utils/mod.rs b/crates/cargo-wdk/tests/test_utils/mod.rs index f13da0e45..45dee3b21 100644 --- a/crates/cargo-wdk/tests/test_utils/mod.rs +++ b/crates/cargo-wdk/tests/test_utils/mod.rs @@ -313,6 +313,8 @@ fn sanitize_env_vars(cmd: &mut Command) { // non-default locations && var_upper != "CARGO_HOME" && var_upper != "RUSTUP_HOME" + // TODO: Remove this whitelist once the env var is removed from test.yaml (see https://github.com/microsoft/windows-drivers-rs/issues/709) + && var_upper != "CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT" { Some(var) } else {