@@ -244,6 +244,7 @@ jobs:
244244 uses : Swatinem/rust-cache@v2
245245 with :
246246 key : clippy-${{ matrix.target }}-${{ matrix.kind }}-${{ env.CACHE_SUFFIX }}
247+ save-if : ${{ github.ref == 'refs/heads/trunk' }}
247248
248249 - name : (Linux `aarch64`) Install `aarch64-linux-gnu` `g++`
249250 if : matrix.target == 'aarch64-unknown-linux-gnu'
@@ -334,6 +335,13 @@ jobs:
334335 # If we don't check this then errors inside `profiling::scope!()` will not be caught.
335336 cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --benches --all-features --features test-build-with-profiling
336337
338+ # Check wgpu-hal with main backends in isolation to catch missing feature/dependencies activations which may be overlooked when they are dragged in via other features.
339+ # (best effort: in theory we'd need to test all combinations)
340+ cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features vulkan
341+ cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features gles
342+ cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features metal
343+ cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features dx12
344+
337345 # build docs
338346 cargo --locked doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --all-features --no-deps
339347
@@ -409,6 +417,7 @@ jobs:
409417 uses : Swatinem/rust-cache@v2
410418 with :
411419 key : wgpu-msrv-check-${{ matrix.target }}-${{ env.CACHE_SUFFIX }}
420+ save-if : ${{ github.ref == 'refs/heads/trunk' }}
412421
413422 - name : Reduce MSRV on dependencies
414423 shell : bash
@@ -481,6 +490,7 @@ jobs:
481490 uses : Swatinem/rust-cache@v2
482491 with :
483492 key : core-msrv-check-${{ matrix.target }}-${{ env.CACHE_SUFFIX }}
493+ save-if : ${{ github.ref == 'refs/heads/trunk' }}
484494
485495 - name : Reduce MSRV on dependencies
486496 shell : bash
@@ -628,6 +638,7 @@ jobs:
628638 uses : Swatinem/rust-cache@v2
629639 with :
630640 key : test-${{ matrix.os }}-${{ env.CACHE_SUFFIX }}
641+ save-if : ${{ github.ref == 'refs/heads/trunk' }}
631642 workspaces : |
632643 . -> target
633644
@@ -739,6 +750,7 @@ jobs:
739750 uses : Swatinem/rust-cache@v2
740751 with :
741752 key : doctests-${{ env.CACHE_SUFFIX }}
753+ save-if : ${{ github.ref == 'refs/heads/trunk' }}
742754
743755 - name : Run doctests
744756 shell : bash
@@ -770,6 +782,7 @@ jobs:
770782 uses : Swatinem/rust-cache@v2
771783 with :
772784 key : miri-${{ env.CACHE_SUFFIX }}
785+ save-if : ${{ github.ref == 'refs/heads/trunk' }}
773786
774787 - name : Run Miri on selected tests
775788 shell : bash
@@ -811,15 +824,15 @@ jobs:
811824 cargo --locked fmt -- --check
812825
813826 - name : Install Taplo
814- uses : uncenter/setup-taplo@v1
827+ uses : uncenter/setup-taplo@v2
815828 with :
816829 version : " 0.9.3"
817830
818831 - name : Run `taplo fmt`
819832 run : taplo format --check --diff
820833
821834 - name : Check for typos
822- uses : crate-ci/typos@v1.45.0
835+ uses : crate-ci/typos@v1.45.1
823836
824837 check-cts-runner :
825838 # runtime is normally 2 minutes
@@ -851,6 +864,7 @@ jobs:
851864 uses : Swatinem/rust-cache@v2
852865 with :
853866 key : cts-runner-${{ env.CACHE_SUFFIX }}
867+ save-if : ${{ github.ref == 'refs/heads/trunk' }}
854868
855869 - name : Build Deno
856870 run : |
0 commit comments