CI: cache Android SDK/NDK, Gradle, and npm across APK builds

Persist three Docker volumes into the build job (android-sdk, gradle home, npm
cache) and enable the Gradle build cache, so repeat builds skip the ~2GB NDK
download, Maven dependency resolution, and unchanged native/Kotlin compilation
— cutting builds from ~1h to a few minutes after the first run.

The runner must whitelist these volumes via config.yaml (container.valid_volumes);
deploy-runner.sh now writes that config, pre-creates the volumes, and starts the
daemon with --config. Requires re-running deploy-runner.sh on the runner host
before the next tag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hank 2026-07-08 16:26:06 +00:00
parent 1ca2c38fbf
commit 3583c2e15f
5 changed files with 89 additions and 12 deletions

View file

@ -11,6 +11,9 @@ services:
- "${DOCKER_GID:-988}"
volumes:
- ./data:/data
# config.yaml allows the build workflow to mount the persistent cache
# volumes (valid_volumes); without it those mounts are rejected.
- ./config.yaml:/data/config.yaml:ro
# Runner spawns job containers via the host Docker daemon.
- /var/run/docker.sock:/var/run/docker.sock
env_file: .env
@ -31,4 +34,4 @@ services:
--name "${RUNNER_NAME:-camptickets-runner}" \
--labels "docker:docker://node:22-bookworm"
fi
exec forgejo-runner daemon
exec forgejo-runner daemon --config /data/config.yaml