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
65
66
67
name: Test
on:
push:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry and target
uses: Swatinem/rust-cache@v2
# Language runtimes come from the standard setup actions. Each installs
# into the runner's toolcache, which the runner user owns — so
# `tools install --all` below can `pip install` / `npm install -g` /
# `gem install` with no venv, no GEM_HOME, no npm prefix, and no sudo.
#
# These replaced three hand-rolled shell steps that worked around the
# *distro* runtimes: PEP 668 blocks pip on Ubuntu's system python, and
# the system gem/npm directories are root-owned. None of that applies to
# a toolcache runtime, so the workarounds were solving a problem the
# platform already solves.
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Build
run: cargo build
# The whole tool matrix, in one registry-driven command. rsconstruct is
# the only thing this workflow installs by name (via `cargo build`
# above); every external tool comes from its own registry, so adding a
# processor never requires touching this file.
#
# Nothing is skipped and nothing is filtered here — `--all` treats a
# tool it cannot install automatically as a hard error rather than a
# warning, so a registry entry that loses its install method fails this
# step instead of quietly shrinking the matrix and surfacing later as a
# confusing test failure.
- name: Install all registry tools
run: ./target/debug/rsconstruct tools install -y --all
# The suite hard-fails on any missing tool (tests never skip), so a
# gap in the matrix fails the run loudly instead of shrinking it.
- name: Run tests
run: cargo test