Skip to content

Add showcase presets (Lumen/Aurora/Bloom/Etching) with art defaults on #30

Add showcase presets (Lumen/Aurora/Bloom/Etching) with art defaults on

Add showcase presets (Lumen/Aurora/Bloom/Etching) with art defaults on #30

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [master, dev]
paths-ignore:
- '**.md'
- 'LICENSE'
- 'assets/**'
pull_request:
branches: [master, dev]
paths-ignore:
- '**.md'
- 'LICENSE'
- 'assets/**'
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
hygiene:
name: Hygiene
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check public tree contains no dev-meta paths
shell: bash
run: ./scripts/check_tree_clean.sh
test:
name: Test
needs: hygiene
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Full cross-platform matrix only when promoting dev -> master;
# everything else runs on Linux to keep billable minutes down
# (macOS minutes bill at 10x, Windows at 2x).
os: ${{ (github.event_name == 'pull_request' && github.base_ref == 'master') && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]') || fromJSON('["ubuntu-latest"]') }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install Linux dependencies (GUI + audio)
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libxkbcommon-dev \
libwayland-dev \
libx11-dev libxcursor-dev libxrandr-dev libxi-dev \
libvulkan-dev mesa-vulkan-drivers \
libfontconfig1-dev libfreetype6-dev \
libegl1-mesa-dev \
libasound2-dev
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Run cargo fmt check
if: runner.os == 'Linux'
run: cargo fmt --all -- --check
# Compiling the full GUI stack (iced/wgpu) is expensive; lint it on
# Linux only. Release builds still compile gui on every platform.
- name: Run cargo clippy (all features)
if: runner.os == 'Linux'
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run cargo clippy
if: runner.os != 'Linux'
run: cargo clippy --all-targets -- -D warnings
- name: Run cargo test
run: cargo test --verbose
# Gated feature code (multi-species, audio, gui) is not compiled by the
# default build; run lib tests with all features so refactors cannot
# silently break it. Linux only: deps are installed above and the full
# GUI stack is too expensive to build on the paid runners.
- name: Run cargo test (all features, lib)
if: runner.os == 'Linux'
run: cargo test --all-features --lib
licenses:
name: License Check
needs: hygiene
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check dependency licenses
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check licenses