ci: target Gitea Ubuntu and native Apple Silicon runners
iOS validation / simulator (push) Failing after 3s
Android validation / emulator (35) (push) Failing after 9s
Android validation / emulator (37.0) (push) Failing after 9s
Android validation / build (push) Successful in 3m40s

Move workflows into Gitea's workflow directory and use the supplied ubuntu-latest and macos-arm64 labels. Provision the Android SDK, require KVM without changing host permissions, support SHA-256 checkout and Gitea artifact uploads, and isolate scratch output on persistent runners. Skip untrusted fork PRs and keep release builds unsigned because Gitea ignores GitHub environment approval gates. Local workflow lint, repository invariants, ten preflight regressions, eight evidence-verifier tests, inline shell checks, scratch cleanup and SHA-256 fetch checks pass; remote runner execution remains unverified.
This commit is contained in:
Yuvomi Mobile Contributors committed 2026-10-21 07:40:19 +02:00
1 parent 2d12491516
commit 11bf4ca620
16 files changed
+442 -192

No files matched your search

+80
View File
@@ -0,0 +1,80 @@
# Gitea CI runners
Workflows live in `.gitea/workflows/` for `git.nesterovic.cc`. Enable repository
Actions in Gitea settings. Scheduling uses the labels supplied by the maintainer:
| Job | `runs-on` | Eligible runners |
| --- | --- | --- |
| Android builds, JVM/lint checks | `ubuntu-latest` | `ubuntu-runner-1` through `ubuntu-runner-6` |
| Android emulator matrix (API 35 / 37.0) | `ubuntu-latest` | Same Ubuntu pool, with KVM access |
| Manual unsigned Android release build | `ubuntu-latest` | Same Ubuntu pool |
| iOS simulator, XCTest and unsigned archive | `macos-arm64` | `macos-m4pro` |
Runner names are informational; Gitea matches labels. The Mac's additional
`macos` label is not needed. No `self-hosted` label is requested because it is not
present in the supplied configuration. No runner registration or host settings
are changed by these workflows.
## Ubuntu prerequisites
The job environment must be Linux x86_64 with Bash, Git (SHA-256 capable), curl,
unzip, Python 3 and the shared libraries needed by the Android SDK/emulator and
Node's native build tools. Use a maintained Ubuntu runner image with compiler,
make, SQLite build prerequisites and emulator runtime libraries available. The
pinned setup actions provision Temurin 17, Android SDK packages and Node 22 for
the upstream fixture. SDK installation accepts the Android SDK licenses.
Emulator jobs require virtualization and readable/writable `/dev/kvm` **inside
the job environment**. For container-backed runners, the administrator must pass
the device through (for example `--device=/dev/kvm`) and configure group access.
VM hosts need nested virtualization. The preflight fails with a clear message
instead of attempting privileged host changes or silently using slow emulation.
All runners sharing `ubuntu-latest` must meet these prerequisites. Run each
emulator job in its own container; if using host execution, do not share an ADB
server/AVD directory with simultaneous jobs on that host.
## Apple Silicon prerequisites
Map `macos-arm64` to native host execution on the M4 Pro (not a Linux container or
Rosetta shell). Use a dedicated unprivileged CI account with Bash, SHA-256-capable Git, curl,
unzip and Python 3 available to the runner service's PATH. Install/select full
Xcode 16.4+ (or a current release supporting this project), accept its license and
complete first-launch setup. Install an iOS 18.4+ simulator runtime and create an
available iPhone simulator; `select-simulator.py` chooses the newest eligible one.
XcodeGen's pinned, checksum-verified binary includes native arm64 and x86_64
slices; Rosetta/Homebrew installation is not required by the workflow. Build,
archive and Swift package scratch outputs use `RUNNER_TEMP`. Scratch directories
and the upstream clone are uniquely allocated per job and removed after artifact
upload to avoid collisions and buildup on persistent hosts. No Apple signing
credentials are required or provisioned. Avoid concurrent native jobs on the same
Mac user/simulator; configure runner capacity accordingly.
## Forge compatibility and security
- External actions use explicit HTTPS hosts and full commit pins. The Node 20
Gitea-compatible artifact action uses the v3 protocol, not GitHub's v4 backend.
- Checkout sets `GIT_DEFAULT_HASH=sha256` for this repository and does not persist
its token. Upstream remains a separate, unmodified SHA-1 clone.
- Fork pull requests are skipped on these private runners. Same-repository PRs,
pushes and manual runs are trusted code: restrict repository write access,
require review, isolate runner accounts and keep unrelated credentials away.
Do not enable `pull_request_target` to bypass this restriction.
- Gitea ignores GitHub `environment` approval gates. Consequently the manual
release workflow only emits **unsigned** APK/AAB files and never loads signing
secrets or publishes. Signing remains an owner-controlled external operation.
Local checks for workflow changes:
```sh
python3 scripts/check-repository.py
python3 scripts/test-ci-runner.py
python3 scripts/test-verifier.py
python3 scripts/lint-workflows.py /path/to/actionlint
bash -n scripts/check-ci-runner.sh
```
The actionlint adapter normalizes Gitea's absolute action URLs only for parsing;
repository checks validate the actual hosts, pins, checkout settings and labels.
These checks do not prove a remote job ran. Inspect the first Gitea Actions runs
and their artifacts before claiming hosted Android or Apple-platform validation.
+4 -2
View File
@@ -73,5 +73,7 @@ validation must happen on macOS with Xcode and real supported devices.
5. Establish private vulnerability reporting, owned identifiers, authorized CI,
human security review and owner-controlled signing before any distribution.
The provided GitHub Actions workflows do not automatically execute on the current
non-GitHub forge. Do not claim hosted CI or store readiness without actual runs.
Gitea workflows in `.gitea/workflows/` target the maintainer's `ubuntu-latest`
pool and `macos-arm64` M4 Pro runner. Read [runner setup](ci-runners.md) before
changing their labels or signing policy. Hosted CI and store readiness still
require actual successful runs; runner registration alone is not test evidence.
+14 -17
View File
@@ -23,19 +23,16 @@ to either store. A debug APK or unsigned archive is not a production release.
## Android
The manual `release.yml` workflow uses a protected GitHub environment named
`release`. Configure branch restrictions and required reviewers before adding
secrets. With `sign_android=false` it emits unsigned artifacts. Signing requires:
The manual `.gitea/workflows/release.yml` workflow runs on `ubuntu-latest` and
emits **unsigned** artifacts only. Gitea ignores GitHub environment approval gates,
so this workflow does not load signing secrets or offer a signing toggle.
- `ANDROID_KEYSTORE_BASE64`
- `ANDROID_STORE_PASSWORD`
- `ANDROID_KEY_PASSWORD`
- `ANDROID_KEY_ALIAS`
The workflow uses `zipalign`, `apksigner`, and `jarsigner`; private material exists
only in a restrictive runner-temporary file removed on exit. Securely back up the
real upload key and use Play App Signing according to the owner's policy. No
production key is generated here. Manually verify APK/AAB signatures and inspect
An authorized maintainer must separately sign the verified APK/AAB using their
own keystore, alias and passwords with `zipalign`, `apksigner`, and `jarsigner`.
Keep private material in a protected signing environment, never on the general
validation runners. Securely back up the real upload key and use Play App Signing
according to the owner's policy. No production key is generated here.
Manually verify APK/AAB signatures and inspect
the final manifest: no debuggable flag, HTTP/test CA or unintended exported component.
Never distribute an `.integration` package or include its generated test resources.
Run `python3 scripts/collect-android-artifacts.py` immediately after the clean-source
@@ -65,8 +62,8 @@ privacy need physical-device validation beyond simulator tests.
## CI hosting
GitHub Actions files are provided, but the configured community remote is hosted
on a different forge. GitHub workflows will not automatically run there. Enable
an authorized GitHub mirror/repository (or port the jobs to the forge's runner)
and inspect real runs before claiming CI is operational. No destination is
created automatically. CI service availability is not an application dependency.
Gitea Actions workflows are provided in `.gitea/workflows/`, using the supplied
`ubuntu-latest` and `macos-arm64` runner labels. See [runner setup](ci-runners.md)
for SDK, KVM, Xcode, simulator and security requirements. Repository Actions must
be enabled. Inspect actual runs before claiming CI is operational; no GitHub
mirror or store destination is created. CI is not an application dependency.
+14 -1
View File
@@ -121,10 +121,23 @@ is available; no iOS build/archive/UI result is claimed.
Also run minimum-supported API 26 and a current OS/WebView device matrix.
- VoiceOver/TalkBack, large text, contrast, keyboard/safe areas, reduced motion,
light/dark appearance and responsive web modules on actual supported devices.
- Operational CI runs on an authorized GitHub repository/runner, private security
- Successful CI runs on the configured Gitea runners, private security
reporting contact, human security review, store ownership and production signing.
No Firebase/APNs registration, closed-app push, offline editing, App Store approval,
signing, publication or physical-device validation is claimed. See `SECURITY.md`
and `docs/security-review.md` for residual limitations.
Resume work using [maintainer continuation](continuation.md).
## Gitea runner adaptation
Workflows now live in `.gitea/workflows/` and target the supplied `ubuntu-latest`
pool and native `macos-arm64` M4 Pro runner. Local workflow grammar lint (Gitea URL
syntax normalized), repository invariants, shell/Python syntax, ten mocked runner
preflight regressions and eight evidence-verifier regressions pass. SHA-256 Git
initialization/fetch was exercised locally; the pinned XcodeGen archive's checksum
and native arm64 slice were verified. These are not remote runner execution or
Apple SDK results. See [runner requirements](ci-runners.md); the local emulator
preflight currently rejects unavailable/inaccessible KVM as designed. Original
application build evidence above remains historical and is not a rebuild of the
workflow-only changes.