Skip to content

Commit

Permalink
GPU Test Framework (#3873)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald authored Oct 19, 2023
1 parent 7598919 commit 543f921
Show file tree
Hide file tree
Showing 93 changed files with 3,455 additions and 2,906 deletions.
3 changes: 2 additions & 1 deletion .deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ skip-tree = [
{ name = "wgpu-info" },
]
skip = [
{ name = "wgpu" }
{ name = "wgpu" },
{ name = "fastrand" }
]
wildcards = "deny"

Expand Down
32 changes: 8 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,17 +270,14 @@ jobs:
# Windows
- name: Windows x86_64
os: windows-2022
backends: dx12

# Mac
- name: Mac aarch64
os: [self-hosted, macOS]
backends: vulkan metal

# Linux
- name: Linux x86_64
os: ubuntu-22.04
backends: vulkan gl

name: Test ${{ matrix.name }}
runs-on: ${{ matrix.os }}
Expand All @@ -294,16 +291,10 @@ jobs:
with:
tool: cargo-nextest,cargo-llvm-cov

- name: install swiftshader
if: matrix.os == 'ubuntu-22.04'
shell: bash
- name: Install Repo MSRV toolchain
run: |
set -e
mkdir -p swiftshader
curl -LsSf https://github.com/gfx-rs/ci-build/releases/latest/download/swiftshader-linux-x86_64.tar.xz | tar -xf - -C swiftshader
echo "VK_ICD_FILENAMES=$PWD/swiftshader/vk_swiftshader_icd.json" >> $GITHUB_ENV
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal
cargo -V
- name: install llvmpipe, vulkan sdk
if: matrix.os == 'ubuntu-22.04'
Expand All @@ -317,8 +308,10 @@ jobs:
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt-get update
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev vulkan-sdk
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev vulkan-sdk mesa-vulkan-drivers
- name: disable debug
shell: bash
Expand All @@ -334,22 +327,12 @@ jobs:
with:
key: test-${{ matrix.os }}-${{ env.CACHE_SUFFIX }}

- name: run wgpu-info
shell: bash
run: |
set -e
cargo llvm-cov --no-cfg-coverage run --bin wgpu-info --no-report --features vulkan-portability
- name: run tests
shell: bash
run: |
set -e
for backend in ${{ matrix.backends }}; do
echo "======= NATIVE TESTS $backend ======";
WGPU_BACKEND=$backend cargo llvm-cov --no-cfg-coverage nextest --no-fail-fast --no-report --features vulkan-portability
done
cargo xtask test --llvm-cov
- uses: actions/upload-artifact@v3
if: always() # We want artifacts even if the tests fail.
Expand Down Expand Up @@ -421,6 +404,7 @@ jobs:
- name: run rustfmt
run: |
cargo fmt -- --check
cargo fmt --manifest-path xtask/Cargo.toml -- --check
check-cts-runner:
name: Clippy cts_runner
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ cts/

# Readme says to put angle in working directory
*.dll

# Cached GPU config
.gpuconfig
Loading

0 comments on commit 543f921

Please sign in to comment.