1 parent
9c305f2a4d
commit
7e2d4ddba1
19 files changed
+901
-26
No files matched your search
@@ -30,6 +30,13 @@ signed with a debug key (fine for testing, not for the Play Store).
|
||||
The gateway's image can also be built directly:
|
||||
`docker build -f crates/voelin-gateway/Dockerfile -t tsgw .`.
|
||||
|
||||
Gitea at [git.faumaray.ru](https://git.faumaray.ru) builds the same package
|
||||
types through `.gitea/workflows/release.yml`: manual runs produce one
|
||||
`voelin-packages` artifact; `v*` tag pushes also attach the packages to a
|
||||
draft release. Windows packages there use MinGW rather than MSVC. See
|
||||
[Gitea releases](release.md#gitea-releases) for signing and publishing,
|
||||
and [runner setup](ci.md#gitea-release-runner) for host requirements.
|
||||
|
||||
## From releases
|
||||
|
||||
`.github/workflows/release.yml` builds every package:
|
||||
@@ -109,3 +116,7 @@ the proxy is on localhost. If the proxy inspects TLS, set
|
||||
- **Android:** [android.md](android.md) (SDK, NDK, cargo-ndk), then
|
||||
`cd android && ./gradlew assembleDebug` and `scripts/package.sh android`.
|
||||
- **Flatpak:** [packaging/README.md](../packaging/README.md#flatpak).
|
||||
On a trusted machine with rootful Docker,
|
||||
`scripts/flatpak-build.sh` writes `dist/flatpak/voelin.flatpak` using the
|
||||
release builder image. It requires a privileged container for Flatpak's
|
||||
nested sandbox; do not use it on an untrusted build host.
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
# CI
|
||||
|
||||
GitHub Actions runs `.github/workflows/ci.yml`, including Linux checks,
|
||||
Windows and Android Clippy, and TeamSpeak integration smoke tests. Both
|
||||
GitHub and Gitea provide release packaging; see [release.md](release.md) and
|
||||
[building.md](building.md).
|
||||
|
||||
Cargo builds use one job in CI so the generated UI library and its test
|
||||
target do not compile concurrently. 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. Flatpak sets
|
||||
the Cargo job limit inside its build sandbox as well. 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 on pushes to `main` and
|
||||
`master`, pull requests, and manual dispatch. Documentation-only changes
|
||||
are excluded; `THIRD_PARTY_NOTICES.md` is not excluded because the app embeds
|
||||
it and CI verifies it.
|
||||
|
||||
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
|
||||
|
||||
1. Enable Actions on the Gitea instance and in the repository settings.
|
||||
2. Register an **x86_64 Linux** `act_runner` with a Docker-capable host and
|
||||
this label (the left side must match the workflow's `runs-on`):
|
||||
|
||||
```text
|
||||
ubuntu-24.04:docker://ghcr.io/catthehacker/ubuntu:act-24.04
|
||||
```
|
||||
|
||||
Configure this in the runner's labels when registering/configuring it;
|
||||
an `ubuntu-latest` label alone does not match. The job image must provide
|
||||
Bash, Git, Node.js for checkout v4, and root or passwordless sudo for apt.
|
||||
3. 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.
|
||||
4. 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.
|
||||
5. The workflow requests a three-hour job timeout. Legacy `act_runner`
|
||||
versions ignore `timeout-minutes`; configure their runner-level limit
|
||||
in the runner configuration instead:
|
||||
|
||||
```yaml
|
||||
runner:
|
||||
timeout: 3h
|
||||
```
|
||||
|
||||
Newer `gitea-runner` (2.0+) supports the workflow-level timeout. Check
|
||||
the installed runner's configuration rather than assuming the YAML
|
||||
timeout is enforced.
|
||||
|
||||
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. No release signing or publishing secrets
|
||||
are needed.
|
||||
|
||||
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.
|
||||
|
||||
### 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:
|
||||
|
||||
```text
|
||||
voelin-release:host
|
||||
```
|
||||
|
||||
Provision Bash, Git, 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:
|
||||
|
||||
```yaml
|
||||
runner:
|
||||
capacity: 1
|
||||
timeout: 8h
|
||||
```
|
||||
|
||||
The workflow requests eight hours; older act_runner ignores job-level
|
||||
timeouts, so the runner limit is required. Keep sufficient RAM/swap and
|
||||
free disk for all package builds and their Docker caches. Builds run
|
||||
sequentially and limit Cargo to one job. The workflow never prunes shared
|
||||
Docker state or creates host swap. The token and optional Android signing
|
||||
secrets are documented in [Gitea releases](release.md#gitea-releases).
|
||||
|
||||
Gitea packages pass the shared Linux checks but do not gain native Windows,
|
||||
Android Clippy or TS3/TS6 smoke-test acceptance from a successful release
|
||||
job. Full hosted builds and a draft upload must be verified on the registered
|
||||
runner; local shell/API fixtures do not establish deployment acceptance.
|
||||
@@ -4,6 +4,52 @@ How a release is versioned, built, signed and checked. The app id
|
||||
`io.github.faumaray.Voelin` ([packaging/README.md](../packaging/README.md))
|
||||
cannot change after the first release on Flathub or Google Play.
|
||||
|
||||
CI resource settings and the Linux Gitea runner setup are documented in
|
||||
[ci.md](ci.md). Release packaging and draft publication run on GitHub and
|
||||
Gitea ([git.faumaray.ru](https://git.faumaray.ru)); runner and credential
|
||||
requirements differ.
|
||||
|
||||
## Gitea releases
|
||||
|
||||
`.gitea/workflows/release.yml` builds Linux tarballs and `.deb` files, Windows
|
||||
zip and NSIS installer (MinGW cross-build), Android debug APK (arm64-v8a and
|
||||
x86_64), a Flatpak bundle, and the gateway container image. It shares Linux
|
||||
checks with Gitea CI, and reuses the Dockerfiles and `scripts/package.sh`.
|
||||
Unlike GitHub's release pipeline, it does not run native Windows tests,
|
||||
Android Clippy, TeamSpeak smoke tests or browser interop; complete those
|
||||
checks in GitHub or separately before accepting a release.
|
||||
|
||||
- **Manual dispatch:** after checks and all builds pass, download the
|
||||
`voelin-packages` artifact from the run. Manual runs never publish a draft,
|
||||
even when dispatched against a tag.
|
||||
- **Push a `v*` tag:** the same artifact is uploaded, then packages and a
|
||||
combined `SHA256SUMS` are attached to a **draft** Gitea release. Review,
|
||||
sign checksums and publish manually, just as on GitHub.
|
||||
|
||||
Set the repository secret `GITEA_RELEASE_TOKEN` to a Gitea personal access
|
||||
token with `write:repository`, limited to this repository where supported.
|
||||
The token's account must be able to write releases. The publishing script
|
||||
uses the runner's `GITHUB_SERVER_URL` and `GITHUB_REPOSITORY`; it requires
|
||||
HTTPS and never uses GitHub's release API. On this instance the server URL
|
||||
is `https://git.faumaray.ru`. No registry credentials are needed: the gateway
|
||||
image is attached as `tsgw-image.tar.gz`, not pushed to an OCI registry.
|
||||
|
||||
Retries update only a matching **draft**, replacing same-named assets.
|
||||
Published releases are not changed; a failed upload leaves a partial draft
|
||||
for retry. Do not publish or modify a draft while the workflow runs. Gitea
|
||||
1.25 ignores workflow concurrency and environment approvals; use the
|
||||
dedicated, serial trusted runner described in [ci.md](ci.md#gitea-release-runner).
|
||||
|
||||
For an optional signed Android release APK, set the same four signing secrets
|
||||
listed below. They are written outside the Docker build context with private
|
||||
permissions, passed as BuildKit secrets, and removed on success or failure.
|
||||
Signed builds invalidate the signing stage's cache on every run; changing a
|
||||
key or password cannot return a cached APK signed with the previous key.
|
||||
Without the keystore secret, only the installable debug APK is produced; a
|
||||
partially configured keystore fails the job rather than producing an
|
||||
unsigned release. Windows and Flatpak packages are not code-signed by this
|
||||
workflow.
|
||||
|
||||
## Versioning
|
||||
|
||||
- One version for the apps: `version` of `crates/voelin-ui` (desktop; the
|
||||
|
||||
Reference in new issue
Block a user