name: vm-nightly # Builds the `vmTests` flake output: tests that boot NixOS VMs and need KVM. # They are not `checks`, so the per-PR `nix flake check` job never runs them. # Nightly plus manual dispatch; a failing test fails its job, which the forge # shows as a failed scheduled run. # # One job per test. The runner kills a job after its `jobTimeout` (one hour by # default) and reports nothing for it, so a stuck test in a shared job would # erase the others' results. Each test's `globalTimeout` stays below that hour. # # The matrix list is static: a matrix built from a `needs` output needs # Forgejo 14 and a matching runner, and this runner is gitea-actions-runner. # `scripts/check-vm-test-list.sh` fails CI when the list differs from # `nix/vm-tests.nix`. # # Run one by hand from the forge UI (Actions, vm-nightly, "Run workflow", # `test` input) or locally with `nix build .#vmTests.x86_64-linux.`. # With `test` set, every other matrix job skips its steps and ends green. # # ⚠️ The hour is deliberate: at the default job capacity of 1 # (`services.hyperhive.deploy.ci-runner.concurrency`) the matrix jobs run one # after another and hold the runner until the last ends; everything else # queues behind them. It sits between coverage (02:00) and flake-update (03:00). # # Separate from ci.yml because a `workflow_dispatch` trigger there fires every # job in that file, and this must not run per pull request. on: workflow_dispatch: inputs: test: description: "vmTests attribute to build (empty builds all)" type: string required: false default: "" schedule: - cron: "30 2 * * *" jobs: vm-test: name: vm test ${{ matrix.test }} if: vars.PUBLIC_FORGE != 'true' runs-on: ${{ vars.PUBLIC_FORGE == 'true' && 'nixos' || 'hive-ci' }} strategy: fail-fast: false matrix: test: - agent-ephemeral-rootfs - hive-squid - hive-egress-antispoof - swarm-archive - swarm-builder-offline - full-setup - semi-spread steps: - uses: actions/checkout@v3 if: inputs.test == '' || inputs.test == matrix.test - name: build if: inputs.test == '' || inputs.test == matrix.test env: TEST: ${{ matrix.test }} run: nix build --no-link --print-build-logs ".#vmTests.x86_64-linux.$TEST"