1313 RUST_BACKTRACE : full
1414 MSRV : " 1.84"
1515
16+ # These Mesa version definitions are duplicated in the CI job.
17+ # Sourced from https://archive.mesa3d.org/. Bumping this requires
18+ # updating the mesa build in https://github.com/gfx-rs/ci-build and creating a new release.
19+ MESA_VERSION : " 24.3.4"
20+ # Corresponds to https://github.com/gfx-rs/ci-build/releases
21+ CI_BINARY_BUILD : " build20"
22+
1623jobs :
1724 cts :
18- # For pull requests, only run if we add the "PR: run CTS" label
19- if : " github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'PR: run CTS')"
20-
2125 strategy :
2226 fail-fast : false
2327 matrix :
@@ -26,28 +30,23 @@ jobs:
2630 - name : Windows x86_64
2731 os : windows-2022
2832 target : x86_64-pc-windows-msvc
29- backends : dx12
33+
34+ # Mac
35+ - name : Mac aarch64
36+ os : macos-14
37+ target : x86_64-apple-darwin
3038
3139 # Linux
32- # - name: Linux x86_64
33- # os: ubuntu-20.04
34- # target: x86_64-unknown-linux-gnu
35- # backends: vulkan # gl
40+ - name : Linux x86_64
41+ os : ubuntu-24.04
42+ target : x86_64-unknown-linux-gnu
3643
3744 name : CTS ${{ matrix.name }}
3845 runs-on : ${{ matrix.os }}
3946
4047 steps :
4148 - name : checkout repo
4249 uses : actions/checkout@v4
43- with :
44- path : wgpu
45-
46- - name : checkout cts
47- run : |
48- git clone https://github.com/gpuweb/cts.git
49- cd cts
50- git checkout $(cat ../wgpu/cts_runner/revision.txt)
5150
5251 - name : Install Repo MSRV toolchain
5352 run : |
@@ -58,31 +57,47 @@ jobs:
5857 - name : caching
5958 uses : Swatinem/rust-cache@v2
6059 with :
61- key : cts-b # suffix for cache busting
62- workspaces : wgpu
60+ prefix- key : v1-rust # Increment version for cache busting
61+ cache-directories : cts
6362
6463 # We enable line numbers for panics, but that's it
6564 - name : disable debug
6665 shell : bash
6766 run : |
68- mkdir -p wgpu/.cargo
69- echo """[profile.dev]
70- debug = 1" > wgpu/.cargo/config.toml
67+ mkdir -p .cargo
68+ cat <<EOF >> .cargo/config.toml
69+ [profile.dev]
70+ debug = 1
71+ EOF
7172
72- - name : build CTS runner
73+ # This step is duplicated in the CI job.
74+ - name : (Linux) Install Mesa
75+ if : matrix.os == 'ubuntu-24.04'
76+ shell : bash
7377 run : |
74- cargo build --manifest-path wgpu/cts_runner/Cargo.toml
78+ set -e
79+
80+ curl -L --retry 5 https://github.com/gfx-rs/ci-build/releases/download/$CI_BINARY_BUILD/mesa-$MESA_VERSION-linux-x86_64.tar.xz -o mesa.tar.xz
81+ mkdir mesa
82+ tar xpf mesa.tar.xz -C mesa
83+
84+ # The ICD provided by the mesa build is hardcoded to the build environment.
85+ #
86+ # We write out our own ICD file to point to the mesa vulkan
87+ cat <<- EOF > icd.json
88+ {
89+ "ICD": {
90+ "api_version": "1.1.255",
91+ "library_path": "$PWD/mesa/lib/x86_64-linux-gnu/libvulkan_lvp.so"
92+ },
93+ "file_format_version": "1.0.0"
94+ }
95+ EOF
96+
97+ echo "VK_DRIVER_FILES=$PWD/icd.json" >> "$GITHUB_ENV"
98+ echo "LD_LIBRARY_PATH=$PWD/mesa/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH" >> "$GITHUB_ENV"
99+ echo "LIBGL_DRIVERS_PATH=$PWD/mesa/lib/x86_64-linux-gnu/dri" >> "$GITHUB_ENV"
75100
76101 - name : run CTS
77102 shell : bash
78- run : |
79- cd cts;
80- for backend in ${{ matrix.backends }}; do
81- echo "======= CTS TESTS $backend ======";
82- grep -v '^//' ../wgpu/cts_runner/test.lst | while IFS=$' \t\r\n' read test; do
83- echo "=== Running $test ===";
84- DENO_WEBGPU_BACKEND=$backend cargo run --manifest-path ../wgpu/cts_runner/Cargo.toml --frozen -- ./tools/run_deno --verbose "$test";
85- done
86- done
87- echo;
88- echo "Note: Summary reflects only the last test suite, not the entire run."
103+ run : cargo xtask cts
0 commit comments