ci: evaluate only sapphira on the self-hosted runner
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.
This commit is contained in:
1 parent
b7bce546b6
commit
61c5f01b4b
5 files changed
+35
-24
No files matched your search
@@ -160,9 +160,10 @@
|
||||
"2026-10-25T00:10+03:00: T3: посылка опровергнута runtime-дампом nftables на otreca; изменений кода нет.",
|
||||
"2026-10-25T00:10+03:00: T20/T57: manifest.json синхронизирован (T20 completed, T38–T57 внесены), схемы расширены.",
|
||||
"2026-10-25: консолидированы раздробленные attr-path записи в 10 файлах (3xui-reconfig, authelia, gitea-runner settings, grub, logind, pxe-infra.bridge, pipewire.alsa, nix.*, nix.settings, build.activation); найден тройной дубль allowedUDPPorts → T58.",
|
||||
"2026-10-25: sapphira переключена на generation 859 (7h6860ji) — guard в [Unit] на 13/13 юнитов, фантомы удалены, nginx отдаёт lamet→4096; systemctl --failed пуст."
|
||||
"2026-10-25: sapphira переключена на generation 859 (7h6860ji) — guard в [Unit] на 13/13 юнитов, фантомы удалены, nginx отдаёт lamet→4096; systemctl --failed пуст.",
|
||||
"2026-10-25: CI (runner = sapphira) облегчён — checks.sh --no-build + сборка только sapphira; полный 7-хостовый обход снят с push-пайплайна."
|
||||
],
|
||||
"last_updated": "2026-10-25T02:30:00+03:00",
|
||||
"last_updated": "2026-10-25T02:45:00+03:00",
|
||||
"session_chain": {
|
||||
"previous": "metaagent-attempt-2026-10-15T20:25Z (herdr-attach-shim attempt + force-reset на 3d4f1f5, closed; T35 записан в closed_attempts[])",
|
||||
"current": "metaagent-cleanup-2026-10-15T17:42Z (metastate reconcile B+C+A: AGENTS.md dup R1.14, handoff T18/T32 stale, checkpoints↔manifest drift, manifest backlog_count)",
|
||||
|
||||
@@ -121,7 +121,7 @@ Read-only аудит репозитория на техдолг: 233 tracked-ф
|
||||
| Language | Nix |
|
||||
| Framework | NixOS modules + home-manager |
|
||||
| Database | PostgreSQL (sapphira), sqlite (3x-ui) |
|
||||
| Test runner | нет юнит-тестов; `.ci/checks.sh` — 5 проверок (#1 `:latest`, #2 `nix flake check`, #7 sops path_regex, #8 граф импортов, #9 схемы `.agent`). CI починен (T39), но **на удалённом раннере ещё ни разу не выполнялся** |
|
||||
| Test runner | нет юнит-тестов; `.ci/checks.sh` — 5 проверок (#1 `:latest`, #2 `nix flake check`, #7 sops path_regex, #8 граф импортов, #9 схемы `.agent`). CI (Gitea Actions) исполняется **на самой sapphira** (2 ядра / 5.6 GiB) и с 2026-10-25 вызывает `bash .ci/checks.sh --no-build` (check #2 пропущен) + собирает **только** `sapphira`; полный обход 7 хостов уходил в swap на 40+ минут. Другие хосты — вручную: `nix build --no-link --dry-run .#nixosConfigurations.<host>.config.system.build.toplevel` |
|
||||
| Package manager | Nix (flakes) |
|
||||
| Linter/formatter | none |
|
||||
|
||||
|
||||
@@ -730,7 +730,8 @@
|
||||
"ca450f1",
|
||||
"db3cbd0",
|
||||
"0297254"
|
||||
]
|
||||
],
|
||||
"notes": "2026-10-25: CI облегчён — единственный раннер живёт на самой sapphira (2 ядра / 5.6 GiB). Workflow вызывает `bash .ci/checks.sh --no-build` (check #2 `nix flake check` пропущен) и собирает только `sapphira`; добавлены `workflow_dispatch` и `concurrency.cancel-in-progress`, timeout 45→20 мин. Полный обход 7 хостов убран из push-пайплайна: на этой машине он уходил в swap на 40+ минут."
|
||||
},
|
||||
{
|
||||
"id": "T40",
|
||||
|
||||
@@ -11,13 +11,22 @@ on:
|
||||
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
|
||||
# The evaluation steps below walk every host configuration; a hung
|
||||
# evaluation must not hold the runner forever.
|
||||
timeout-minutes: 45
|
||||
# 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
|
||||
@@ -25,19 +34,15 @@ jobs:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: install sops
|
||||
run: nix profile install nixpkgs#sops
|
||||
- name: run invariant checks
|
||||
run: bash .ci/checks.sh
|
||||
# Every step below must be able to fail the job. The previous
|
||||
# revision ended each line with `|| true` and used `--dry-run`,
|
||||
# so the job could never go red. `--dry-run` is kept because the
|
||||
# point of this step is evaluation, not building; `--no-link` keeps
|
||||
# the workspace clean of `result` symlinks.
|
||||
- name: evaluate every host configuration
|
||||
run: |
|
||||
nix build --no-link --dry-run .#nixosConfigurations.default.config.system.build.toplevel
|
||||
nix build --no-link --dry-run .#nixosConfigurations.atoridu.config.system.build.toplevel
|
||||
nix build --no-link --dry-run .#nixosConfigurations.rydiwo.config.system.build.toplevel
|
||||
nix build --no-link --dry-run .#nixosConfigurations.otreca.config.system.build.toplevel
|
||||
nix build --no-link --dry-run .#nixosConfigurations.sapphira.config.system.build.toplevel
|
||||
nix build --no-link --dry-run .#nixosConfigurations.wsl.config.system.build.toplevel
|
||||
nix eval --raw .#nixOnDroidConfigurations.epral.config.system.stateVersion
|
||||
- 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
|
||||
@@ -134,12 +134,16 @@ flake.nix
|
||||
## Проверки
|
||||
|
||||
```bash
|
||||
# все outputs вычисляются
|
||||
# все outputs вычисляются (тяжело: 7 хостов; на sapphira уходит в swap)
|
||||
nix flake check
|
||||
|
||||
# правки применились на целевой хост
|
||||
nix build .#nixosConfigurations.<host>.config.system.build.toplevel
|
||||
|
||||
# CI (Gitea Actions) исполняется на самой sapphira, поэтому облегчён:
|
||||
# `bash .ci/checks.sh --no-build` + сборка только sapphira. Прочие хосты
|
||||
# проверяются вручную командой `nix build --dry-run` выше.
|
||||
|
||||
# nixOnDroid
|
||||
nix build .#nixOnDroidConfigurations.epral.config.system.build.toplevel
|
||||
|
||||
|
||||
Reference in new issue
Block a user