1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# CI gate for skillpack (design ยง7.4): fmt + clippy + full test suite on every
# PR; no PR merges without green CI.
#
# Matrix: ubuntu, macos, windows โ verifies cross-OS compile + PATHEXT
# resolution on Windows (cmd.exe appends PATHEXT; Rust's Command does not;
# which_on_path probes name{ext} manually). Runtime prereqs (node, python,
# go, ruby) installed via the official setup-* actions so each OS gets a
# working runtime without hand-rolled apt/choco/brew logic.
#
# `--include-ignored` runs the Go + Ruby `#[ignore]`-gated round trips
# because the runners ship those runtimes (the dev machine does not). Each
# ignored test self-skips via a runtime probe, so a missing runtime
# anywhere degrades the same way it does locally rather than failing.
name: CI
on:
push:
branches:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check:
strategy:
fail-fast: false
matrix:
os:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# Install the exact toolchain pinned in rust-toolchain.toml so CI's
# fmt/clippy are byte-identical to local โ a newer stable's fmt collapse
# rule can't pass one place and fail the other. `rust-toolchain.toml` is
# the single source of truth; this input must match its `channel` field.
- uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.95.0'
components: 'rustfmt,clippy'
- uses: Swatinem/rust-cache@v2
# Runtime prereqs โ one setup-* action per language, each works across
# all three OSes. The Go + Ruby installs let the `#[ignore]`-gated
# round-trip tests actually execute rather than self-skip.
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: fmt --check
run: cargo fmt --check
- name: clippy --all-targets
run: cargo clippy --all-targets -- -D warnings
- name: test (incl. ignored runtime round trips)
run: cargo test --all-targets -- --include-ignored