77 lines
1.7 KiB
YAML
77 lines
1.7 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
|
|
|
|
- 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 --check
|
|
|
|
- name: Check workspace
|
|
run: cargo check --workspace
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace
|
|
|
|
- name: Clippy foundation crates
|
|
run: cargo clippy -p game -p shared -- -D warnings
|
|
|
|
- name: Test foundation helpers
|
|
run: cargo test -p game --lib
|
|
|
|
- name: Test shared hydration and actor validation
|
|
run: cargo test -p shared
|
|
|
|
- name: Test sim crate
|
|
run: cargo test -p sim
|
|
|
|
- name: Validate level scenes
|
|
run: cargo run -p xtask --bin validate-levels
|
|
|
|
- name: Test scene schema crate
|
|
run: cargo test -p scene
|
|
|
|
- name: Check editor (dev)
|
|
run: cargo check -p editor --features dev
|
|
|
|
- name: Build binaries
|
|
run: |
|
|
cargo build -p game
|
|
cargo build -p editor
|