Skip to content

Commit a2efc91

Browse files
Optimize CI by using a custom Docker container with pre-installed dependencies.
This change introduces a Docker container (`.ci/container/Dockerfile`) that pre-installs: - OpenJDK 8 (ZuluFX), 11, 17, 21, and 25 (Zulu). - Android SDK (command-line tools, platform-tools, build-tools) and NDK dependencies. - Ant, Maven, Python 3. - Codename One binaries (`cn1-binaries`). - Required libraries for headless UI testing (xvfb, libgl1-mesa-dri, libncurses6). Updates `pr.yml`, `ant.yml`, and `scripts-android.yml` to run jobs inside this container (`ghcr.io/codenameone/codenameone/ci-container:latest`), removing redundant setup steps (JDK download, tool installation) to improve build speed and reproducibility. The workflow `.github/workflows/build-container.yml` is added to build and push this container image to GHCR, ensuring the image tag is always lowercase to comply with registry requirements. Also updates `scripts/setup-workspace.sh` to respect the `CN1_BINARIES` environment variable and handle the pre-configured environment correctly.
1 parent 3b5e579 commit a2efc91

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.ci/container/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ RUN git clone --depth=1 https://github.com/codenameone/cn1-binaries /opt/cn1-bin
4949
# Set Environment Variables for JDKs (Paths for apt installed JDKs usually symlinked to /usr/lib/jvm/zulu-XX-amd64)
5050
ENV JAVA8_HOME=/usr/lib/jvm/zulu8-fx
5151
ENV JDK8_HOME=/usr/lib/jvm/zulu8-fx
52-
ENV JAVA11_HOME=/usr/lib/jvm/zulu-11-amd64
53-
ENV JDK11_HOME=/usr/lib/jvm/zulu-11-amd64
54-
ENV JAVA17_HOME=/usr/lib/jvm/zulu-17-amd64
55-
ENV JDK17_HOME=/usr/lib/jvm/zulu-17-amd64
56-
ENV JAVA21_HOME=/usr/lib/jvm/zulu-21-amd64
57-
ENV JDK21_HOME=/usr/lib/jvm/zulu-21-amd64
58-
ENV JAVA25_HOME=/usr/lib/jvm/zulu-25-amd64
59-
ENV JDK25_HOME=/usr/lib/jvm/zulu-25-amd64
52+
ENV JAVA11_HOME=/usr/lib/jvm/zulu11-ca-amd64
53+
ENV JDK11_HOME=/usr/lib/jvm/zulu11-ca-amd64
54+
ENV JAVA17_HOME=/usr/lib/jvm/zulu17-ca-amd64
55+
ENV JDK17_HOME=/usr/lib/jvm/zulu17-ca-amd64
56+
ENV JAVA21_HOME=/usr/lib/jvm/zulu21-ca-amd64
57+
ENV JDK21_HOME=/usr/lib/jvm/zulu21-ca-amd64
58+
ENV JAVA25_HOME=/usr/lib/jvm/zulu25-ca-amd64
59+
ENV JDK25_HOME=/usr/lib/jvm/zulu25-ca-amd64
6060

6161
# Install Android SDK
6262
ENV ANDROID_HOME=/opt/android-sdk

0 commit comments

Comments
 (0)