[#743, #716, #744, #745, #746, #747] Engagement migration bundle: scaffold + Hunt/Flee/Devour/Sleep/Harvest #904
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main, "feature/**"] | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # Fast linker for CI. .cargo/config.toml is gitignored (contains | |
| # per-machine absolute target-dir), so linker flags live here instead. | |
| RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=mold" | |
| jobs: | |
| rust: | |
| name: Rust (fmt · test · clippy) | |
| runs-on: ubicloud-standard-8 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Matches the rust-toolchain.toml pin so CI behaves like local dev. | |
| # dtolnay/rust-toolchain falls back to the most recent nightly that | |
| # actually has rustfmt + clippy when today's nightly is missing | |
| # either component. | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| # Cache key includes the profile so the ci profile gets its | |
| # own cache (separate from any local-dev profile artifacts). | |
| key: ci-profile | |
| - name: Install Bevy system deps + mold + clang | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| libasound2-dev \ | |
| libudev-dev \ | |
| libwayland-dev \ | |
| libxkbcommon-dev \ | |
| mold \ | |
| clang | |
| - name: Install nextest | |
| uses: taiki-e/install-action@nextest | |
| # fmt first — fail fast on trivial issues, costs ~5s. | |
| - name: fmt | |
| run: cargo fmt --all -- --check | |
| # Test before clippy: nextest does the full codegen + link, then | |
| # clippy reuses those artifacts instead of recompiling workspace | |
| # crates from metadata. Without this reorder, workspace code | |
| # gets compiled twice. | |
| - name: test | |
| run: cargo nextest run --cargo-profile ci | |
| - name: clippy | |
| run: cargo clippy --profile ci --all-targets -- -D warnings |