The only runner is gitea-runner-ci-sapphira, running on the same 2-core / 5.6 GiB host as ~20 production services. Evaluating all seven configurations took 40+ minutes and pushed the host into swap. - checks.sh is invoked with --no-build, so check #2 (full nix flake check, every host) no longer runs in push CI - only .#nixosConfigurations.sapphira is evaluated: a broken sapphira is an immediate CI-runner outage; other hosts are verified explicitly per change - workflow_dispatch added, timeout 45 -> 20 min, and concurrency group cancels superseded runs instead of queueing them on the same host Docs: AGENTS checks section, project-state test-runner row, T39 notes.
49 lines
2.1 KiB
YAML
49 lines
2.1 KiB
YAML
name: nixos flake checks
|
|
|
|
# Lives under .gitea/workflows/ because the only remote of this repo is
|
|
# gitea@git.zeroq.su (no GitHub remote), and Gitea Actions reads
|
|
# .gitea/workflows/ in preference to .github/workflows/. The copy that used
|
|
# to sit under .github/workflows/ therefore never ran a single step.
|
|
# See .agent/tasks/manifest.md T39.
|
|
|
|
on:
|
|
push:
|
|
branches: [main, dev, master]
|
|
pull_request:
|
|
branches: [main, dev, master]
|
|
workflow_dispatch:
|
|
|
|
# The only runner is the host itself: gitea-runner-ci-sapphira on a 2-core /
|
|
# 5.6 GiB machine that also runs ~20 production services. Evaluating all seven
|
|
# configurations costs 40+ minutes and pushes the host into swap, so queueing
|
|
# superseded runs is actively harmful — cancel them.
|
|
concurrency:
|
|
group: nix-checks-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
invariant-checks:
|
|
runs-on: ubuntu-latest
|
|
# sapphira evaluation is a few minutes on an idle host. This is a
|
|
# hung-evaluation guard, not a budget; the job used to allow 45.
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v27
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- name: install sops
|
|
run: nix profile install nixpkgs#sops
|
|
- name: run invariant checks (no full flake check)
|
|
# `--no-build` skips check #2 (`nix flake check`), which evaluates
|
|
# every host output. The runner *is* sapphira, so that sweep is both
|
|
# slow and self-harming here. It can still be run deliberately on a
|
|
# beefier machine, or locally with `bash .ci/checks.sh`.
|
|
run: bash .ci/checks.sh --no-build
|
|
# Only sapphira is evaluated on CI: it is the host this runner lives on,
|
|
# so a broken sapphira is an immediate CI-runner outage. Changes that
|
|
# touch another host must be verified explicitly for that host:
|
|
# nix build --no-link --dry-run .#nixosConfigurations.<host>.config.system.build.toplevel
|
|
- name: evaluate the sapphira configuration
|
|
run: nix build --no-link --dry-run .#nixosConfigurations.sapphira.config.system.build.toplevel
|