Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/s3-content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
glenrobson authored Sep 11, 2024
2 parents 0cc9057 + f492eac commit 08ff26a
Show file tree
Hide file tree
Showing 35 changed files with 423 additions and 108 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
name: CI
on: [push, pull_request]
on:
push:
branches:
- develop
- release/*
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
java: [jdk11, jdk18, graalvm]
java: [jdk11, jdk17, jdk18, jdk21, graalvm]
fail-fast: false
steps:
- name: Check out the repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Test in Linux JDK 11
if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk11'
run: docker compose -f docker/Linux-JDK11/docker-compose.yml up --build --exit-code-from cantaloupe
- name: Test in Linux JDK 17 (LTS)
if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk17'
run: docker compose -f docker/Linux-JDK17/compose.yaml 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 21 (LTS)
if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk21'
run: docker compose -f docker/Linux-JDK21/compose.yaml up --build --exit-code-from cantaloupe
- name: Test in Linux GraalVM
if: matrix.os == 'ubuntu-latest' && matrix.java == 'graalvm'
run: docker compose -f docker/Linux-GraalVM20/docker-compose.yml up --build --exit-code-from cantaloupe
run: docker compose -f docker/Linux-GraalVM20/compose.yaml up --build --exit-code-from cantaloupe
- name: Test in Windows JDK 11
if: matrix.os == 'windows-latest' && matrix.java == 'jdk11'
run: docker compose -f docker/Windows-JDK11/docker-compose.yml up --build --exit-code-from cantaloupe
- name: Test in Windows JDK 17 (LTS)
if: matrix.os == 'windows-latest' && matrix.java == 'jdk17'
run: docker compose -f docker/Windows-JDK17/compose.yaml 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 21 (LTS)
if: matrix.os == 'windows-latest' && matrix.java == 'jdk21'
run: docker compose -f docker/Windows-JDK21/compose.yaml up --build --exit-code-from cantaloupe
# TODO: Windows+GraalVM

40 changes: 20 additions & 20 deletions docker/Linux-GraalVM20/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ ARG DEBIAN_FRONTEND=noninteractive

# Install various dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
maven \
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/*
ffmpeg \
maven \
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
COPY docker/image_files/libjpeg-turbo/lib64 /opt/libjpeg-turbo/lib

# Install KakaduNativeProcessor dependencies
COPY dist/deps/Linux-x86-64/lib/* /usr/lib/
Expand All @@ -40,8 +40,8 @@ COPY dist/deps/Linux-x86-64/lib/* /usr/lib/

# Install GraalVM
RUN wget -q https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.3.0/graalvm-ce-java11-linux-amd64-20.3.0.tar.gz \
&& tar xfz graalvm-ce-java11-linux-amd64-20.3.0.tar.gz \
&& mv graalvm-ce-java11-20.3.0 /opt
&& tar xfz graalvm-ce-java11-linux-amd64-20.3.0.tar.gz \
&& mv graalvm-ce-java11-20.3.0 /opt

# A non-root user is needed for some FilesystemSourceTest tests to work.
ARG user=cantaloupe
Expand All @@ -56,7 +56,7 @@ 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 docker/image_files/test.properties test.properties
COPY --chown=cantaloupe ./src src

ENTRYPOINT mvn --batch-mode test -Pfreedeps
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# 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'
version: "3"
services:
cantaloupe:
build:
Expand Down
42 changes: 21 additions & 21 deletions docker/Linux-JDK11/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
FROM ubuntu:lunar
FROM ubuntu:noble

ARG DEBIAN_FRONTEND=noninteractive

# Install various dependencies

RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-11-jdk-headless \
ffmpeg \
maven \
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/*
openjdk-11-jdk-headless \
ffmpeg \
maven \
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
COPY docker/image_files/libjpeg-turbo/lib64 /opt/libjpeg-turbo/lib

# Install KakaduNativeProcessor dependencies
COPY dist/deps/Linux-x86-64/lib/* /usr/lib/
Expand All @@ -40,7 +40,7 @@ COPY dist/deps/Linux-x86-64/lib/* /usr/lib/
ARG user=cantaloupe
ARG home=/home/$user
RUN adduser --home $home $user
RUN chown -R $user $home
RUN chown -R $user $home
USER $user
WORKDIR $home

Expand All @@ -49,7 +49,7 @@ 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 docker/image_files/test.properties test.properties
COPY --chown=cantaloupe ./src src

ENTRYPOINT mvn --batch-mode test -Pfreedeps
56 changes: 56 additions & 0 deletions docker/Linux-JDK17/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
FROM ubuntu:noble

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 \
openjdk-17-jdk \
maven \
&& rm -rf /var/lib/apt/lists/*

# Install TurboJpegProcessor dependencies
RUN mkdir -p /opt/libjpeg-turbo/lib
COPY docker/image_files/libjpeg-turbo/lib64 /opt/libjpeg-turbo/lib

# Install KakaduNativeProcessor dependencies
COPY dist/deps/Linux-x86-64/lib/* /usr/lib/

# 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 echo "export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" > ~/.bashrc
RUN mvn --quiet dependency:resolve

# Copy the code
COPY --chown=cantaloupe docker/image_files/test.properties test.properties
COPY --chown=cantaloupe ./src src

ENTRYPOINT mvn --batch-mode test -Pfreedeps
20 changes: 20 additions & 0 deletions docker/Linux-JDK17/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# 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: $PWD/docker/Linux-JDK17/Dockerfile
minio:
image: minio/minio
environment:
MINIO_ACCESS_KEY: MinioUser
MINIO_SECRET_KEY: OpenSesame
hostname: minio
command: server /data
redis:
image: redis:alpine
hostname: redis
54 changes: 27 additions & 27 deletions docker/Linux-JDK18/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:lunar
FROM ubuntu:noble

ENV JAVA_HOME=/opt/jdk
ENV PATH=$PATH:/opt/jdk/bin:/opt/maven/bin
Expand All @@ -11,26 +11,26 @@ ARG DEBIAN_FRONTEND=noninteractive
# * 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/*
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
COPY docker/image_files/libjpeg-turbo/lib64 /opt/libjpeg-turbo/lib

# Install KakaduNativeProcessor dependencies
COPY dist/deps/Linux-x86-64/lib/* /usr/lib/
Expand All @@ -41,15 +41,15 @@ COPY dist/deps/Linux-x86-64/lib/* /usr/lib/
# && 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
# 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
&& 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
Expand All @@ -64,7 +64,7 @@ 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 docker/image_files/test.properties test.properties
COPY --chown=cantaloupe ./src src

ENTRYPOINT mvn --batch-mode test -Pfreedeps
Loading

0 comments on commit 08ff26a

Please sign in to comment.