android-ci: echo the artifact digests and the deflated native-lib sizes
Some checks failed
android-ci / android (pull_request) Failing after 9m52s
Some checks failed
android-ci / android (pull_request) Failing after 9m52s
Run 412 (PR #113) proved the cuprated APK builds and carries the daemon, but the log only ever printed `sha256sum -c ...: OK` — neither digest — and `unzip -l`, which shows the uncompressed size of every .so and not the deflated one the download pays for. Both are what a reader of the run needs to identify the artifact, and neither can be recovered from the tree afterwards. Also fills the two remaining cells of CUPRATE_DAEMON.md's CI-cost table from that run (APK 34,445,514 B / AAR 15,728,039 B, 11m12s job, 5.6 G target volume), and records that the first feature-on build is the 44-minute one while later builds settle at +2 minutes over the feature-off baseline.
This commit is contained in:
parent
8626da225b
commit
294cedfbff
2 changed files with 43 additions and 22 deletions
|
|
@ -174,6 +174,12 @@ jobs:
|
||||||
echo "=== unzip lib ==="
|
echo "=== unzip lib ==="
|
||||||
unzip -l "$apk" | grep -E 'lib/.+\.so' || true
|
unzip -l "$apk" | grep -E 'lib/.+\.so' || true
|
||||||
unzip -l "$apk" | grep "lib/$abi/libonionwire_sdk.so"
|
unzip -l "$apk" | grep "lib/$abi/libonionwire_sdk.so"
|
||||||
|
# `unzip -l` shows the uncompressed size only; the *deflated* entry is
|
||||||
|
# what the download actually costs, and it is not visible anywhere else
|
||||||
|
# (v0.7.0's SDK lib was 33,481,336 B raw / 12,210,154 B deflated, which
|
||||||
|
# is the ratio a reader wants when this one grows).
|
||||||
|
echo "=== native lib entries (length / method / deflated) ==="
|
||||||
|
unzip -v "$apk" | grep -E 'lib/.+\.so$'
|
||||||
echo "=== in-process chain daemon (cuprate-daemon) is IN this APK ==="
|
echo "=== in-process chain daemon (cuprate-daemon) is IN this APK ==="
|
||||||
# The build log's "features=cuprate-daemon" line says the feature was
|
# The build log's "features=cuprate-daemon" line says the feature was
|
||||||
# *requested*; this says it is *in the artifact*. `target_max_memory` is
|
# *requested*; this says it is *in the artifact*. `target_max_memory` is
|
||||||
|
|
@ -197,6 +203,11 @@ jobs:
|
||||||
echo "=== classes.dex + Compose entrypoints ==="
|
echo "=== classes.dex + Compose entrypoints ==="
|
||||||
unzip -l "$apk" | grep -E 'classes[0-9]*\.dex' | head -n3
|
unzip -l "$apk" | grep -E 'classes[0-9]*\.dex' | head -n3
|
||||||
echo "=== sha256 ==="
|
echo "=== sha256 ==="
|
||||||
|
# `sha256sum -c` proves each artifact matches the digest the build
|
||||||
|
# recorded, but prints neither number. The digest *is* the artifact's
|
||||||
|
# identity, and an APK is not byte-reproducible across machines, so it
|
||||||
|
# cannot be derived from the tree afterwards — echo both.
|
||||||
|
cat "dist/onionwire-$version-android-$abi.apk.sha256" "dist/onionwire-sdk-$version.aar.sha256"
|
||||||
( cd dist && sha256sum -c "onionwire-$version-android-$abi.apk.sha256" "onionwire-sdk-$version.aar.sha256" )
|
( cd dist && sha256sum -c "onionwire-$version-android-$abi.apk.sha256" "onionwire-sdk-$version.aar.sha256" )
|
||||||
echo "=== apksigner (expect debug cert: this is a verification build) ==="
|
echo "=== apksigner (expect debug cert: this is a verification build) ==="
|
||||||
apksigner verify --print-certs "$apk" | sed -n '1,6p'
|
apksigner verify --print-certs "$apk" | sed -n '1,6p'
|
||||||
|
|
|
||||||
|
|
@ -149,31 +149,41 @@ above is the other half of the proof — request and artifact, separately checka
|
||||||
|
|
||||||
## What it costs in CI
|
## What it costs in CI
|
||||||
|
|
||||||
The Android job runs on the `docker-amd64` runner with `CARGO_BUILD_JOBS=1` and a
|
The Android job runs on the `docker-amd64` runner (it is **not** the Raspberry Pi
|
||||||
warm named volume at `/cargo-target` (it is **not** the Raspberry Pi runner), so
|
runner) with `CARGO_BUILD_JOBS=1` and a warm named volume at `/cargo-target`, so
|
||||||
the numbers below are one runner, one volume, built twice: once with the feature
|
the numbers below are one runner and one volume: `main` with the feature off, and
|
||||||
off (the current `main` build, run 402) and once with it on (run 406, this branch).
|
the feature on. There are two feature-on regimes, and the second is the one a PR
|
||||||
|
author feels — the first build after the feature lands compiles the whole cuprated
|
||||||
|
graph, every later build is incremental against the same volume.
|
||||||
|
|
||||||
| | feature off — `main` 773dacb, run 402 | feature on — this branch, run 406 |
|
| | feature off — `main` 773dacb, run 402 | feature on — PR #113 head 3860c3d (merged as 8626da2), run 412 |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| Gradle | `BUILD SUCCESSFUL in 6m 10s` | `BUILD SUCCESSFUL in 44m 7s` |
|
| Gradle | `BUILD SUCCESSFUL in 6m 10s` | `BUILD SUCCESSFUL in 7m 14s` |
|
||||||
| job wall clock | 484 s for the build step | 47m 45s job (20:10:02 → 20:57:46) |
|
| job | 8m 21s | 11m 12s |
|
||||||
| `/cargo-target` **before** the build | 3.1 G | 3.3 G |
|
| build step | 484 s | 653 s |
|
||||||
|
| `/cargo-target` | 3.1 G before the build | 5.6 G after (2.7 G of it `aarch64-linux-android/release`) |
|
||||||
| `libonionwire_sdk.so` in the APK | 33,533,264 B | 55,438,112 B |
|
| `libonionwire_sdk.so` in the APK | 33,533,264 B | 55,438,112 B |
|
||||||
| `librandomx_rs-<hash>.so` | absent | 1,122,296 B |
|
| `librandomx_rs-<hash>.so` | absent | 1,122,296 B |
|
||||||
| APK / AAR | 28,038,401 B / 10,377,416 B | see PR #113 |
|
| APK | 28,038,401 B | 34,445,514 B |
|
||||||
|
| AAR | 10,377,416 B | 15,728,039 B |
|
||||||
|
|
||||||
The feature multiplies the Gradle build by roughly **7×** (~6 min → ~44 min): the
|
The **first** feature-on build is the expensive one: run 406, against a volume that
|
||||||
cuprated graph is ~152 crates plus a C++ RandomX cross-build, and the runner has a
|
did not yet hold the cuprated graph, took `BUILD SUCCESSFUL in 44m 7s` and a
|
||||||
single cargo job. What it does *not* blow is anything else: the job's
|
47m 44s job — the ~152-crate graph plus the C++ RandomX cross-build, with a single
|
||||||
`timeout-minutes` is 120, so 44 minutes fits with room to spare, and the extra
|
cargo job on the runner. After that it settles to roughly **+2 minutes over the
|
||||||
target-directory volume is a gigabyte-scale number, not a partition. **No
|
feature-off build** (7m 14s vs 6m 10s), because only this repo's own crates
|
||||||
mitigation was needed** — the feature stays on the release path, and the job was
|
recompile.
|
||||||
not made slower or conditional to accommodate it.
|
|
||||||
|
|
||||||
`android-ci.yml` prints `du -sh /cargo-target` after the build and the workflow
|
Nothing needed mitigating: the job's `timeout-minutes` is 120, so even the 44-minute
|
||||||
echoes `build_wall_clock_seconds`, so the next person changing this graph reads
|
first build fits with room to spare, and the volume grows to 5.6 G on a runner
|
||||||
the cost from the run log instead of re-deriving it.
|
filesystem with 37 G free (the `df -h` in the run log). The feature is **not** gated
|
||||||
|
on a build variant, a label or a manual dispatch — the release path builds exactly
|
||||||
|
what CI verifies.
|
||||||
|
|
||||||
|
`android-ci.yml` prints `du -sh /cargo-target`, the length/method/deflated size of
|
||||||
|
every native lib, and both artifact digests, and the workflow echoes
|
||||||
|
`build_wall_clock_seconds`: the next person changing this graph reads the cost and
|
||||||
|
the artifact's identity out of the run log rather than re-deriving either.
|
||||||
|
|
||||||
## Not verified
|
## Not verified
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue