Files
meshcore-open/.gitea/ci/Dockerfile
T
tthandClaude Opus 5.5 3bdb46c815
build / ci-image (push) Successful in 10m38s
build / build (push) Failing after 5m36s
ci: prebuilt CI image with the Android SDK, Gradle and pub cache
Every build started from the bare Flutter image: Gradle installed two
NDKs, build-tools, platform 35 and CMake (~4 min) and resolved all its
dependencies from scratch (assembleRelease 13-17 min).

.gitea/ci/Dockerfile adds those SDK packages, the Android engine
artifacts and node (for JS actions). The ci-image job builds it into the
Docker of the big runner, tagged by the Dockerfile hash, and reuses it
otherwise. actions/cache keeps the Gradle home (with the build cache on)
and the pub cache. The build warns when Gradle still installs an SDK
package, i.e. when upstream moved to a new NDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:11:57 +01:00

36 lines
1.7 KiB
Docker

# CI image for the `build` job (.gitea/workflows/build.yml): the Flutter image
# plus everything the release build used to download on EVERY run - the
# Android SDK packages Gradle auto-installs (two NDKs, build-tools, platform,
# CMake: ~4 min) and Flutter's Android engine artifacts - and node for JS
# actions (actions/cache restores the Gradle and pub caches).
#
# Built by the `ci-image` job, tagged by a hash of this file, into the local
# Docker of the `big` runner; a Renovate bump of either base digest rebuilds
# it. When upstream moves to a different NDK the build still works (Gradle
# installs it), just slower - the "SDK packages" step of the build job warns
# about it, then update the list below.
FROM node:24-trixie-slim@sha256:43b9ba1142b8dcf33fa8f922ca1be85714adc444e0586c7cf7726daaeabc1bea AS node
FROM ghcr.io/cirruslabs/flutter:stable@sha256:46691e311715845de03a3ba4753a475476936805b29431b1f00f1816981033f8
COPY --from=node /usr/local/bin/node /usr/local/bin/node
# Gradle and pub caches at fixed paths: the build job restores/saves exactly
# these with actions/cache (HOME inside a job container is not reliably
# /root, and Gradle takes its home from passwd, not $HOME). Gradle's build
# cache lives in there too, so unchanged plugin modules are not recompiled.
ENV GRADLE_USER_HOME=/ci-cache/gradle \
PUB_CACHE=/ci-cache/pub
RUN mkdir -p "$GRADLE_USER_HOME" "$PUB_CACHE" \
&& echo 'org.gradle.caching=true' >"$GRADLE_USER_HOME/gradle.properties"
RUN yes | sdkmanager --licenses >/dev/null \
&& sdkmanager --install \
"ndk;29.0.14206865" \
"ndk;28.2.13676358" \
"build-tools;35.0.0" \
"platforms;android-35" \
"cmake;3.22.1" \
&& flutter precache --android \
&& node --version && flutter --version