From d8bb8ea05accb5794140969e6905ea7d26f7a013 Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 20:09:54 +0400 Subject: [PATCH 1/2] ci: add --with-jtreg --- Dockerfile.openj9 | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index d16887d..af59b45 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -2,13 +2,13 @@ FROM ubuntu:25.04 AS build # partly copied from mkdocker.sh # Copyright IBM Corp (Eclipse Public License 2.0) -RUN apt update \ - && apt upgrade -y \ - && apt install -qq -y --no-install-recommends \ +RUN apt -qq update \ + && apt -qq upgrade -y \ + && apt -qq install -y --no-install-recommends \ ant ant-contrib autoconf build-essential ca-certificates cmake cpio curl file gcc-14 g++-14 gdb git \ libasound2-dev libcups2-dev libdwarf-dev libelf-dev libexpat1-dev libffi-dev libfontconfig libfontconfig1-dev \ libfreetype6-dev libnuma-dev libssl-dev libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev libxtst-dev \ - make nasm pkg-config python3 python3-dev rsync systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev execstack \ + make nasm pkg-config python3 python3-dev rsync systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev execstack unzip \ && rm -rf /var/lib/apt/lists/* WORKDIR /build @@ -18,6 +18,12 @@ RUN mkdir /build/bootjdk /build/dist \ && tar -xzf jdk21.tar.gz --directory=/build/bootjdk --strip-components=1 \ && rm -f jdk21.tar.gz +RUN wget --progress=dot:mega -O jtreg.zip https://builds.shipilev.net/jtreg/jtreg-7.5.1%2B1.zip \ + && unzip jtreg.zip -d /build \ + && rm -rf jtreg.zip + +ENV JT_HOME=/build/jtreg + RUN find /build/bootjdk -name '*.so' | xargs execstack -c RUN git clone --single-branch --depth 1 \ @@ -27,7 +33,7 @@ RUN git clone --single-branch --depth 1 \ WORKDIR /build/src RUN bash get_source.sh -RUN bash configure --with-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" +RUN bash configure --with-jtreg=/build/jtreg --with-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" RUN make all JOBS=$(nproc) RUN make test TEST=tier2 JOBS=$(nproc) From 71ec6eb0b7264003cb3e09aa8945399c5338fc96 Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 20:09:54 +0400 Subject: [PATCH 2/2] ci: add --with-jtreg --- Dockerfile.openj9 | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index d16887d..9475631 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -2,13 +2,13 @@ FROM ubuntu:25.04 AS build # partly copied from mkdocker.sh # Copyright IBM Corp (Eclipse Public License 2.0) -RUN apt update \ - && apt upgrade -y \ - && apt install -qq -y --no-install-recommends \ +RUN apt -qq update \ + && apt -qq upgrade -y \ + && apt -qq install -y --no-install-recommends \ ant ant-contrib autoconf build-essential ca-certificates cmake cpio curl file gcc-14 g++-14 gdb git \ libasound2-dev libcups2-dev libdwarf-dev libelf-dev libexpat1-dev libffi-dev libfontconfig libfontconfig1-dev \ libfreetype6-dev libnuma-dev libssl-dev libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev libxtst-dev \ - make nasm pkg-config python3 python3-dev rsync systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev execstack \ + make nasm pkg-config python3 python3-dev rsync systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev execstack unzip \ && rm -rf /var/lib/apt/lists/* WORKDIR /build @@ -18,6 +18,12 @@ RUN mkdir /build/bootjdk /build/dist \ && tar -xzf jdk21.tar.gz --directory=/build/bootjdk --strip-components=1 \ && rm -f jdk21.tar.gz +RUN wget --progress=dot:mega -O jtreg.zip https://builds.shipilev.net/jtreg/jtreg-7.5.1%2B1.zip \ + && unzip jtreg.zip -d /build \ + && rm -rf jtreg.zip + +ENV JT_HOME=/build/jtreg + RUN find /build/bootjdk -name '*.so' | xargs execstack -c RUN git clone --single-branch --depth 1 \ @@ -27,9 +33,8 @@ RUN git clone --single-branch --depth 1 \ WORKDIR /build/src RUN bash get_source.sh -RUN bash configure --with-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" +RUN bash configure --with-jtreg=/build/jtreg --with-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" RUN make all JOBS=$(nproc) -RUN make test TEST=tier2 JOBS=$(nproc) # jlink by advice from https://adoptium.net/blog/2021/10/jlink-to-produce-own-runtime/ WORKDIR /build/src/build/linux-x86_64-server-release/images @@ -46,6 +51,14 @@ openj9.sharedclasses,openj9.zosconditionhandling RUN mv ./* /build/dist/ +ENV JAVA_HOME=/build/dist/jre +ENV PATH="$JAVA_HOME/bin:$PATH" + +WORKDIR /build/src +RUN make test TEST=tier1 JOBS=$(nproc) + + + # ------