mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
94 lines
2.5 KiB
YAML
94 lines
2.5 KiB
YAML
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 |