Skip to content

test: share the retired-with-resources fixture #905

test: share the retired-with-resources fixture

test: share the retired-with-resources fixture #905

Workflow file for this run

name: Nix
on:
pull_request:
push:
branches: [main]
# One in-flight run per ref: a push that supersedes an earlier one should not keep
# two ~35m Linux checks and two macOS builds competing for the same runner pool.
concurrency:
group: nix-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Both jobs are named for the flake system they prove, not for the runner that hosts them.
# They are deliberately not the same size — see the comment on the Darwin job.
jobs:
check-x86_64-linux:
runs-on: ubuntu-latest
# A healthy full `nix flake check` baseline is ~35m; 90m provides
# headroom while still failing boundedly.
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/determinate-nix-action@v3
# `nix flake check` rather than `nix build`: it builds the package *and*
# evaluates every `checks.*`, so fmt, clippy, the hermetic test suite, and
# the `--help` smoke test all gate the PR from one entrypoint.
- run: nix flake check --print-build-logs
# st2 drives real processes — process groups, signals, pipes, reaping — and those paths
# are OS behaviour, not portable Rust: #356 and #255 were aarch64-darwin failures no Linux
# run could have caught. The hosted macOS runner is arm64 with 3 cores, so it is also a
# stricter scheduler than any Mac in the fleet, which makes it a good detector for
# load-sensitive lifecycle tests.
#
# Narrower than its Linux sibling on purpose: `nix build .#st2` builds the package and runs
# its hermetic suite via `doCheck` — the surface those issues live on — without also
# demanding cold aarch64-darwin builds of the `pty` and `otelite` inputs that
# `checks.parked-recovery` and `checks.otel-export` pull in. Widen once this is stable.
check-aarch64-darwin:
runs-on: macos-15
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/determinate-nix-action@v3
- run: nix build .#st2 --no-link --print-build-logs