Blacksite/.github/workflows/ci.yml

81 lines
1.9 KiB
YAML

name: CI
on:
pull_request:
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
WGPU_VALIDATION: "0"
jobs:
verify:
name: Format, lint, test, build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Verify Git LFS checkout
run: git lfs fsck
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
clang \
mold \
pkg-config \
libasound2-dev \
libudev-dev \
libwayland-dev \
libx11-dev \
libxkbcommon-dev \
libxi-dev \
libxcursor-dev \
libxrandr-dev \
libxinerama-dev \
libgl1-mesa-dev \
libvulkan-dev
- name: Install Rust toolchain
run: rustup show
- name: Check formatting
run: cargo fmt --all --check
- name: Check architecture debt ratchet
run: python scripts/codex/architecture_audit.py check
- name: Check workspace
run: cargo check --workspace --all-targets
- name: Clippy workspace
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Test workspace
run: cargo test --workspace
- name: Validate level scenes
run: cargo validate-levels
- name: Validate editor sample pack
run: cargo validate-samples
- name: Assert validation leaves checkout clean
run: |
git diff --exit-code
test -z "$(git ls-files --others --exclude-standard)"
- name: Clippy launch feature matrix
run: cargo clippy -p editor -p game --bins --features dev,hot-reload -- -D warnings
- name: Build binaries
run: |
cargo build -p game
cargo build -p editor