perf(ci): use pre-built container image for Android builds
- Add .devcontainer/ci.Dockerfile: bakes Flutter, JDK 17, Android SDK, and flutter precache --android into a single Docker image (~2GB, built once) - ci.yml: build-android uses kryz-ci:latest container — removes 8 redundant SDK download steps (Java 17, Flutter, Android SDK, precache, licenses) that account for ~35-40 min of the 40-min container spin-up time - release.yml: build-android uses kryz-ci:latest container — same reduction from 13 steps to 8. Also fixes hardcoded 'token ***' -> '$GITEA_TOKEN' - devcontainer.json: simplified postCreateCommand (removed venv, pip, claude) and cleaned up invalid JSON (comments, empty mounts array) Estimated impact: 40min -> 5-10min first run (with pre-built image), ~2-3min subsequent runs (Docker layer caching)
This commit is contained in:
1 parent
19fc5642ad
commit
0fc01646ac
3 files changed
+38
-70
No files matched your search
@@ -7,12 +7,9 @@
|
||||
# Lint/test use continue-on-error: true so Magrathea failures don't block.
|
||||
# Android build detects wrong platform and exits 0 gracefully.
|
||||
#
|
||||
# CONTAINER IMAGE: The build-android job uses a pre-built Docker image
|
||||
# (kryz-ci:latest) that includes Flutter, JDK 17, and Android SDK baked in —
|
||||
# eliminating 3-5 GB of downloads per job. Build once on the runner host:
|
||||
# docker build -f .devcontainer/ci.Dockerfile -t kryz-ci:latest .devcontainer
|
||||
#
|
||||
# Estimated impact: 40min -> 5-10min (with pre-built image)
|
||||
# IMPORTANT: $GITHUB_PATH does NOT persist between steps in Gitea Actions/act.
|
||||
# Each step is a separate shell. We export PATH="$PWD/flutter/bin:$PATH" in
|
||||
# every step that uses flutter/dart commands.
|
||||
|
||||
name: CI
|
||||
|
||||
@@ -118,6 +115,10 @@ jobs:
|
||||
|
||||
|
||||
# ── Stage 2: Android build (uses pre-built container image) ──────
|
||||
# The kryz-ci:latest image contains Flutter, JDK 17, Android SDK, and
|
||||
# flutter precache --android baked in — eliminating ~3-5 GB of downloads.
|
||||
# Build once on the runner host:
|
||||
# docker build -f .devcontainer/ci.Dockerfile -t kryz-ci:latest .devcontainer
|
||||
build-android:
|
||||
name: Build Android
|
||||
runs-on: [self-hosted, linux, x64]
|
||||
|
||||
Reference in new issue
Block a user