rsconstruct 0.9.55

Rust based fast build system
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

      - name: Build
        run: cargo build

      # 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'

      # The whole tool matrix, in one registry-driven command. rsconstruct is
      # the only thing this workflow installs by name (via the `cargo build`
      # step); 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 --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