-
Notifications
You must be signed in to change notification settings - Fork 136
55 lines (52 loc) · 1.92 KB
/
ci.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
on:
push:
branches:
- main
pull_request:
jobs:
rustfmt:
runs-on: ubuntu-latest
name: cargo fmt
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --all --check
compiles:
runs-on: ubuntu-latest
name: Check workspace compile
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Install native dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- run: cargo check --workspace
# Check vello (the default crate) without the features used by `with_winit` for debugging
- run: cargo check
# Check vello (the default crate) without wgpu
- run: cargo check --no-default-features
# --exclude with_bevy # for when bevy has an outdated wgpu version
# -Dwarnings # for when we have fixed unused code warnings
clippy:
runs-on: ubuntu-latest
name: Enforce clippy lints
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Install native dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- run: cargo clippy --all-targets --workspace -- -D warnings
wasm:
runs-on: ubuntu-latest
name: Ensure with_winit compiles on WASM
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
# cargo-run-wasm does not provide a way to determine that it failed programmatically.
# Ideally, fix this and use:
# - run: cargo run_wasm -- -p with_winit --bin with_winit_bin --build-only
- name: Allow using WebGPU in web_sys
run: |
echo "RUSTFLAGS=--cfg=web_sys_unstable_apis" >> "$GITHUB_ENV"
- run: cargo check -p with_winit --target wasm32-unknown-unknown