Repository navigation
ci(android): build on hosted runners - #396
juliusknorr wants to merge 2 commits into
Conversation
chrip
left a comment
There was a problem hiding this comment.
Request changes. The limits fit everyday builds, but they would kill the runs that rebuild the third-party libraries, and the manual run that fills the remote cache is one of them.
The timeout and the retry work as described. The retry only runs when timeout exits with 124, so a real compile error still fails the job right away. I compared the limits with the Android jobs of the last two days, and everyday builds fit, though with little room: this PR's own arm64 run spent 54.6 minutes in the bake step, 5 minutes under the new 60-minute limit.
issue (blocking): Builds that compile the third-party libraries take longer than 90 minutes.
.github/workflows/build-android.yml:28 and :106. The last manual run (2026-11-05) is the only kind of run that uploads missing third-party builds, and it spent 119 minutes in the bake step on both legs. The run for #296 on 2026-11-19 passed after 152 minutes (arm64) and 86 minutes (x86_64), and V8 alone took 132 and 74 of those minutes. With this change, the manual run can no longer fill the cache after the next V8 or toolchain bump, so every Android check would time out, and main requires those checks. Please give workflow_dispatch runs a much higher limit, for example timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 360 || 90 }}, and the same switch for the bake limit. A PR that changes a third-party recipe will also need that manual run before its Android check can pass, which is worth a line in the comment.
nitpick (non-blocking): 90 minutes leaves 10 minutes for everything outside the bake step. Restore ccache alone took 10 minutes once (run 44315476604), and a retry would then be cut off. 100 is safer.
nitpick (non-blocking): Without -k, timeout waits for docker buildx bake to exit after the TERM signal. If the hung client ignores that signal, the retry never starts. timeout -k 2m "$1" makes sure it does.
Assisted-by: ClaudeCode:claude-opus-5-5
371b9fd to
ca5f7b6
Compare
ca5f7b6 to
485c87d
Compare
|
Thanks, and sorry for the delay. Reworked: Android now builds on hosted runners. The timeout and retry are gone, since |
DmySyz
left a comment
There was a problem hiding this comment.
On issue:
Rebase onto main and drop the retry. The export it re-runs no longer exists. If a retry is still wanted, it would need to cover the
docker cppart too.
And a note to consider:
Size the job limit for third-party rebuilds. Keep a job-level
timeout-minutesas the safety net: a hung job otherwise holds a self-hosted runner for 4 to 6 hours. But make it long enough for a full V8 rebuild in both kinds of runs. For example,${{ github.event_name == 'workflow_dispatch' && 360 || 240 }}. Or keep the short limit and document that a recipe-bump PR needs a maintainer to merge it with that check red. chrip's 100-minute nit applies to whatever the everyday limit is.
Android legs built in 8-10 minutes but waited 1-4 hours for one of the five organisation runners. The build no longer needs them: third-party builds come from the remote cache and ccache from the Actions cache. A private copy keeps them, as it has no free hosted minutes. Signed-off-by: Julius Knorr <jus@bitgrid.net> Assisted-by: ClaudeCode:claude-opus-5-5 No-test: CI configuration, proven by this PR's own run
The slowest legitimate runs, third-party rebuilds, took up to 2 hours. A stalled export used to hold the job for the 6 hour default. Signed-off-by: Julius Knorr <jus@bitgrid.net> Assisted-by: ClaudeCode:claude-opus-5-5 No-test: CI configuration
485c87d to
fae99af
Compare
|
Thanks! Rebased onto main; the retry was already gone (the build uses |
chrip
left a comment
There was a problem hiding this comment.
Approve. Looks good from my side, though I'd still give the manual run more time (below). Please wait for DmySyz's re-review before merging, since their change request still blocks the merge.
My earlier review:
- Third-party rebuilds take longer than the limit: partly fixed. 180 minutes covers every run I measured on the organisation runners, but with little room (below).
- 100 instead of 90 minutes, and
timeout -k: no longer apply ✓, since the timeout wrapper and the retry are gone.
Earlier comments:
- DmySyz: drop the retry: addressed ✓
- DmySyz: size the limit for a full V8 rebuild (360 for manual runs, 240 otherwise): partly, it is now 180 for all runs.
issue: 180 minutes leaves little room for a third-party rebuild, and the comment's "up to 2 h" is too low.
.github/workflows/build-android.yml:27-29. The run for #296 on 2026-11-19 took 155 minutes on the organisation runners (arm64 leg, run 44355576860), and that runner built V8 with 7 parallel jobs. Nobody has timed a rebuild on the hosted runners yet, as your description says. If one takes longer than 180 minutes, the manual run can no longer fill the remote cache, and the required Android checks keep timing out until someone raises the limit. Manual runs are rare, so giving them GitHub's 6-hour maximum costs little:
timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 360 || 180 }}Please also change the comment to "up to 2.5 h".
question: Is the Free disk space step needed?
.github/workflows/build-android.yml:50-55. It took 2 to 3 of the 9 minutes on this PR's legs, and df still showed 116 GB free afterwards. If the build fits without it, dropping it (or running it only on manual runs) saves those minutes on every Android run.
Assisted-by: ClaudeCode:claude-opus-5-5
Android legs built in 8-10 min but waited 1-4 h for one of the five organisation runners. The build no longer needs them: third-party builds come from the remote cache, ccache from the Actions cache.
ubuntu-latest; a private copy keepsself-hosted(same expression as ci: let a private copy of this repository run safely #408)mainalready avoids the stalled export withdocker cpTests: actionlint; this PR's own run is the trial on hosted runners. Not measured yet: a full third-party rebuild (manual run) on hosted runners.