fix(ci): Android APK build in debian:bookworm sibling container #30

Merged
sirius merged 6 commits from wt/t_87d7245b into main 2026-09-12 13:43:38 +00:00
Owner

Summary

CI Android release on docker-amd64 without apt on EOL node:20-bullseye. Sibling debian:bookworm container (stdin-tar + docker cp). dry_run=true produced a real signed APK.

dry_run evidence

Run: https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/133

  • version=0.1.0 tag=v0.1.0 versionCode=100 dry_run=true (joined latest tag; did not mint 0.1.1)
  • BUILD SUCCESSFUL in 5m 39s (cached); job wall-clock ~8 min (06:37:48Z–06:46:08Z)
  • First full compile (run 113) was 32m45s then died on UniFFI --library path; later cached runs ~6 min
  • apk_bytes=33152896 aar_bytes=7223286 (non-zero)
  • file: Android package (APK)
  • unzip -l: lib/arm64-v8a/libonionwire_sdk.so 24602928 bytes
  • sha256sum -c: onionwire-0.1.0-android-arm64-v8a.apk: OK
  • apksigner verify --print-certs: DN C=US, O=siriusdevops, OU=siriusdevops, CN=OnionWire; SHA-256 c7189a2ac20bdfc07c13ce55cf05a648643733d5e990f393a0f8acce17df6c62
  • aapt: versionCode='100' versionName='0.1.0' ndkVersion:'26' targetSdkVersion:'36'
  • No tag created, no publish (dry_run)
  • Image: debian:bookworm 117MB. docker system df: images 2.665GB, volumes 8.392GB. Overlay used 146G/214G (72%).

Signing

Preferred path: repo-owned PKCS12, Forgejo secrets ANDROID_KEYSTORE_BASE64 / _PASSWORD / ANDROID_KEY_ALIAS / ANDROID_KEY_PASSWORD. Local copy ~/.android/onionwire-release.jks (mode 600) so laptop and CI share the cert. CI sets ONIONWIRE_REQUIRE_RELEASE_KEY=true (fail closed). Not the debug key. Lance should confirm or replace that keystore — I generated it for continuity; backup the JKS.

Version

Zero tags → 0.1.0. Else patch+1 unless the latest tag's release is missing the Android APK, in which case join that tag (core owns tag creation). Never move or delete a tag.

Paths

Sources/Gradle only (android/app/**, android/sdk/**, android/*.gradle.kts, android/gradle/**, android/gradle.properties, android/settings.gradle.kts) plus the local script and this workflow. Not android/README.md.

Scope

Allowed files only on this PR vs main (three-dot): android-release.yml, android/README.md, android/sdk/build.gradle.kts. build-android-local.sh / app signing already on main via #26.

## Summary CI Android release on `docker-amd64` without apt on EOL `node:20-bullseye`. Sibling `debian:bookworm` container (stdin-tar + docker cp). `dry_run=true` produced a real signed APK. ## dry_run evidence Run: https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/133 - `version=0.1.0 tag=v0.1.0 versionCode=100 dry_run=true` (joined latest tag; did not mint 0.1.1) - `BUILD SUCCESSFUL in 5m 39s` (cached); job wall-clock ~8 min (06:37:48Z–06:46:08Z) - First full compile (run 113) was 32m45s then died on UniFFI `--library` path; later cached runs ~6 min - `apk_bytes=33152896` `aar_bytes=7223286` (non-zero) - `file`: Android package (APK) - `unzip -l`: `lib/arm64-v8a/libonionwire_sdk.so` 24602928 bytes - `sha256sum -c`: onionwire-0.1.0-android-arm64-v8a.apk: OK - `apksigner verify --print-certs`: DN `C=US, O=siriusdevops, OU=siriusdevops, CN=OnionWire`; SHA-256 `c7189a2ac20bdfc07c13ce55cf05a648643733d5e990f393a0f8acce17df6c62` - `aapt`: `versionCode='100' versionName='0.1.0'` `ndkVersion:'26'` `targetSdkVersion:'36'` - No tag created, no publish (`dry_run`) - Image: `debian:bookworm` 117MB. `docker system df`: images 2.665GB, volumes 8.392GB. Overlay used 146G/214G (72%). ## Signing **Preferred path:** repo-owned PKCS12, Forgejo secrets `ANDROID_KEYSTORE_BASE64` / `_PASSWORD` / `ANDROID_KEY_ALIAS` / `ANDROID_KEY_PASSWORD`. Local copy `~/.android/onionwire-release.jks` (mode 600) so laptop and CI share the cert. CI sets `ONIONWIRE_REQUIRE_RELEASE_KEY=true` (fail closed). Not the debug key. **Lance should confirm or replace that keystore** — I generated it for continuity; backup the JKS. ## Version Zero tags → 0.1.0. Else patch+1 **unless** the latest tag's release is missing the Android APK, in which case **join** that tag (core owns tag creation). Never move or delete a tag. ## Paths Sources/Gradle only (`android/app/**`, `android/sdk/**`, `android/*.gradle.kts`, `android/gradle/**`, `android/gradle.properties`, `android/settings.gradle.kts`) plus the local script and this workflow. **Not** `android/README.md`. ## Scope Allowed files only on this PR vs main (three-dot): android-release.yml, android/README.md, android/sdk/build.gradle.kts. `build-android-local.sh` / app signing already on main via #26.
fix(ci): use debian:bookworm for the Android sibling container
All checks were successful
ci / test (pull_request) Successful in 3m0s
87ab0d2869
eclipse-temurin:17-jdk-bookworm is not a published tag (manifest unknown).
debian:bookworm is current and has openjdk-17.
fix(ci): join latest tag when its release lacks the APK
All checks were successful
ci / test (pull_request) Successful in 2m45s
1e6a4c12b2
Core owns tag creation. If vN exists and the release is missing the
Android APK, attach there instead of minting N+1. Never delete tags.
Path filter is sources/Gradle only — README edits do not publish.
fix(android): point UniFFI --library at CARGO_TARGET_DIR
All checks were successful
ci / test (pull_request) Successful in 2m51s
53ba1e857f
CI sets CARGO_TARGET_DIR=/cargo-target. Bindgen still looked at
crates/onionwire-sdk/target/release/libonionwire_sdk.so and died ENOENT
after a green host compile.
fix(ci): new android-release concurrency group so dry_run can queue
All checks were successful
ci / test (pull_request) Successful in 2m46s
c90c59146d
fix(ci): do not fail the Android verify pipe on SIGPIPE from head
All checks were successful
ci / test (pull_request) Successful in 2m44s
63abd8eaf2
BUILD SUCCESSFUL produced a 33MB arm64 APK; pipefail + aapt|head then
exited 141 and dropped the artifacts before docker cp.
sirius merged commit 2b2ad573c0 into main 2026-09-12 13:43:38 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/onionwire!30
No description provided.