Files
lightcraft/.github/workflows/ci.yml
T
Matthew James SivakandClaude Opus 5.5 5690afe51a Gap 9: cargo xtask ci on every PR (Linux x64); ci --quick; one local ci at a time
- .github/workflows/ci.yml: the full `cargo xtask ci` on every pull request and push to main
  (Linux x64, craft-fonts, rust-cache for dependencies), so it becomes the merge gate.
- `cargo xtask ci --quick [--base REF]`: fmt, clippy, the changed packages' tests, layers and
  assets, plus heif / parity / wasm when the changes touch them, measured against the merge base
  with origin/main (xtask/src/ci_quick.rs). Workspace-wide files test everything.
- A machine-wide lock (xtask/src/ci_lock.rs): a second `ci`, from another worktree, waits and
  names the run it waits for. LIGHTCRAFT_CI_SLOTS=N, LIGHTCRAFT_CI_LOCK=off|<dir>.
- README, CLAUDE.md quality gate, gaps.md gap 9, target-app-parity.md stability note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:59:30 +02:00

70 lines
2.6 KiB
YAML

# The quality gate (`cargo xtask ci`: fmt, clippy, heif, tests, parity, layers, assets, wasm) on
# every pull request and every push to main, so the full run happens here rather than on the
# machine of everyone with a branch open. Locally, `cargo xtask ci --quick` checks what a branch's
# changes can break in a few minutes; this job is the merge gate.
#
# Linux only: macOS / Windows test jobs are #1148. Standard GitHub-hosted runner (free for public
# repositories), never a larger one.
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
# a fresh build every run: incremental state is only overhead, and it bloats the cache
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
# one job per runner: the machine-wide CI lock (xtask/src/ci_lock.rs) has nothing to wait for
LIGHTCRAFT_CI_LOCK: "off"
jobs:
xtask-ci:
name: cargo xtask ci (Linux x86_64)
runs-on: ubuntu-latest
timeout-minutes: 90
env:
CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts
CRAFT_FONTS_REQUIRED: "1"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# the font build input, so the Japanese and Chinese font tests run (they skip without it)
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: storytold/craft-fonts
ref: 3d9ab3a132ed0eff457e424226a435a901da30d3 # as freebsd.yml; bump deliberately
path: craft-fonts
persist-credentials: false
- name: Install system libraries
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev
- uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable
with:
components: rustfmt, clippy
targets: wasm32-unknown-unknown
# dependencies only (rust-cache drops the workspace's own artifacts), saved from main and
# restored by pull requests
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
key: ci
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: cargo xtask ci
run: cargo xtask ci
- name: Job summary
if: ${{ !cancelled() }}
run: cat target/ci/summary.md >> "$GITHUB_STEP_SUMMARY" || true