The checks action exports it through GITHUB_ENV, which depends on the runner handing a composite action's environment file on to the later steps of the job. If a runner did not, Cargo would silently go back to its built-in git client, which cannot use the deploy key's IdentityFile, and fail with a confusing authentication error in the first cargo command. The workflow-level env does not depend on that, so both are set; the access check step still exercises the key, the host key and the ssh configuration through git. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
14 KiB
CI
GitHub Actions runs .github/workflows/ci.yml, including Linux checks,
Windows and Android Clippy, and TeamSpeak integration smoke tests. Automatic
runs are off: CI, the dependency audit and fuzzing run only by hand
(Actions → the workflow → Run workflow; the same on Gitea). Only the package
builds run by themselves, on v* tags, and they run none of these checks.
Both GitHub and Gitea provide release packaging; see release.md
and building.md.
Cargo builds use one job in CI (ci.yml) so the generated UI library and
its test target do not compile concurrently. GitHub's release workflow uses
one job too, also inside its Flatpak build: on its 16 GB runners the UI
library does not fit next to other crates, and the runner is killed. The
Gitea release workflow, its Docker images and the Flatpak manifest itself
use Cargo's defaults (one job per CPU, no incremental builds in release
mode). The release profile uses ThinLTO and
16 codegen units instead of fat LTO and one unit, reducing peak compiler
memory while retaining optimised builds and panic unwinding. This trades some
whole-program optimisation for lower build-memory requirements; release
runtime performance has not been benchmarked for this change.
Gitea Actions
.gitea/workflows/ci.yml runs a single Linux job when dispatched by hand
(automatic runs on pushes and pull requests are off).
The job runs:
- formatting and warnings-as-errors Clippy for our crates;
- workspace Clippy (vendored warnings are reported, compilation errors fail);
- a locked workspace all-targets build and workspace tests under Xvfb;
- cargo-deny 0.20.2 workspace policy checks and the cargo-about 0.9.2 notices check;
- offline regression tests of the Gitea draft-release uploader.
The workspace tests are not disabled. Xvfb supplies the display for X11
capture and hotkey tests. This is Linux CI, not parity with every GitHub job:
it does not run Windows/Android checks, Docker-based TeamSpeak smoke tests,
opt-in browser interop, or package builds. Gitea release packaging runs in
the separate release.yml workflow below.
Runner setup
-
Enable Actions on the Gitea instance and in the repository settings.
-
Register an x86_64 Linux
act_runnerwith a Docker-capable host and this label (the left side must match the workflow'sruns-on):ubuntu-24.04:docker://ghcr.io/catthehacker/ubuntu:act-24.04Configure this in the runner's labels when registering/configuring it; an
ubuntu-latestlabel alone does not match. The job image must provide Bash, Git, the OpenSSH client, Node.js for checkout v4, and root or passwordless sudo for apt. -
Allow network access from the runner and job container to the Gitea instance, GitHub (checkout action, dependencies and RustSec advisories), GHCR (runner image), Ubuntu apt mirrors, rustup distribution servers, crates.io and dependency/license sources used by cargo-about. The workspace also depends on the private VoelinProtocol repository (
voelin-identity, over SSH), so the job needs read access to it and the server's SSH port. The workflows set that up themselves from a repository secret: VoelinProtocol access. A runner needs nothing for it beyond the network access and the image tools above. -
Provision enough RAM, swap and free disk for a full Slint workspace build plus cargo-deny/cargo-about compilation. These are large builds; monitor the first run and size the runner accordingly. The workflow limits Cargo to one build job, disables incremental compilation, and reuses build outputs between steps in one job. It does not create swap or modify the Gitea host.
-
The workflow requests a three-hour job timeout. Legacy
act_runnerversions ignoretimeout-minutes; configure their runner-level limit in the runner configuration instead:runner: timeout: 3hNewer
gitea-runner(2.0+) supports the workflow-level timeout. Check the installed runner's configuration rather than assuming the YAML timeout is enforced. The Gitea server also stops any task running longer thanENDLESS_TASK_TIMEOUT(default3h,[actions]inapp.ini), whatever the runner or the workflow say; raise it above the longest job (see the release runner below).
The workflow shares the repository's local system-dependencies action with
GitHub CI and bootstraps rustup if absent, then installs the toolchain and
components pinned in rust-toolchain.toml. Checkout uses a fully qualified
GitHub action URL rather than depending on the instance's action-source
configuration.
No GitHub cache/artifact service or reusable-workflow support is required. The job does not need a Docker socket mounted inside its container; the runner itself still needs Docker access to start that container. Keep this runner isolated from production services and credentials, particularly when accepting untrusted pull requests. CI needs one secret, the VoelinProtocol deploy key below; it needs no release signing or publishing secrets.
After registering the runner, dispatch CI in Gitea Actions and inspect all step results. Local YAML/shell checks do not prove that a particular Gitea instance, runner registration, network policy or resource allocation can complete this job.
VoelinProtocol access
The workspace depends on voelin-identity from the private repository
Voelin/VoelinProtocol, as a git dependency over SSH
(building.md). Cargo resolves the
whole workspace before it builds anything, so every cargo command needs
that access: all of CI, all three package images and the gateway image (whose
crate does not use voelin-identity itself). Without it the first cargo
command fails with unknown SSH host key (runs 1037 and 1050 did).
What is set up:
-
The deploy key. A read-only SSH deploy key is registered on
Voelin/VoelinProtocol(Settings → Deploy Keys, write access off). It has no other use and no access to any other repository. Its private half is the repository secretVOELIN_PROTOCOL_DEPLOY_KEYofVoelin/VoelinClient(Settings → Actions → Secrets): the whole OpenSSH private key file, BEGIN and END lines included, without a passphrase. To rotate it, make a new pair (ssh-keygen -t ed25519 -N '' -C voelin-client-ci -f key), registerkey.pubon VoelinProtocol, replace the secret with the contents ofkey, run CI, then delete the old deploy key andkey. -
CI (
ci.yml). The workflow hands the secret to the checks action as its inputprotocol-deploy-key(a repository secret is not visible inside a composite action). The action's first step fails at once, naming the secret, if the input is empty or is not a private key. Otherwise it writes the key to~/.ssh/voelin_protocol(mode 0600,~/.ssh0700), appends the host key line to~/.ssh/known_hosts, writes aHost git.faumaray.comblock to~/.ssh/config(User gitea, thatIdentityFile,IdentitiesOnly yes,StrictHostKeyChecking yes) and exportsCARGO_NET_GIT_FETCH_WITH_CLI=trueandGIT_SSH_COMMANDfor the rest of the job (ci.ymlsets the first one in its ownenvas well). It prints only the key's public fingerprint; the key is never echoed. After the system packages a second step runsgit ls-remoteon VoelinProtocol, so a wrong key or host key fails there, with the reason, and not inside a cargo command. The key lives in the job container and goes with it. -
Release (
release.yml). A step after checkout starts anssh-agenton the release host, loads the key into it from stdin (it is never written to disk) and exportsSSH_AUTH_SOCK; the agent forgets the key after nine hours, and a last step, which also runs after a failure, stops it. The builds pass the agent on withdocker build --ssh default(scripts/docker-build.shdoes it for the three packages; the gateway image step does it itself). -
The images. Each cargo
RUNofdocker/*.Dockerfileandcrates/voelin-gateway/Dockerfilehas--mount=type=ssh,required=true, so the key exists only inside that step, through the agent socket, and never reaches a layer, a build argument or the cache; a build without--sshstops there withunset ssh forward key default. The build stage copies.gitea/known_hoststo/etc/ssh/ssh_known_hostsand sets the sameCARGO_NET_GIT_FETCH_WITH_CLI=true; the toolchain stages installgitandopenssh-client. -
Cargo uses the system git (
CARGO_NET_GIT_FETCH_WITH_CLI=true) because Cargo's built-in git client does not read~/.ssh/config(so it cannot use anIdentityFile), authenticates with an ssh-agent and checks the host against~/.ssh/known_hostsand its ownnet.ssh.known-hostssetting. The system git runsssh, which reads the config above (and/etc/ssh/ssh_known_hostsin the images), so the same files serve a plaingitcall, Cargo and the access check. -
The host key is committed in
.gitea/known_hosts, never fetched while a job runs. Gitea's built-in SSH server (SSH-2.0-Go) offers an RSA host key only (ssh-keyscan -t ed25519 git.faumaray.comprints nothing), so the line isssh-rsa; its fingerprint isSHA256:fugBYnqAnqmTLsGpafVgQF9gPQzJqps7uHvs48blg2A. Re-check it:ssh-keygen -lf .gitea/known_hosts # the committed line ssh-keyscan -t rsa git.faumaray.com | ssh-keygen -lf - # what the server offers nowBoth print the fingerprint above. If the server's key is ever replaced on purpose, confirm the new fingerprint with the server's administrator, put the new
ssh-keyscan -t rsaline and the date in.gitea/known_hostsand the fingerprint here, and commit all of it in one change. Until then a changed key makes every job stop withHost key verification failed, which is the point.
Pull requests from forks get no secrets: their CI run stops at the first step with the message about the empty deploy key. Anyone who can change a workflow of this repository, or run code in one of its jobs, can read the key; it can only read VoelinProtocol, and it is replaced as above. That is one more reason to keep the CI runner isolated, as said above.
If a run fails here:
| Message | Cause |
|---|---|
The VoelinProtocol deploy key is empty |
the secret is missing, empty or not visible (a fork's pull request) |
… is not an unencrypted OpenSSH or PEM private key |
the secret holds something else, or a key with a passphrase |
Permission denied (publickey) in "Check read access to VoelinProtocol" |
the key is valid but is not a deploy key of VoelinProtocol: compare the fingerprint "Deploy key installed" printed with the one in VoelinProtocol's deploy key settings |
Host key verification failed |
.gitea/known_hosts does not match the server: check as above before changing anything |
unset ssh forward key default |
a Docker build ran without --ssh default: a plain docker build (scripts/docker-build.sh passes it itself and stops earlier when the agent has no key) |
Gitea release runner
The instance at https://git.faumaray.ru reported Gitea 1.25.4 on
2026-10-04. Release publishing uses its REST API; artifact upload uses the
pinned Gitea artifact-action fork, not stock GitHub upload-artifact v4.
Register a separate repository-scoped, x86_64 Ubuntu 24.04 native host runner with the label:
voelin-release:host
Provision Bash, Git, the OpenSSH client (ssh-agent and ssh-add), Node.js
20+, Python 3.11+, curl, tar, gzip and rootful Docker 23+ with BuildKit. Use act_runner 0.2.7 or newer (prefer the latest
maintained release), or gitea-runner 2+. Older act_runner does not provide
ACTIONS_RESULTS_URL, which the pinned artifact action needs. Register the
runner against https://git.faumaray.ru, reachable from both the host and
build containers. Gitea 1.25.4 provides the required artifact-v4 API.
The shared checks install native build dependencies
through root or passwordless sudo and bootstrap Rust. Docker builds install
Windows cross-toolchains, Android SDK/NDK and Java themselves; no Windows
runner or preinstalled Android SDK is needed. The Flatpak builder runs a
privileged container using the same Freedesktop 25.08 image as GitHub.
Allow network access to the existing CI sources, Flathub, Google's Android
downloads/Maven, Chromium's libvpx git server, Docker Hub, GHCR and the
gateway image's distroless base at GCR. Configure Gitea release attachment
types/size limits and reverse-proxy upload limits for the APKs, Flatpak and
gateway image; artifact and release storage must fit the full package set.
This host is not the container runner used for pull requests. Restrict it
to this repository's trusted release workflow, protect v* tags, and only
dispatch trusted branches. Do not advertise this label on an instance-wide
runner that untrusted repositories or PR workflows can select. Docker and
Flatpak privileges effectively grant host access. Use an isolated machine
with no production services or credentials.
Configure one release runner, with capacity 1, so runs do not race:
runner:
capacity: 1
timeout: 8h
The workflow requests eight hours; older act_runner ignores job-level timeouts, so the runner limit is required. The server's own limit must allow it too, or Gitea stops the release after three hours:
[actions]
ENDLESS_TASK_TIMEOUT = 9h
Keep sufficient RAM/swap and free disk for all package builds and their
Docker caches. The package builds run one after another, each with as many
Cargo jobs as the host has CPUs. The workflow never prunes shared Docker
state or creates host swap. The secrets are the VoelinProtocol deploy key
(below), RELEASE_TOKEN and the optional Android
signing secrets, both documented in
Gitea releases.
The Gitea release job builds packages only: it runs no formatting, Clippy, tests, native Windows, Android Clippy or TS3/TS6 smoke tests; run CI by hand for those. Full hosted builds and a draft upload must be verified on the registered runner; local shell/API fixtures do not establish deployment acceptance.