Skip to content

Route editor: module metadata — year and fictional flag #133

Route editor: module metadata — year and fictional flag

Route editor: module metadata — year and fictional flag #133

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
# CI never debugs and never rebuilds twice on one runner: no debuginfo at
# all (the MSVC PDB writer is a large slice of the Windows wall time) and no
# incremental bookkeeping (useless here, bloats the cache by gigabytes).
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_INCREMENTAL: 0
jobs:
# One job per platform. Separate fmt/clippy/doc jobs would compile the whole Bevy
# tree once per job; `clippy --all-targets` already produces what the tests reuse.
check:
name: check (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
# A red run has still built the whole dependency tree; keep that
# work, so the fixed retry starts warm instead of from scratch.
cache-on-failure: true
# Bevy needs ALSA and udev headers to build on Linux.
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libudev-dev
# Formatting and lints are platform independent, so one runner is enough.
- name: Rustfmt
if: runner.os == 'Linux'
run: cargo fmt --all -- --check
- name: Clippy
if: runner.os == 'Linux'
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Test
run: cargo test --workspace --locked