From d9711cffa2bab8602634fe74ddebbc89b459cc48 Mon Sep 17 00:00:00 2001 From: nm17 Date: Wed, 5 Mar 2025 18:24:11 +0400 Subject: [PATCH 01/12] fuck this shit --- .forgejo/workflows/build_and_release.yml | 64 ++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .forgejo/workflows/build_and_release.yml diff --git a/.forgejo/workflows/build_and_release.yml b/.forgejo/workflows/build_and_release.yml new file mode 100644 index 0000000..6202c2f --- /dev/null +++ b/.forgejo/workflows/build_and_release.yml @@ -0,0 +1,64 @@ +name: Docker Image CI + +on: + push: + branches: ['main'] + pull_request: + +env: + REGISTRY: git.dc09.ru # Change to your registry (e.g., forgejo.example.com) + ORGANIZATION: nm17 # Docker Hub organization or Forgejo username + GITHUB_TOKEN: ${{ secrets.DOCKER_PASSWORD }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_TOKEN: ${{ secrets.DOCKER_PASSWORD }} + FORGEJO_URL: https://git.dc09.ru + +jobs: + build-and-push: + runs-on: ubuntu-latest + strategy: + matrix: + images: + - dockerfile: 'Dockerfile.openj9' + image_name: 'openj9' + context: './' + - dockerfile: 'Dockerfile.piped' + image_name: 'piped' + context: './' + # Add more images as needed + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + token: ${{ secrets.DOCKER_PASSWORD }} + opts.auth: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/${{ matrix.image_name }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + github-token: ${{ secrets.DOCKER_PASSWORD }} + github-server: https://${{ env.REGISTRY }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ${{ matrix.context }} + file: ${{ matrix.dockerfile }} + push: ${{ github.event_name == 'push' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From 6d0394056d51aa1478a109c3e8dc3dcf0072acc1 Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 15:47:18 +0400 Subject: [PATCH 02/12] ci: almost woking --- .forgejo/workflows/build_and_release.yml | 43 ++++++++++++++++-------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/.forgejo/workflows/build_and_release.yml b/.forgejo/workflows/build_and_release.yml index 6202c2f..7e1d4f3 100644 --- a/.forgejo/workflows/build_and_release.yml +++ b/.forgejo/workflows/build_and_release.yml @@ -8,9 +8,12 @@ on: env: REGISTRY: git.dc09.ru # Change to your registry (e.g., forgejo.example.com) ORGANIZATION: nm17 # Docker Hub organization or Forgejo username - GITHUB_TOKEN: ${{ secrets.DOCKER_PASSWORD }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_TOKEN: ${{ secrets.DOCKER_PASSWORD }} + GITHUB_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} + GITHUB_API_URL: https://git.dc09.ru + GITHUB_BASE_REF: git.dc09.ru + GITHUB_SERVER_URL: https://git.dc09.ru + DOCKERHUB_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} + DOCKER_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} FORGEJO_URL: https://git.dc09.ru jobs: @@ -34,31 +37,43 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - token: ${{ secrets.DOCKER_PASSWORD }} - opts.auth: ${{ secrets.DOCKER_PASSWORD }} - + registry: git.dc09.ru + username: ${{ secrets.FORGEJO_USERNAME }} + password: ${{ secrets.FORGEJO_PASSWORD }} + token: ${{ secrets.FORGEJO_PASSWORD }} + opts.auth: ${{ secrets.FORGEJO_PASSWORD }} + - name: Printenv + run: env | sort - name: Extract metadata (tags, labels) id: meta uses: docker/metadata-action@v5 + env: + REGISTRY: git.dc09.ru # Change to your registry (e.g., forgejo.example.com) + ORGANIZATION: nm17 # Docker Hub organization or Forgejo username + GITHUB_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} + GITHUB_BASE_REF: git.dc09.ru + GITHUB_SERVER_URL: https://git.dc09.ru + DOCKERHUB_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} + DOCKER_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} + FORGEJO_URL: https://git.dc09.ru with: + context: git images: | - ${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/${{ matrix.image_name }} + git.dc09.ru/${{ env.ORGANIZATION }}/${{ matrix.images.image_name }} tags: | type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - github-token: ${{ secrets.DOCKER_PASSWORD }} - github-server: https://${{ env.REGISTRY }} + github-token: ${{ secrets.FORGEJO_PASSWORD }} + github-server: https://git.dc09.ru + - name: Build and push Docker image uses: docker/build-push-action@v5 with: - context: ${{ matrix.context }} - file: ${{ matrix.dockerfile }} + context: ${{ matrix.images.context }} + file: ${{ matrix.images.dockerfile }} push: ${{ github.event_name == 'push' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From d1c1980d673b939ea63c72ade5ffa5893a2f6d51 Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 16:20:48 +0400 Subject: [PATCH 03/12] ci: update to ubuntu 25.04 --- Dockerfile.openj9 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index c28da77..e88a833 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -1,11 +1,11 @@ -FROM ubuntu:24.10 AS build +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 \ - ant ant-contrib autoconf build-essential ca-certificates cmake cpio curl file g++-13 gcc-13 gdb git \ + ant ant-contrib autoconf build-essential ca-certificates cmake cpio curl file g++-14 gcc-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 \ @@ -24,7 +24,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-mixedrefs=static --with-openssl=system +RUN bash configure --with-boot-jdk=/build/bootjdk --with-openssl=system RUN make all # jlink by advice from https://adoptium.net/blog/2021/10/jlink-to-produce-own-runtime/ @@ -44,7 +44,7 @@ RUN mv ./* /build/dist/ # ------ -FROM ubuntu:24.10 AS run +FROM ubuntu:25.04 AS run COPY --from=build /build/dist/jre /usr/lib/jvm/openj9-jre ENV JAVA_HOME=/usr/lib/jvm/openj9-jre From a6efd313f0adb26331f8c4f4da1e277142d95b3c Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 18:44:57 +0400 Subject: [PATCH 04/12] ci: leeeeeroyyy clangins --- .forgejo/workflows/build_and_release.yml | 12 +----------- Dockerfile.openj9 | 4 ++-- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/.forgejo/workflows/build_and_release.yml b/.forgejo/workflows/build_and_release.yml index 7e1d4f3..0442526 100644 --- a/.forgejo/workflows/build_and_release.yml +++ b/.forgejo/workflows/build_and_release.yml @@ -7,7 +7,6 @@ on: env: REGISTRY: git.dc09.ru # Change to your registry (e.g., forgejo.example.com) - ORGANIZATION: nm17 # Docker Hub organization or Forgejo username GITHUB_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} GITHUB_API_URL: https://git.dc09.ru GITHUB_BASE_REF: git.dc09.ru @@ -47,19 +46,10 @@ jobs: - name: Extract metadata (tags, labels) id: meta uses: docker/metadata-action@v5 - env: - REGISTRY: git.dc09.ru # Change to your registry (e.g., forgejo.example.com) - ORGANIZATION: nm17 # Docker Hub organization or Forgejo username - GITHUB_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} - GITHUB_BASE_REF: git.dc09.ru - GITHUB_SERVER_URL: https://git.dc09.ru - DOCKERHUB_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} - DOCKER_TOKEN: ${{ secrets.FORGEJO_PASSWORD }} - FORGEJO_URL: https://git.dc09.ru with: context: git images: | - git.dc09.ru/${{ env.ORGANIZATION }}/${{ matrix.images.image_name }} + git.dc09.ru/${{ env.GITHUB_REPOSITORY_OWNER }}/${{ matrix.images.image_name }} tags: | type=ref,event=branch type=ref,event=pr diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index e88a833..f4907c3 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -5,7 +5,7 @@ FROM ubuntu:25.04 AS build RUN apt update \ && apt upgrade -y \ && apt install -qq -y --no-install-recommends \ - ant ant-contrib autoconf build-essential ca-certificates cmake cpio curl file g++-14 gcc-14 gdb git \ + ant ant-contrib autoconf build-essential ca-certificates cmake cpio curl file clang-19 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 \ @@ -25,7 +25,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 -RUN make all +RUN make all -j$(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 From 3617c61f680dcb21534f6aeaa1d75cce9c75042c Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 18:50:36 +0400 Subject: [PATCH 05/12] ci: use JOBS instead of -j --- Dockerfile.openj9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index f4907c3..19f3535 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -25,7 +25,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 -RUN make all -j$(nproc) +RUN make all 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 From 385478dd44f58ff7968ef0fe8ff87bf567628468 Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 18:58:35 +0400 Subject: [PATCH 06/12] ci: use noexecstack --- Dockerfile.openj9 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index 19f3535..f30b14c 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -24,7 +24,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 + +RUN bash configure --with-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" RUN make all JOBS=$(nproc) # jlink by advice from https://adoptium.net/blog/2021/10/jlink-to-produce-own-runtime/ From 605c66a87ee385346674ccbd24aa058e5a03c764 Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 19:29:02 +0400 Subject: [PATCH 07/12] ci: add test suite check --- Dockerfile.openj9 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index f30b14c..3d88176 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -8,7 +8,7 @@ RUN apt update \ ant ant-contrib autoconf build-essential ca-certificates cmake cpio curl file clang-19 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 \ + make nasm pkg-config python3 python3-dev rsync systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev execstack \ && rm -rf /var/lib/apt/lists/* WORKDIR /build @@ -18,6 +18,8 @@ RUN mkdir /build/bootjdk /build/dist \ && tar -xzf jdk21.tar.gz --directory=/build/bootjdk --strip-components=1 \ && rm -f jdk21.tar.gz +RUN find /build/bootjdk -name '*.so' | xargs execstack -c + RUN git clone --single-branch --depth 1 \ https://github.com/ibmruntimes/openj9-openjdk-jdk21.git \ /build/src @@ -27,6 +29,7 @@ RUN bash get_source.sh RUN bash configure --with-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" RUN make all JOBS=$(nproc) +RUN make test 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 @@ -43,6 +46,7 @@ openj9.sharedclasses,openj9.zosconditionhandling RUN mv ./* /build/dist/ + # ------ FROM ubuntu:25.04 AS run From e5588a6a1abadc92657de731a860f544d280987c Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 19:49:05 +0400 Subject: [PATCH 08/12] ci: force using clang-19 --- Dockerfile.openj9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index 3d88176..02e0425 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -27,7 +27,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-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" CC=clang-19 CXX=clang++-19 RUN make all JOBS=$(nproc) RUN make test JOBS=$(nproc) From db37cd06ba1d8e305eef7619610ac051bf1a4b21 Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 19:55:40 +0400 Subject: [PATCH 09/12] ci: ok nvm then --- Dockerfile.openj9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index 02e0425..bfbe971 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -5,7 +5,7 @@ FROM ubuntu:25.04 AS build RUN apt update \ && apt upgrade -y \ && apt install -qq -y --no-install-recommends \ - ant ant-contrib autoconf build-essential ca-certificates cmake cpio curl file clang-19 gdb git \ + 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 \ @@ -27,7 +27,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" CC=clang-19 CXX=clang++-19 +RUN bash configure --with-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" RUN make all JOBS=$(nproc) RUN make test JOBS=$(nproc) From bd8708ec761caed3fd402f3ca0adbd8b34f7e5f2 Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 20:08:39 +0400 Subject: [PATCH 10/12] ci: add test tier --- Dockerfile.openj9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index bfbe971..d16887d 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -29,7 +29,7 @@ RUN bash get_source.sh RUN bash configure --with-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" RUN make all JOBS=$(nproc) -RUN make test 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 From 404dec0f4063306f4896e50d90b9011cf65c872f Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Mar 2025 20:09:54 +0400 Subject: [PATCH 11/12] ci: add --with-jtreg --- Dockerfile.openj9 | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index d16887d..ae66ec9 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,9 @@ 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) +RUN make install # 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 @@ -44,6 +50,24 @@ jdk.nio.mapmode,jdk.random,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsu jdk.xml.dom,jdk.zipfs,openj9.criu,openj9.cuda,openj9.dataaccess,openj9.gpu,openj9.jvm,\ openj9.sharedclasses,openj9.zosconditionhandling + + +ENV JAVA_HOME=/build/src/build/linux-x86_64-server-release/images/jre +ENV PATH="$JAVA_HOME/bin:$JAVA_HOME/lib:$PATH" +ENV TEST_JDK_HOME=/build/src/build/linux-x86_64-server-release/images/jdk +ENV TEST_ROOT=/build/openj9-repo/test +ENV DIAGNOSTICLEVEL=nodetails + +RUN git clone --depth=1 https://github.com/eclipse-openj9/openj9.git /build/openj9-repo + +RUN cd /build/openj9-repo/test \ + && git clone https://github.com/adoptium/TKG.git \ + && cd TKG \ + && make compile -j$(nproc) \ + && make _sanity.openjdk.regular -j$(nproc) + + +WORKDIR /build/src/build/linux-x86_64-server-release/images RUN mv ./* /build/dist/ @@ -53,7 +77,7 @@ FROM ubuntu:25.04 AS run COPY --from=build /build/dist/jre /usr/lib/jvm/openj9-jre ENV JAVA_HOME=/usr/lib/jvm/openj9-jre -ENV PATH="$JAVA_HOME/bin:$PATH" +ENV PATH="$JAVA_HOME/bin:$JAVA_HOME/lib:$PATH" # verify installation RUN java --version From 701c628244b9c957d3f0d158004195910426f33d Mon Sep 17 00:00:00 2001 From: nm17 Date: Wed, 12 Mar 2025 18:30:22 +0400 Subject: [PATCH 12/12] ci: an idea --- .forgejo/workflows/build_and_release.yml | 7 ++++-- Dockerfile.openj9 | 30 +++++++++++++++++------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/build_and_release.yml b/.forgejo/workflows/build_and_release.yml index 0442526..695cf86 100644 --- a/.forgejo/workflows/build_and_release.yml +++ b/.forgejo/workflows/build_and_release.yml @@ -2,7 +2,7 @@ name: Docker Image CI on: push: - branches: ['main'] + pull_request: env: @@ -24,9 +24,11 @@ jobs: - dockerfile: 'Dockerfile.openj9' image_name: 'openj9' context: './' + build-args: ["WITH_JDK=false"] - dockerfile: 'Dockerfile.piped' image_name: 'piped' context: './' + build-args: [] # Add more images as needed steps: @@ -66,4 +68,5 @@ jobs: file: ${{ matrix.images.dockerfile }} push: ${{ github.event_name == 'push' }} tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + build-args: ${{ matrix.images.build-args }} \ No newline at end of file diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index ae66ec9..66ebf66 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -33,7 +33,11 @@ RUN git clone --single-branch --depth 1 \ WORKDIR /build/src RUN bash get_source.sh -RUN bash configure --with-jtreg=/build/jtreg --with-boot-jdk=/build/bootjdk --with-openssl=system --with-extra-ldflags="-Wl,-z,noexecstack" +RUN bash configure \ + --enable-libffi-bundling --enable-ddr --enable-jitserver \ + --enable-fallback-linker --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 install @@ -55,17 +59,27 @@ openj9.sharedclasses,openj9.zosconditionhandling ENV JAVA_HOME=/build/src/build/linux-x86_64-server-release/images/jre ENV PATH="$JAVA_HOME/bin:$JAVA_HOME/lib:$PATH" ENV TEST_JDK_HOME=/build/src/build/linux-x86_64-server-release/images/jdk -ENV TEST_ROOT=/build/openj9-repo/test +ENV TEST_ROOT=/build/src/openj9/test ENV DIAGNOSTICLEVEL=nodetails +ENV NATIVE_TEST_LIBS=/build/src/build/linux-x86_64-server-release/images/test -RUN git clone --depth=1 https://github.com/eclipse-openj9/openj9.git /build/openj9-repo +RUN cd /build/src/openj9/test \ + && git clone https://github.com/adoptium/TKG.git -RUN cd /build/openj9-repo/test \ - && git clone https://github.com/adoptium/TKG.git \ - && cd TKG \ - && make compile -j$(nproc) \ - && make _sanity.openjdk.regular -j$(nproc) +WORKDIR /build/src/openj9/test/TKG +ENV BUILD_LIST=functional + +RUN find ../ -type f -name "playlist.xml" | xargs sed -i 's#jit_jar#jit_jarhttps://github.com/#g' +RUN find ../ -type f -name "playlist.xml" | xargs sed -i 's#testJITServer#testJITServerhttps://github.com/#g' + +RUN make compile -j$(nproc) + +RUN make genParallelList PARALLEL_OPTIONS=TEST=_sanity.functional.regular TEST_TIME= NUM_MACHINES=$(nproc) + +RUN cat parallelList.mk + +RUN make -f parallelList.mk JOBS=$(nproc) WORKDIR /build/src/build/linux-x86_64-server-release/images RUN mv ./* /build/dist/