Compare commits
8 commits
dfe051d2c6
...
1cec87ce45
Author | SHA1 | Date | |
---|---|---|---|
1cec87ce45 | |||
1bcc578fa1 | |||
83b5771fdf | |||
415afaee09 | |||
3f75cded58 | |||
95b6822a44 | |||
0a63082d3b | |||
04c4e3fece |
2 changed files with 23 additions and 32 deletions
|
@ -2,11 +2,10 @@ name: Docker Image CI
|
|||
|
||||
on:
|
||||
push:
|
||||
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
REGISTRY: git.dc09.ru # Change to your registry (e.g., forgejo.example.com)
|
||||
REGISTRY: git.dc09.ru
|
||||
GITHUB_TOKEN: ${{ secrets.FORGEJO_PASSWORD }}
|
||||
GITHUB_API_URL: https://git.dc09.ru
|
||||
GITHUB_BASE_REF: git.dc09.ru
|
||||
|
@ -24,7 +23,7 @@ jobs:
|
|||
- dockerfile: 'Dockerfile.openj9'
|
||||
image_name: 'openj9'
|
||||
context: './'
|
||||
build-args: ["WITH_JDK=false"]
|
||||
build-args: []
|
||||
- dockerfile: 'Dockerfile.piped'
|
||||
image_name: 'piped'
|
||||
context: './'
|
||||
|
@ -60,7 +59,6 @@ jobs:
|
|||
github-token: ${{ secrets.FORGEJO_PASSWORD }}
|
||||
github-server: https://git.dc09.ru
|
||||
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
|
@ -69,4 +67,4 @@ jobs:
|
|||
push: ${{ github.event_name == 'push' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: ${{ matrix.images.build-args }}
|
||||
build-args: ${{ matrix.images.build-args }}
|
||||
|
|
|
@ -2,23 +2,19 @@ FROM ubuntu:25.04 AS build
|
|||
|
||||
# partially copied from mkdocker.sh
|
||||
# Copyright IBM Corp (Eclipse Public License 2.0)
|
||||
RUN apt -qq update \
|
||||
&& apt -qq upgrade -y \
|
||||
&& apt -qq install -y --no-install-recommends \
|
||||
ant ant-contrib autoconf build-essential ca-certificates clang cmake cpio curl execstack file 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 \
|
||||
llvm-dev lld make nasm pkg-config python3 python3-dev rsync systemtap-sdt-dev unzip wget xvfb zip zlib1g-dev unzip \
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq upgrade -y \
|
||||
&& apt-get -qq install -y --no-install-recommends \
|
||||
ant ant-contrib autoconf ca-certificates cmake cpio file gcc g++ 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 openjdk-21-jdk-headless pkg-config python3 python3-dev rsync \
|
||||
systemtap-sdt-dev unzip xvfb zip zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /build
|
||||
RUN mkdir /build/bootjdk /build/dist \
|
||||
&& wget --progress=dot:mega -O jdk21.tar.gz \
|
||||
https://api.adoptopenjdk.net/v3/binary/latest/21/ga/linux/x64/jdk/openj9/normal/adoptopenjdk \
|
||||
&& tar -xzf jdk21.tar.gz --directory=/build/bootjdk --strip-components=1 \
|
||||
&& rm -f jdk21.tar.gz
|
||||
|
||||
RUN find /build/bootjdk -name '*.so' -type f -print0 | xargs -0 -- execstack -c
|
||||
|
||||
RUN git clone --single-branch --depth 1 \
|
||||
https://github.com/ibmruntimes/openj9-openjdk-jdk21.git \
|
||||
|
@ -27,22 +23,20 @@ RUN git clone --single-branch --depth 1 \
|
|||
WORKDIR /build/src
|
||||
RUN bash get_source.sh
|
||||
|
||||
ENV CC=/usr/bin/clang CXX=/usr/bin/clang++ LD=/usr/bin/lld
|
||||
# TODO: add as args to configure
|
||||
# CFLAGS="-O3 -flto -fwhole-program-vtables" \
|
||||
# LDFLAGS="-Wl,-O1"
|
||||
ENV CFLAGS="-Wno-error=nontrivial-memcall"
|
||||
ENV CC=/usr/bin/gcc CXX=/usr/bin/g++
|
||||
RUN bash configure \
|
||||
--with-boot-jdk=/build/bootjdk \
|
||||
--with-boot-jdk=/usr/lib/jvm/java-21-openjdk-amd64 \
|
||||
--with-openssl=system \
|
||||
--with-toolchain-type=clang \
|
||||
--enable-jvm-feature-link-time-opt \
|
||||
--with-extra-cflags="$CFLAGS" \
|
||||
--with-extra-cxxflags="$CFLAGS"
|
||||
--with-extra-cflags="-O3 -flto=auto -fuse-linker-plugin" \
|
||||
--with-extra-cxxflags="-O3 -flto=auto -fuse-linker-plugin" \
|
||||
--with-extra-ldflags="-Wl,-O1" \
|
||||
--with-native-debug-symbols=none \
|
||||
--enable-jvm-feature-link-time-opt
|
||||
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
|
||||
|
||||
# jlink by advice from https://adoptium.net/blog/2021/10/jlink-to-produce-own-runtime/
|
||||
RUN jdk/bin/jlink --strip-debug --no-man-pages --no-header-files --compress=2 \
|
||||
--output jre \
|
||||
--add-modules java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,\
|
||||
|
@ -54,8 +48,7 @@ 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
|
||||
|
||||
WORKDIR /build/src/build/linux-x86_64-server-release/images
|
||||
RUN mv ./* /build/dist/
|
||||
RUN mkdir -p /build/dist && mv ./* /build/dist/
|
||||
|
||||
# ------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue