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
|
2021-05-06 14:11:47 +02:00
|
|
|
RUN git clone --depth 1 -b master https://github.com/netty/netty.git netty \
|
|
|
|
&& cd netty \
|
|
|
|
&& mvn install -DskipTests -T1C -B -am \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -fr netty
|
2020-11-18 17:16:37 +01:00
|
|
|
|
|
|
|
# Prepare our own build
|
2021-05-20 18:57:31 +02:00
|
|
|
RUN mkdir buffer-api && mkdir buffer-memseg && mkdir buffer-tests
|
2020-11-18 17:16:37 +01:00
|
|
|
COPY pom.xml pom.xml
|
2021-05-20 18:57:31 +02:00
|
|
|
COPY buffer-api/pom.xml buffer-api/pom.xml
|
|
|
|
COPY buffer-memseg/pom.xml buffer-memseg/pom.xml
|
|
|
|
COPY buffer-tests/pom.xml buffer-tests/pom.xml
|
|
|
|
RUN mvn install 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
|