mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-24 18:26:50 -06:00
Only path-filtered workflows run on pull requests today, so most PRs land without a test run. Port of the wordcraft#800 workflow: Linux, standard GitHub-hosted runner, read-only token, no secrets, craft-fonts pinned to the release.yml commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
68 lines
2.1 KiB
YAML
68 lines
2.1 KiB
YAML
# The CLAUDE.md quality gate (`cargo xtask ci`: fmt, clippy -D warnings, tests, assets, layers,
|
|
# wasm) on every pull request and every push to main. Today only path-filtered workflows run on
|
|
# pull requests, so most PRs land with no test run at all.
|
|
#
|
|
# Ported from wordcraft#800. Linux only; standard GitHub-hosted runner, no secrets.
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
env:
|
|
# Same craft-fonts commit as release.yml, so the font tests see what a release build embeds.
|
|
CRAFT_FONTS_REF: abb83316d96aa59c1cf64784289e378fe9fa5695
|
|
|
|
jobs:
|
|
gate:
|
|
name: cargo xtask ci
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 90
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: "0"
|
|
RUST_BACKTRACE: "1"
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Check out craft-fonts
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: storytold/craft-fonts
|
|
ref: ${{ env.CRAFT_FONTS_REF }}
|
|
path: craft-fonts
|
|
persist-credentials: false
|
|
|
|
- name: Install Linux build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcb1-dev libxcursor-dev \
|
|
libxrandr-dev libxi-dev libfontconfig1-dev libfreetype-dev mesa-vulkan-drivers
|
|
|
|
- name: Install Rust (stable + clippy, rustfmt, wasm32)
|
|
run: |
|
|
rustup toolchain install stable --profile minimal --component clippy,rustfmt \
|
|
--target wasm32-unknown-unknown
|
|
rustup default stable
|
|
|
|
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
with:
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
|
|
- name: Quality gate
|
|
env:
|
|
CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts
|
|
run: cargo xtask ci
|