2020-11-18 17:16:37 +01:00
|
|
|
# Prepare environment
|
2021-03-28 15:50:00 +02:00
|
|
|
FROM fedora:33
|
2020-11-18 17:16:37 +01:00
|
|
|
RUN dnf -y install file findutils unzip zip libXtst-devel libXt-devel libXrender-devel libXrandr-devel \
|
|
|
|
libXi-devel cups-devel fontconfig-devel alsa-lib-devel make autoconf diffutils git clang \
|
2021-03-10 14:57:40 +01:00
|
|
|
java-latest-openjdk-devel automake libtool
|
2020-11-18 17:16:37 +01:00
|
|
|
|
|
|
|
# Build panama-foreign openjdk
|
|
|
|
WORKDIR /home/build
|
2021-05-05 22:01:04 +02:00
|
|
|
RUN git clone --depth 1 --branch foreign-memaccess+abi https://github.com/openjdk/panama-foreign.git panama-foreign
|
2020-11-18 17:16:37 +01:00
|
|
|
WORKDIR /home/build/panama-foreign
|
|
|
|
RUN chmod +x configure
|
|
|
|
RUN ./configure --with-debug-level=fastdebug \
|
|
|
|
--with-toolchain-type=clang \
|
|
|
|
--with-vendor-name=jackalope \
|
|
|
|
--enable-warnings-as-errors=no
|
2021-05-05 22:01:04 +02:00
|
|
|
RUN make images && mv build/linux-x86_64-server-fastdebug/images/jdk /home/jdk && rm -fr *
|
|
|
|
ENV JAVA_HOME="/home/jdk"
|
2020-11-18 17:16:37 +01:00
|
|
|
|
|
|
|
# Prepare our own build environment
|
|
|
|
WORKDIR /home/build
|
|
|
|
RUN curl https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | tar -xz
|
|
|
|
ENV PATH=/home/build/apache-maven-3.6.3/bin:$PATH
|
|
|
|
|
|
|
|
# Prepare a snapshot of Netty 5
|
|
|
|
RUN git clone -b master https://github.com/netty/netty.git netty
|
|
|
|
WORKDIR /home/build/netty
|
2021-03-06 11:18:14 +01:00
|
|
|
RUN mvn install -DskipTests -T1C -B -am
|
2020-11-18 17:16:37 +01:00
|
|
|
WORKDIR /home/build
|
|
|
|
|
|
|
|
# Prepare our own build
|
|
|
|
COPY pom.xml pom.xml
|
2021-03-19 11:58:25 +01:00
|
|
|
RUN mvn dependency:go-offline surefire:test checkstyle:check -ntp
|
2020-11-18 17:16:37 +01:00
|
|
|
|
|
|
|
# Copy over the project code and run our build
|
|
|
|
COPY . .
|
2021-04-13 15:18:14 +02:00
|
|
|
# Make sure Maven has enough memory to keep track of all the tests we run
|
2021-04-14 11:44:58 +02:00
|
|
|
ENV MAVEN_OPTS="-Xmx4g -XX:+HeapDumpOnOutOfMemoryError"
|
2021-04-13 15:18:14 +02:00
|
|
|
# Run tests
|
2021-04-27 10:09:40 +02:00
|
|
|
CMD mvn verify -o -B -C -T1C -fae -nsu
|