test: use [serial] on GPU related test cases #470
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Format | |
run: cargo fmt --all -- --check | |
- name: Clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# refer to https://vulkan.lunarg.com/doc/view/latest/linux/getting_started_ubuntu.html | |
- name: (linux) install vulkan sdk | |
if: runner.os == 'Linux' | |
shell: bash | |
run: | | |
set -e | |
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc | |
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list | |
sudo apt update | |
sudo apt install vulkan-sdk | |
# Install OpenGL drivers | |
sudo apt install mesa-vulkan-drivers | |
# Refer to https://github.com/gfx-rs/wgpu/issues/5086 | |
sudo apt install vulkan-validationlayers | |
- name: Run tests | |
run: RUST_TEST_THREADS=1 cargo test --workspace |