Merge pull request 'ci: skip superseded runs, move fuzz to nightly, trim the android PR trigger' (#168) from ci/trim-redundant-runs into main
Some checks failed
ci / test (push) Failing after 47s
ci / sdk (push) Successful in 10s
android-ci / android (push) Successful in 13m36s

Reviewed-on: #168
This commit is contained in:
sirius 2026-09-28 00:42:46 +00:00
commit 06367b2949
4 changed files with 240 additions and 82 deletions

View file

@ -119,15 +119,42 @@ long pole of a release — the Linux binaries land first.
### Android CI (not a release)
`android-ci.yml` runs the same gradle targets on the same amd64 runner for every
PR and `main` push that touches `android/`, `src/`, `crates/`, `Cargo.toml`,
`Cargo.lock` or `scripts/build-android-local.sh`, so an android-only PR is no
longer merged on an empty check list. It signs with the **debug** key
(`ONIONWIRE_REQUIRE_RELEASE_KEY=false`, no keystore) and publishes nothing —
`apksigner` in that job reports the debug cert, which is expected there and
never in `android-release`. It shares `android-release.yml`'s concurrency group
and volumes, so the PR build is warm (~9 min) instead of re-downloading a
gigabyte of SDK/NDK.
`android-ci.yml` runs the same gradle targets on the same amd64 runner, so an
android-only PR is no longer merged on an empty check list. It signs with the
**debug** key (`ONIONWIRE_REQUIRE_RELEASE_KEY=false`, no keystore) and
publishes nothing — `apksigner` in that job reports the debug cert, which is
expected there and never in `android-release`. It shares
`android-release.yml`'s concurrency group and volumes, so the PR build is warm
(~9 min) instead of re-downloading a gigabyte of SDK/NDK.
The two triggers are deliberately **not** the same, because the APK embeds the
root crate as `libonionwire_sdk.so` and a full build costs ~11 minutes:
- **`pull_request`** — `android/**`, `crates/onionwire-sdk/**`, `Cargo.toml`,
`Cargo.lock`, `scripts/build-android-local.sh`. Client and binding-surface
changes get the pre-merge signal.
- **`push: [main]`** — the above plus `src/**` and `crates/**`. Every merge of
a Rust change still runs the full build, including the in-APK checks that
earn their keep (the `target_max_memory` marker gate, the `.so` listing, the
sha256 round-trip). Nothing reaches a release untested; a Rust-only PR finds
out at merge rather than before it.
Both `ci.yml` and `android-ci.yml` open with a **staleness gate**: they compare
`GITHUB_SHA` against the remote branch tip and skip the build if a newer commit
landed while the run sat in the concurrency queue. `cancel-in-progress` is
deliberately `false` on both (cancelling a queued run would let two cargo jobs
share the Pi's target volume, which produces `Permission denied (os error 13)`
on `/target/debug/deps`), so the gate is what removes superseded work. A
`git ls-remote` failure runs the job rather than skipping it.
The `ci / fuzz` job is **not** in `ci.yml` any more — it is
`.forgejo/workflows/fuzz.yml`, `schedule`-only at 03:30 UTC plus
`workflow_dispatch`. A job cannot narrow a workflow-level path filter, so
`fuzz/**` sat beside `src/**` in `ci.yml`'s list and the job ran on nearly
every push (80 of 84 recorded runs touched nothing in `fuzz/`), each paying a
nightly toolchain install and `cargo install cargo-fuzz` for 15 seconds of
fuzzing. Fuzz output is not attached to any PR; check the `fuzz` workflow's
run history for it.
## Rebuilding an existing tag