Repository navigation
52 lines (48 loc) · 1.57 KB
/
Copy pathci.yml
File metadata and controls
52 lines (48 loc) · 1.57 KB
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
name: CI
# CMake 4 removed compatibility below 3.5. shaderc-sys 0.8 still contains
# third-party CMake files with an older policy declaration.
env:
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
on:
# Branches only: a version tag points at a commit main already checked.
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