-
Notifications
You must be signed in to change notification settings - Fork 25
62 lines (52 loc) · 2.13 KB
/
rust.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
name: Tests
on: [push]
jobs:
test:
strategy:
fail-fast: false
matrix:
version: ["stable", "1.80.0"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
-
name: Free disk space
if: matrix.os == 'ubuntu-latest'
run: |
sudo docker rmi $(docker image ls -aq) || true
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc || true
- name: Install x11 dependencies for Kludgine
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -y -qq
# vulkan sdk
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
# install dependencies
sudo apt-get update
sudo apt-get install -y \
libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers libdbus-1-dev pkg-config
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.version }}
- name: Run clippy
if: matrix.version == 'stable'
run: |
cargo clippy --all-features --all-targets
- name: Compile with all features
run: |
cargo build --all-features --all-targets
- name: Run all features unit tests
# for msrv, we only check build compatibility, as it's possible bugs are
# fixed purely by updating the rust version.
if: matrix.version == 'stable'
run: |
cargo test --all-features --all-targets -- --nocapture
env:
# When running on Mac OS CI, it's pretty common to not get an adapter
# returned. We don't want errors specifically caused by not being able
# to create a wgpu Adapter to cause unit test failures on CI. Long
# term it would be nice to have a reliable way to run Mac CI with a
# GPU adapter available.
NO_ADAPTER: ${{ matrix.os == 'macos-latest' && 'github-ci' || '' }}