Files
gridcraft/.github/workflows/ci.yml
T
kulveersingh bc3aab900f fonts: embed craft-fonts' Indian-script faces; the web build draws Indian text
ui-egui's build.rs reads the optional craft-fonts input (CRAFT_FONTS_DIR,
per craft-fonts' docs/integration.md) and embeds the Noto Sans faces for
the nine Indian scripts (Deva, Beng, Guru, Gujr, Orya, Taml, Telu, Knda,
Mlym; ~5 MB) on every target. The theme appends them after the system
faces, so desktop rendering is unchanged where a system face exists and
the web build, which has no system fonts, draws and shapes Indian text.
Language::script() names each interface's script; the web build follows
the browser's language when the build can render it.

CI checks the embedded faces against a pinned craft-fonts commit (the
Noto Sans Indian faces, storytold/craft-fonts#21): they draw and shape
every script with no system face, and the web build compiles with them.
FreeBSD and release workflows pin the same commit. A plain build is
unchanged (empty table, same tests pass).
2026-10-12 02:08:04 -04:00

67 lines
2.3 KiB
YAML

# The AGENTS.md quality gate (`cargo xtask ci`: fmt, clippy -D warnings, tests, assets, layers,
# wasm, parity --check) on every pull request and every push to main, so a merge burst can't land
# a red tree that only the next agent session discovers.
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
gate:
name: cargo xtask ci
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Linux build dependencies (winit, wgpu, rfd)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcursor-dev libxrandr-dev \
libxi-dev libgtk-3-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
run: cargo xtask ci
# The optional craft-fonts build input (CRAFT_FONTS_DIR): the Indian-script faces the web build
# embeds. The gate above runs without it; this checks the embedded faces draw and shape Indian
# text with no system faces, and that the web build compiles with them.
- name: Check out craft-fonts
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: storytold/craft-fonts
ref: d47f68570a43b364afcd832d00c297a9edea6932
path: craft-fonts
- name: Embedded craft-fonts faces
env:
CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts
CRAFT_FONTS_REQUIRED: "1"
run: |
cargo test -p gridcraft-ui-egui --lib theme::
cargo check --target wasm32-unknown-unknown -p gridcraft-web