From b99b8a81bf439bf91d52ae67b3303fb96d08a5b1 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Thu, 12 Feb 2026 13:18:31 +0100 Subject: [PATCH 1/7] ci: remove rustup env vars, causing warnings --- .github/workflows/ci.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7103bb0f9b..37a8b5ca3f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,9 +23,6 @@ jobs: matrix: os: [ ubuntu-latest, windows-latest, macOS-latest ] runs-on: ${{ matrix.os }} - env: - RUSTUP_UNPACK_RAM: "26214400" - RUSTUP_IO_THREADS: "1" steps: - uses: actions/checkout@v4 - name: Install Vulkan SDK @@ -84,9 +81,6 @@ jobs: os: [ ubuntu-latest ] target: [ aarch64-linux-android ] runs-on: ${{ matrix.os }} - env: - RUSTUP_UNPACK_RAM: "26214400" - RUSTUP_IO_THREADS: "1" steps: - uses: actions/checkout@v4 - name: Install Vulkan SDK From 7fc05917db62816c98af62367882b9cae0ed44b3 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Thu, 12 Feb 2026 16:44:38 +0100 Subject: [PATCH 2/7] ci: move "test difftest" to test job --- .github/workflows/ci.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 37a8b5ca3f..b4d03e5675 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -52,8 +52,8 @@ jobs: - name: rustc_codegen_spirv test run: cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools" - - name: workspace test (excluding examples & difftest) - run: cargo test --release --workspace --exclude "example-runner-*" --exclude "difftest*" --no-default-features --features "use-installed-tools,clap" + - name: workspace test (excluding examples) + run: cargo test --release --workspace --exclude "example-runner-*" --no-default-features --features "use-installed-tools,clap" # Examples - name: cargo check examples @@ -175,8 +175,6 @@ jobs: run: cargo fetch --locked --target $TARGET - name: cargo fetch --locked difftests run: cargo fetch --locked --manifest-path=tests/difftests/tests/Cargo.toml --target $TARGET - - name: test difftest - run: cargo test -p "difftest*" --release --no-default-features --features "use-installed-tools" - name: difftests run: cargo run -p difftests --release --no-default-features --features "use-installed-tools" From 61d20c0e5719ba5f41868cc5396f66705daae3da Mon Sep 17 00:00:00 2001 From: firestar99 Date: Mon, 16 Feb 2026 17:22:45 +0100 Subject: [PATCH 3/7] ci: don't cache vulkan sdk on mac, restore is broken see https://github.com/jakoch/install-vulkan-sdk-action/issues/558 --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b4d03e5675..83b0f02b7c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,7 +30,9 @@ jobs: with: vulkan_version: 1.4.321.0 install_runtime: true - cache: true + # cache restore on mac is broken + # see https://github.com/jakoch/install-vulkan-sdk-action/issues/558 + cache: ${{ runner.os != 'macOS' }} stripdown: true - if: ${{ runner.os == 'Linux' }} name: Linux - Install native dependencies From ed91ac259c8fd9f8984d563123bb7e855f4bdd3e Mon Sep 17 00:00:00 2001 From: firestar99 Date: Tue, 10 Feb 2026 11:17:02 +0100 Subject: [PATCH 4/7] ci: add rust-cache action after toolchain install --- .github/workflows/ci.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 83b0f02b7c..faf5dc0fce 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,6 +41,11 @@ jobs: # figure out native target triple while we're at it - name: install rust-toolchain run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV" + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + . + tests/difftests/tests # Fetch dependencies in a separate step to clearly show how long each part # of the testing takes - name: cargo fetch --locked @@ -94,6 +99,11 @@ jobs: stripdown: true - name: install rust-toolchain run: cargo version + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + . + tests/difftests/tests - name: cargo fetch --locked run: cargo fetch --locked --target ${{ matrix.target }} @@ -138,6 +148,11 @@ jobs: stripdown: true - name: install rust-toolchain run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV" + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + . + tests/difftests/tests - name: cargo fetch --locked run: cargo fetch --locked --target $TARGET - name: compiletest @@ -173,6 +188,11 @@ jobs: sudo apt install -y xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers - name: install rust-toolchain run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV" + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + . + tests/difftests/tests - name: cargo fetch --locked run: cargo fetch --locked --target $TARGET - name: cargo fetch --locked difftests @@ -220,6 +240,11 @@ jobs: # cargo version is a random command that forces the installation of rust-toolchain - name: install rust-toolchain run: cargo version + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + . + tests/difftests/tests - name: Install rustup components run: rustup component add rustfmt clippy - name: cargo fetch --locked From d7d3681aabdeb7fcce6de67dab0a33ffa8307d5e Mon Sep 17 00:00:00 2001 From: firestar99 Date: Thu, 12 Feb 2026 12:12:11 +0100 Subject: [PATCH 5/7] ci: reuse rust-cache between different jobs on the same platform, remove cache from lint --- .github/workflows/ci.yaml | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index faf5dc0fce..89e99ae4f6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,9 +43,8 @@ jobs: run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV" - uses: Swatinem/rust-cache@v2 with: - workspaces: | - . - tests/difftests/tests + add-job-id-key: "false" + shared-key: "base" # Fetch dependencies in a separate step to clearly show how long each part # of the testing takes - name: cargo fetch --locked @@ -101,9 +100,8 @@ jobs: run: cargo version - uses: Swatinem/rust-cache@v2 with: - workspaces: | - . - tests/difftests/tests + add-job-id-key: "false" + shared-key: "android" - name: cargo fetch --locked run: cargo fetch --locked --target ${{ matrix.target }} @@ -150,9 +148,9 @@ jobs: run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV" - uses: Swatinem/rust-cache@v2 with: - workspaces: | - . - tests/difftests/tests + add-job-id-key: "false" + shared-key: "base" + save-if: "false" - name: cargo fetch --locked run: cargo fetch --locked --target $TARGET - name: compiletest @@ -190,9 +188,14 @@ jobs: run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV" - uses: Swatinem/rust-cache@v2 with: - workspaces: | - . - tests/difftests/tests + add-job-id-key: "false" + shared-key: "base" + save-if: "false" + - uses: Swatinem/rust-cache@v2 + with: + add-job-id-key: "false" + shared-key: "difftest" + workspaces: "tests/difftests/tests" - name: cargo fetch --locked run: cargo fetch --locked --target $TARGET - name: cargo fetch --locked difftests @@ -240,11 +243,6 @@ jobs: # cargo version is a random command that forces the installation of rust-toolchain - name: install rust-toolchain run: cargo version - - uses: Swatinem/rust-cache@v2 - with: - workspaces: | - . - tests/difftests/tests - name: Install rustup components run: rustup component add rustfmt clippy - name: cargo fetch --locked From b601d7fd3e71afc06ec35d550b84fdfa54dfa388 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Fri, 13 Feb 2026 13:47:29 +0100 Subject: [PATCH 6/7] ci: make "test" prep deps cache for compiletests and difftests --- .github/workflows/ci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 89e99ae4f6..80a4f06a86 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -80,6 +80,16 @@ jobs: OUT_DIR: "target/debug/ci/out" run: cargo run -p example-runner-wgpu-builder --no-default-features --features "use-installed-tools" + # Our test runners select very different features for dependencies, so they need to be two separate builds. + # * compiletests depends on `rustc_codegen_spirv` directly with features `use-installed-tools` + # * difftests depends on `spirv-builder` with no features, which excludes `rustc_codegen_spirv` entirely. + # The individual difftest crates depend on it and run the spirv compile, never the test runner itself. + - name: prep cache for other jobs + run: | + cargo build -p compiletests --release --no-default-features --features "use-installed-tools" + cargo build -p difftests --release --no-default-features --features "use-installed-tools" + + android: name: Android strategy: From ee3f47b33e02e93f60bdf8d59a2883075a0dc609 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Mon, 16 Feb 2026 17:51:34 +0100 Subject: [PATCH 7/7] ci: only save cache on main --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 80a4f06a86..f58479c447 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,6 +45,7 @@ jobs: with: add-job-id-key: "false" shared-key: "base" + save-if: ${{ github.ref_name == 'main' }} # Fetch dependencies in a separate step to clearly show how long each part # of the testing takes - name: cargo fetch --locked @@ -85,6 +86,7 @@ jobs: # * difftests depends on `spirv-builder` with no features, which excludes `rustc_codegen_spirv` entirely. # The individual difftest crates depend on it and run the spirv compile, never the test runner itself. - name: prep cache for other jobs + if: github.ref_name == 'main' run: | cargo build -p compiletests --release --no-default-features --features "use-installed-tools" cargo build -p difftests --release --no-default-features --features "use-installed-tools" @@ -112,6 +114,7 @@ jobs: with: add-job-id-key: "false" shared-key: "android" + save-if: ${{ github.ref_name == 'main' }} - name: cargo fetch --locked run: cargo fetch --locked --target ${{ matrix.target }}