Skip to content

ci: run tests and analysis on self-hosted runners, builds stay on GitHub - #1102

Merged
ZhuchkaTriplesix merged 1 commit into
ci/parallel-test-sectionsfrom
ci/self-hosted-test-runners
Oct 7, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
ci/parallel-test-sectionsfrom
ci/self-hosted-test-runners

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Stacked on #1101 (parallel test sections); retarget to dev once that is merged.

Summary

Tests and static analysis can run on our own Proxmox machine; builds stay on GitHub.

  • ci.yml: the test-sections matrix and analyze choose their runner with
    runs-on: <PR from a fork> ? ubuntu-latest : fromJSON(vars.CI_RUNS_ON || "ubuntu-latest").
    • Pull requests from forks always run on GitHub-hosted runners, never on ours.
    • The repository variable CI_RUNS_ON is the switch: unset = GitHub-hosted (the default today, so merging this changes nothing by itself); ["self-hosted","linux","querya-ci"] = our runners; deleting it switches back without a PR.
    • On self-hosted runners the apt-get step is skipped (packages are installed once on the machine) and flutter test uses --concurrency=2, since four runners share one machine.
    • build-linux-release and all of release.yml (Windows, macOS with signing, Linux packages) are unchanged and stay on GitHub-hosted runners.
  • scripts/ci/setup-runner.sh: idempotent setup for a Debian/Ubuntu VM or LXC: installs the test packages, creates an unprivileged runner user without sudo, registers N runners (querya-ci-1..N, label querya-ci) as systemd services.
  • docs/ci-runners.md (linked from docs/README.md): how the runner is picked, the switch, repository settings, operating notes.

Already done outside this PR

  • Repository setting Fork pull request workflows: Require approval for all external contributors (approval_policy = all_external_contributors).
  • An empty Ubuntu 24.04 LXC querya-ci (8 cores, 16 GiB, 80 GiB, internal network) with this script copied to /root/setup-runner.sh. The runners are not registered yet, so nothing uses them until CI_RUNS_ON is set.

Rollout

  1. Register the runners (scripts/ci/setup-runner.sh inside the container).
  2. Merge this, then gh variable set CI_RUNS_ON --body '["self-hosted","linux","querya-ci"]'.

Tests and analysis pick their runner from the CI_RUNS_ON repository variable
(default ubuntu-latest); pull requests from forks always use GitHub-hosted
runners. Add scripts/ci/setup-runner.sh to prepare a machine and register
runners, and docs/ci-runners.md.
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 65a9812 into ci/parallel-test-sections Oct 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant