Commit Graph
2 Commits
Author SHA1 Message Date
dtourolleandClaude Opus 5 da8ad4c1b3 Unpack the Android tools where sdkmanager expects to find them
🚴 Build and Test BikeControl / Android compile check (push) Skipped
🚴 Build and Test BikeControl / Workspace tests (push) Failing after 4m32s
The image had never been built successfully, which is why the registry
has never held it and why every CI run since the workflows landed died
at the pull.

The commandlinetools zip carries a single top-level `cmdline-tools/`.
Unzipping it straight into $ANDROID_HOME therefore lands `bin/` exactly
where `latest/` has to go, and the `mv cmdline-tools/cmdline-tools/*`
that followed matched nothing:

    mv: cannot stat '/opt/android-sdk/cmdline-tools/cmdline-tools/*'

So unpack into /tmp and move that directory into place instead.
sdkmanager derives the SDK root from its own path and refuses to run
from anywhere but cmdline-tools/latest/, so the layout is not cosmetic —
and a `test -x` on it now fails the build here rather than three layers
later, where the error is a licence prompt that never returns.

Verified in the pushed image: node 20.20.2, npm 10.8.2, jq 1.7, JDK 17,
tauri-cli 2.11.4, NDK 27.0.11902837, and all three Android targets.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 22:48:32 +02:00
dtourolleandClaude Opus 5 06b4635470 Build every artifact in a pinned image, not on my laptop
Two builder images, because the jobs genuinely need two distributions:
Ubuntu for the tests, the Linux bundle and the Android APK, and Arch for
the .pkg.tar.zst, since makepkg is Arch-specific. Both are built from
this repo (NFR-12) and pinned by tag in the workflows, so a Dockerfile
change only reaches CI once it has been pushed.

libdbus-1-dev is not incidental in the Ubuntu image: btleplug's Linux
backend is bluez-async over the dbus crate, so without it the workspace
does not build at all.

The per-commit Android job is a cargo check, not an APK. The full signed
build is ~15 minutes and runs only on tags; a one-minute check catches
what actually breaks — the JNI shim, droidplug, and any desktop-only API
that has crept into a shared crate.

Two invariants a compiler cannot see are checked there too, because both
fail silently: the app builds, installs, launches, and finds no trainer.
The JNI symbol in android.rs is matched by the runtime by name, so
renaming the Kotlin package compiles fine and simply never initialises
btleplug; and gen/ must stay untracked or the sync script quietly becomes
optional.

The Android versionCode carries a 1000 floor. `tauri android init` writes
1000 for 0.1.0 today, so anyone holding a locally built APK already has
that number installed, and a bare major/minor/patch code would be 100 —
a downgrade, which Android refuses outright.

The fmt check is advisory for now. The tree predates this workflow and
`cargo fmt --all` currently rewrites ~2000 lines across 28 files; making
it a gate here would mean landing a repo-wide reformat as a side effect
of adding CI. Run fmt in its own commit, then drop the continue-on-error.
The two clippy warnings that stood between the tree and a real
`-D warnings` gate are fixed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 19:52:45 +02:00