diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b7f08dd6..1aca2a503 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - java: [jdk11, jdk17, jdk18, jdk21, graalvm] + java: [jdk11, jdk17, jdk21, jdk22, graalvm] fail-fast: false steps: - name: Check out the repository @@ -22,9 +22,9 @@ jobs: - name: Test in Linux JDK 17 (LTS) if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk17' run: docker compose -f docker/Linux-JDK17/compose.yml up --build --exit-code-from cantaloupe - - name: Test in Linux JDK 18 - if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk18' - run: docker compose -f docker/Linux-JDK18/docker-compose.yml up --build --exit-code-from cantaloupe + - name: Test in Linux JDK 22 (non-LTS) + if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk22' + run: docker compose -f docker/Linux-JDK22/docker-compose.yml up --build --exit-code-from cantaloupe - name: Test in Linux JDK 21 (LTS) if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk21' run: docker compose -f docker/Linux-JDK21/compose.yml up --build --exit-code-from cantaloupe @@ -37,9 +37,9 @@ jobs: - name: Test in Windows JDK 17 (LTS) if: matrix.os == 'windows-latest' && matrix.java == 'jdk17' run: docker compose -f docker/Windows-JDK17/compose.yml up --build --exit-code-from cantaloupe - - name: Test in Windows JDK 18 - if: matrix.os == 'windows-latest' && matrix.java == 'jdk18' - run: docker compose -f docker/Windows-JDK18/docker-compose.yml up --build --exit-code-from cantaloupe + - name: Test in Windows JDK 22 (non-LTS) + if: matrix.os == 'windows-latest' && matrix.java == 'jdk22' + run: docker compose -f docker/Windows-JDK22/docker-compose.yml up --build --exit-code-from cantaloupe - name: Test in Windows JDK 21 (LTS) if: matrix.os == 'windows-latest' && matrix.java == 'jdk21' run: docker compose -f docker/Windows-JDK21/compose.yml up --build --exit-code-from cantaloupe diff --git a/docker/Linux-JDK18/Dockerfile b/docker/Linux-JDK18/Dockerfile deleted file mode 100644 index ac131292b..000000000 --- a/docker/Linux-JDK18/Dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -FROM ubuntu:lunar - -ENV JAVA_HOME=/opt/jdk -ENV PATH=$PATH:/opt/jdk/bin:/opt/maven/bin -ARG DEBIAN_FRONTEND=noninteractive - -# Install various dependencies: -# * ca-certificates is needed by wget -# * ffmpeg is needed by FfmpegProcessor -# * wget download stuffs in this dockerfile -# * libopenjp2-tools is needed by OpenJpegProcessor -# * All the rest is needed by GrokProcessor -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - ffmpeg \ - wget \ - libopenjp2-tools \ - liblcms2-dev \ - libpng-dev \ - libzstd-dev \ - libtiff-dev \ - libjpeg-dev \ - zlib1g-dev \ - libwebp-dev \ - libimage-exiftool-perl \ - libgrokj2k1 \ - grokj2k-tools \ - adduser \ - && rm -rf /var/lib/apt/lists/* - -# Install TurboJpegProcessor dependencies -RUN mkdir -p /opt/libjpeg-turbo/lib -COPY docker/Linux-JDK11/image_files/libjpeg-turbo/lib64 /opt/libjpeg-turbo/lib - -# Install KakaduNativeProcessor dependencies -COPY dist/deps/Linux-x86-64/lib/* /usr/lib/ - -# Install various other dependencies that aren't in apt -# Install GrokProcessor dependencies -#RUN wget -q https://github.com/GrokImageCompression/grok/releases/download/v7.6.5/libgrokj2k1_7.6.5-1_amd64.deb \ -# && wget -q https://github.com/GrokImageCompression/grok/releases/download/v7.6.5/grokj2k-tools_7.6.5-1_amd64.deb \ -# && dpkg -i ./libgrokj2k1_7.6.5-1_amd64.deb \ -# && dpkg -i --ignore-depends=libjpeg62-turbo ./grokj2k-tools_7.6.5-1_amd64.deb \ - # Install OpenJDK -RUN wget -q https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_linux-x64_bin.tar.gz \ - && tar xfz openjdk-18_linux-x64_bin.tar.gz \ - && mv jdk-18 /opt/jdk \ - # Install a newer Maven than the one in apt - && wget -q https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz \ - && tar xfz apache-maven-3.8.8-bin.tar.gz \ - && mv apache-maven-3.8.8 /opt/maven \ - && rm apache-maven-3.8.8-bin.tar.gz - -# A non-root user is needed for some FilesystemSourceTest tests to work. -ARG user=cantaloupe -ARG home=/home/$user -RUN adduser --home $home $user -RUN chown -R $user $home -USER $user -WORKDIR $home - -# Install application dependencies -COPY ./pom.xml pom.xml -RUN mvn --quiet dependency:resolve - -# Copy the code -COPY --chown=cantaloupe docker/Linux-JDK11/image_files/test.properties test.properties -COPY --chown=cantaloupe ./src src - -ENTRYPOINT mvn --batch-mode test -Pfreedeps diff --git a/docker/Linux-JDK22/Dockerfile b/docker/Linux-JDK22/Dockerfile new file mode 100644 index 000000000..95a1e8255 --- /dev/null +++ b/docker/Linux-JDK22/Dockerfile @@ -0,0 +1,65 @@ +FROM ubuntu:lunar + +ENV JAVA_HOME=/opt/jdk +ENV PATH=$PATH:/opt/jdk/bin:/opt/maven/bin +ARG DEBIAN_FRONTEND=noninteractive + +# Install various dependencies: +# * ca-certificates is needed by wget +# * ffmpeg is needed by FfmpegProcessor +# * wget download stuffs in this dockerfile +# * libopenjp2-tools is needed by OpenJpegProcessor +# * All the rest is needed by GrokProcessor +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + ffmpeg \ + wget \ + libopenjp2-tools \ + liblcms2-dev \ + libpng-dev \ + libzstd-dev \ + libtiff-dev \ + libjpeg-dev \ + zlib1g-dev \ + libwebp-dev \ + libimage-exiftool-perl \ + libgrokj2k1 \ + grokj2k-tools \ + adduser \ + && rm -rf /var/lib/apt/lists/* + +# Install TurboJpegProcessor dependencies +RUN mkdir -p /opt/libjpeg-turbo/lib +COPY docker/Linux-JDK11/image_files/libjpeg-turbo/lib64 /opt/libjpeg-turbo/lib + +# Install KakaduNativeProcessor dependencies +COPY dist/deps/Linux-x86-64/lib/* /usr/lib/ + +# Install various other dependencies that aren't in apt +# Install OpenJDK +RUN wget -q https://download.java.net/java/GA/jdk22.0.2/c9ecb94cd31b495da20a27d4581645e8/9/GPL/openjdk-22.0.2_linux-x64_bin.tar.gz \ + && tar xfz openjdk-22.0.2_linux-x64_bin.tar.gz \ + && mv jdk-22.0.2 /opt/jdk \ + # Install a newer Maven than the one in apt + && wget -q https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz \ + && tar xfz apache-maven-3.8.8-bin.tar.gz \ + && mv apache-maven-3.8.8 /opt/maven \ + && rm apache-maven-3.8.8-bin.tar.gz + +# A non-root user is needed for some FilesystemSourceTest tests to work. +ARG user=cantaloupe +ARG home=/home/$user +RUN adduser --home $home $user +RUN chown -R $user $home +USER $user +WORKDIR $home + +# Install application dependencies +COPY ./pom.xml pom.xml +RUN mvn --quiet dependency:resolve + +# Copy the code +COPY --chown=cantaloupe docker/Linux-JDK11/image_files/test.properties test.properties +COPY --chown=cantaloupe ./src src + +ENTRYPOINT mvn --batch-mode test -Pfreedeps diff --git a/docker/Linux-JDK18/docker-compose.yml b/docker/Linux-JDK22/compose.yaml similarity index 58% rename from docker/Linux-JDK18/docker-compose.yml rename to docker/Linux-JDK22/compose.yaml index 7b2572bc0..90fd3cf1f 100644 --- a/docker/Linux-JDK18/docker-compose.yml +++ b/docker/Linux-JDK22/compose.yaml @@ -1,14 +1,13 @@ # -# N.B.: docker-compose must be invoked from the project root directory: +# N.B.: docker compose must be invoked from the project root directory: # -# docker-compose -f path/to/docker-compose.yml up --exit-code-from cantaloupe +# docker compose -f path/to/compose.yaml up --exit-code-from cantaloupe # -version: '3' services: cantaloupe: build: context: ../../ - dockerfile: $PWD/docker/Linux-JDK18/Dockerfile + dockerfile: $PWD/docker/Linux-JDK22/Dockerfile minio: image: minio/minio environment: diff --git a/docker/Windows-JDK18/docker-compose.yml b/docker/Windows-JDK18/docker-compose.yml deleted file mode 100644 index 3c5812953..000000000 --- a/docker/Windows-JDK18/docker-compose.yml +++ /dev/null @@ -1,19 +0,0 @@ -# -# N.B.: docker-compose must be invoked from the project root directory: -# -# docker-compose -f path/to/docker-compose.yml up --exit-code-from cantaloupe -# -version: '3' -services: - cantaloupe: - build: - context: ../../ - dockerfile: docker/Windows-JDK18/Dockerfile - minio: - build: - context: ../../ - dockerfile: docker/Windows-JDK18/Dockerfile-minio - environment: - MINIO_ACCESS_KEY: MinioUser - MINIO_SECRET_KEY: OpenSesame - hostname: minio diff --git a/docker/Windows-JDK18/Dockerfile b/docker/Windows-JDK22/Dockerfile similarity index 79% rename from docker/Windows-JDK18/Dockerfile rename to docker/Windows-JDK22/Dockerfile index e3f570efc..e714183e7 100644 --- a/docker/Windows-JDK18/Dockerfile +++ b/docker/Windows-JDK22/Dockerfile @@ -5,14 +5,14 @@ ENV chocolateyUseWindowsCompression false # Install the Chocolatey package manager, which makes it easier to install # dependencies. RUN powershell -Command \ - iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \ - choco feature disable --name showDownloadProgress + iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \ + choco feature disable --name showDownloadProgress # Install various dependencies # TODO: openjpeg RUN choco install -y maven ffmpeg -RUN choco install -y openjdk --version=18.0.2 - +RUN choco install -y openjdk --version=22.0.2 + # Install TurboJpegProcessor dependencies TODO: libjpeg-turbo #RUN mkdir -p /opt/libjpeg-turbo/lib #COPY docker/Windows10-JDK11/image_files/libjpeg-turbo/lib64 c:\windows\system32 diff --git a/docker/Windows-JDK18/Dockerfile-minio b/docker/Windows-JDK22/Dockerfile-minio similarity index 100% rename from docker/Windows-JDK18/Dockerfile-minio rename to docker/Windows-JDK22/Dockerfile-minio diff --git a/docker/Windows-JDK22/compose.yaml b/docker/Windows-JDK22/compose.yaml new file mode 100644 index 000000000..7cb2575c6 --- /dev/null +++ b/docker/Windows-JDK22/compose.yaml @@ -0,0 +1,18 @@ +# +# N.B.: docker compose must be invoked from the project root directory: +# +# docker compose -f path/to/compose.yaml up --exit-code-from cantaloupe +# +services: + cantaloupe: + build: + context: ../../ + dockerfile: docker/Windows-JDK22/Dockerfile + minio: + build: + context: ../../ + dockerfile: docker/Windows-JDK22/Dockerfile-minio + environment: + MINIO_ACCESS_KEY: MinioUser + MINIO_SECRET_KEY: OpenSesame + hostname: minio