forked from gfx-rs/wgpu
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (80 loc) · 2.53 KB
/
cts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CTS
on:
push:
branches: [master, staging]
tags: [v0.*]
pull_request:
types: [labeled, opened, synchronize]
env:
RUST_BACKTRACE: 1
jobs:
cts:
# Only run if we add this label
if: contains(github.event.pull_request.labels.*.name, 'needs testing')
strategy:
fail-fast: false
matrix:
include:
# Windows
- name: Windows x86_64
os: windows-2019
target: x86_64-pc-windows-msvc
backends: dx12 # dx11
# Linux
#- name: Linux x86_64
# os: ubuntu-20.04
# target: x86_64-unknown-linux-gnu
# backends: vulkan # gl
name: CTS ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- name: checkout repo
uses: actions/checkout@v2
with:
path: wgpu
- name: checkout cts
run: |
git clone https://github.com/gpuweb/cts.git
cd cts
git checkout $(cat ../wgpu/cts_runner/revision.txt)
- name: install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
profile: minimal
- name: caching
uses: Swatinem/rust-cache@v1
with:
key: cts-a # suffix for cache busting
working-directory: wgpu/cts_runner
target-dir: wgpu/cts_runner/target
- name: install llvmpipe and lavapipe
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update -y -qq
sudo add-apt-repository ppa:oibaf/graphics-drivers -y
sudo apt-get update
sudo apt install -y libxcb-xfixes0-dev mesa-vulkan-drivers
# libegl1-mesa libgl1-mesa-dri for gl
# We enable line numbers for panics, but that's it
- name: disable debug
shell: bash
run: |
mkdir wgpu/.cargo
echo """[profile.dev]
debug = 1" > wgpu/.cargo/config.toml
- name: build CTS runner
run: |
cargo build --manifest-path wgpu/cts_runner/Cargo.toml
- name: run CTS
shell: bash
run: |
cd cts;
for backend in ${{ matrix.backends }}; do
echo "======= CTS TESTS $backend ======";
grep -v '^//' ../wgpu/cts_runner/test.lst | while IFS=$' \t\r\n' read test; do
echo "=== Running $test ===";
DENO_WEBGPU_BACKEND=$backend cargo run --manifest-path ../wgpu/cts_runner/Cargo.toml --frozen -- ./tools/run_deno --verbose "$test";
done
done