name: CI
env:
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
on:
push:
branches: ["**"]
pull_request:
jobs:
rust:
name: Rust checks (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Install audio, D-Bus, and gamepad headers
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libudev-dev libdbus-1-dev
- name: Formatting
run: cargo fmt --all -- --check
- name: Strict Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Tests
run: cargo test --workspace --all-targets
- name: Documentation tests
run: cargo test --workspace --doc
- name: API reference builds without broken links
run: cargo doc --workspace --no-deps
env:
RUSTDOCFLAGS: -D warnings
shaders:
name: Shader compilation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install glslc
run: sudo apt-get update && sudo apt-get install -y glslc
- name: Compile every shader file
run: ./scripts/check_shaders.sh