The production Wasm optimizer dominated the old run (about 10 of 13 minutes). Main/PR builds now produce the development Wasm bundle, while the optimized bundle and desktop fat jar are built only for release tags. Merge test and build into one job so a checkout and a Gradle run are not repeated, and bake the Gradle dependency cache plus the Android SDK into the CI image. Raise the version of the image to 2.
This commit is contained in:
1 parent
3281e46104
commit
7fb41b5ad4
5 files changed
+60
-29
No files matched your search
@@ -43,6 +43,21 @@ RUN mkdir -p "$ANDROID_HOME/cmdline-tools" \
|
||||
"build-tools;35.0.0" \
|
||||
&& rm -rf "$ANDROID_HOME/.temp" "$ANDROID_HOME/.downloadIntermediates"
|
||||
|
||||
# Warm the Gradle dependency cache and the Kotlin/Wasm (node, yarn, binaryen)
|
||||
# toolchain so CI jobs do not download them on every run. Rebuild this image
|
||||
# when dependencies change.
|
||||
COPY . /warmup
|
||||
WORKDIR /warmup
|
||||
# Only warm dependencies and the common/Android/desktop compilers here. The
|
||||
# Wasm executable build is memory hungry; the web job downloads node/yarn itself.
|
||||
RUN sed -i 's/kotlin.daemon.jvmargs=-Xmx3g/kotlin.daemon.jvmargs=-Xmx2g/' gradle.properties \
|
||||
&& gradle --no-daemon --max-workers=2 \
|
||||
:composeApp:desktopTest \
|
||||
:composeApp:assembleDebug \
|
||||
:composeApp:compileKotlinWasmJs \
|
||||
--console=plain \
|
||||
&& rm -rf /warmup
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
CMD ["sleep", "infinity"]
|
||||
Reference in new issue
Block a user