diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 125b29250..2fe8be7c8 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 (see https://github.com/microsoft/windows-drivers-rs/issues/709). + CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT: 'false' RUSTFLAGS: >- -D warnings -C target-feature=+crt-static diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3e0dfa6fe..2b26ea315 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,6 +13,11 @@ 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 (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: test: name: Test 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 {