vello/.github/workflows/ci.yml
Raph Levien 1f6b47bd78 Quiet warnings
Fixes the warnings remaining in the code, which should in turn let us check that in CI.

Also checks the optional features, which are easy enough to break.
2023-05-18 15:40:40 -07:00

46 lines
1.4 KiB
YAML

on:
push:
branches:
- main
pull_request:
jobs:
rustfmt:
runs-on: ubuntu-latest
name: cargo fmt
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --all --check
compiles:
runs-on: ubuntu-latest
name: Check workspace compile
steps:
- uses: actions/checkout@v2
- 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
- run: cargo check --features=hot_reload,buffer_labels
# --exclude with_bevy # for when bevy has an outdated wgpu version
# -Dwarnings # for when we have fixed unused code warnings
wasm:
runs-on: ubuntu-latest
name: Ensure with_winit compiles on WASM
steps:
- uses: actions/checkout@v2
- 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