Skip to content

Commit

Permalink
Merge pull request #540 from dragonwell-project/wip_dragonwell_standa…
Browse files Browse the repository at this point in the history
…rd_squash_branch

Merge branch 'standard' into wip_dragonwell_standard_merge_branch
  • Loading branch information
Accelerator1996 authored May 9, 2023
2 parents 9fda155 + 9de9341 commit 3b2b4b5
Show file tree
Hide file tree
Showing 259 changed files with 14,212 additions and 4,529 deletions.
101 changes: 53 additions & 48 deletions .github/workflows/submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
platforms:
description: "Platform(s) to execute on"
required: true
default: "Linux x64, Linux x86, Windows x64, Windows x86, macOS x64"
default: "Linux additional (hotspot only), Linux x64, Linux x86, Windows x64, Windows x86, macOS x64"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -23,7 +23,7 @@ jobs:
outputs:
should_run: ${{ steps.check_submit.outputs.should_run }}
bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
platform_linux_additional: false
platform_linux_additional: ${{ steps.check_platforms.outputs.platform_linux_additional }}
platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }}
platform_linux_x86: ${{ steps.check_platforms.outputs.platform_linux_x86 }}
platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }}
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
name: Linux x64
runs-on: "ubuntu-20.04"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && (needs.prerequisites.outputs.platform_linux_x64 != 'false' || needs.prerequisites.outputs.platform_linux_additional == 'true')
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x64 != 'false'

strategy:
fail-fast: false
Expand Down Expand Up @@ -307,7 +307,6 @@ jobs:
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x64_build
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_additional != 'false'

strategy:
Expand All @@ -316,8 +315,8 @@ jobs:
flavor:
- hs x64 build only
- hs x64 zero build only
- hs x64 minimal build only
- hs x64 optimized build only
- hs x86 minimal build only
- hs x86 client build only
- hs aarch64 build only
- hs arm build only
- hs s390x build only
Expand All @@ -327,21 +326,23 @@ jobs:
flags: --enable-debug --disable-precompiled-headers
- flavor: hs x64 zero build only
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero
- flavor: hs x64 minimal build only
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=minimal
- flavor: hs x64 optimized build only
flags: --with-debug-level=optimized --disable-precompiled-headers
- flavor: hs x86 minimal build only
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=minimal1 --with-target-bits=32
multilib: true
- flavor: hs x86 client build only
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=client --with-target-bits=32
multilib: true
- flavor: hs aarch64 build only
flags: --enable-debug --disable-precompiled-headers
debian-arch: arm64
gnu-arch: aarch64
- flavor: hs arm build only
flags: --enable-debug --disable-precompiled-headers
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero
debian-arch: armhf
gnu-arch: arm
gnu-flavor: eabihf
- flavor: hs s390x build only
flags: --enable-debug --disable-precompiled-headers
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=zero
debian-arch: s390x
gnu-arch: s390x
- flavor: hs ppc64le build only
Expand All @@ -359,31 +360,6 @@ jobs:
with:
path: jdk

- name: Restore build JDK
id: build_restore
uses: actions/download-artifact@v3
with:
name: transient_jdk-linux-x64_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jdk-linux-x64
continue-on-error: true

- name: Restore build JDK (retry)
uses: actions/download-artifact@v3
with:
name: transient_jdk-linux-x64_${{ needs.prerequisites.outputs.bundle_id }}
path: ~/jdk-linux-x64
if: steps.build_restore.outcome == 'failure'

- name: Unpack build JDK
run: |
mkdir -p "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
tar -xf "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin.tar.gz" -C "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
- name: Find root of build JDK image dir
run: |
build_jdk_root=`find ${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin -name release -type f`
echo "build_jdk_root=`dirname ${build_jdk_root}`" >> $GITHUB_ENV
- name: Update apt
run: sudo apt-get update

Expand All @@ -393,8 +369,17 @@ jobs:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9
if: matrix.debian-arch == ''

- name: Install multilib dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install --only-upgrade apt
sudo apt-get install openjdk-8-jdk gcc-9-multilib g++-9-multilib libfreetype6-dev:i386 libxrandr-dev:i386 libxtst-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libcups2-dev:i386 libasound2-dev:i386
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9
if: matrix.multilib != ''

- name: Install cross-compilation host dependencies
run: sudo apt-get install gcc-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}} g++-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
run: sudo apt-get install openjdk-8-jdk gcc-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}} g++-9-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
if: matrix.debian-arch != ''

- name: Cache sysroot
Expand All @@ -414,7 +399,7 @@ jobs:
sudo qemu-debootstrap
--arch=${{ matrix.debian-arch }}
--verbose
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev
--resolve-deps
buster
~/sysroot-${{ matrix.debian-arch }}
Expand All @@ -439,19 +424,30 @@ jobs:
echo "cross_flags=
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
--with-sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}/
--with-cups=${HOME}/sysroot-${{ matrix.debian-arch }}/usr
--with-freetype-lib=${HOME}/sysroot-${{ matrix.debian-arch }}/usr/lib/${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}
--with-freetype-include=${HOME}/sysroot-${{ matrix.debian-arch }}/usr/include/freetype2
--with-alsa=${HOME}/sysroot-${{ matrix.debian-arch }}/usr
--with-fontconfig=${HOME}/sysroot-${{ matrix.debian-arch }}/usr
" >> $GITHUB_ENV
&& echo "cross_conf_env=
CFLAGS=--sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}
CXXFLAGS=--sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}
LDFLAGS=--sysroot=${HOME}/sysroot-${{ matrix.debian-arch }}
" >> $GITHUB_ENV
if: matrix.debian-arch != ''

- name: Configure
run: >
${{ env.cross_conf_env }}
bash configure
--with-conf-name=linux-${{ matrix.gnu-arch }}-hotspot
${{ matrix.flags }}
${{ env.cross_flags }}
--with-user-release-suffix=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-build-number=b00
--with-boot-jdk=${BOOT_JDK}
--with-build-jdk=${{ env.build_jdk_root }}
--disable-headful
--with-zlib=bundled
working-directory: jdk

Expand Down Expand Up @@ -558,14 +554,14 @@ jobs:
test:
- jdk/tier1
- langtools/tier1
# - hotspot/tier1
- hotspot/tier1
include:
- test: jdk/tier1
suites: jdk_tier1
- test: langtools/tier1
suites: langtools_tier1
# - test: hotspot/tier1
# suites: hotspot_tier1
- test: hotspot/tier1
suites: hotspot_tier1

# Reduced 32-bit build uses the same boot JDK as 64-bit build
env:
Expand Down Expand Up @@ -609,13 +605,21 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo apt-get install openjdk-8-jdk gcc-9-multilib g++-9-multilib
- name: Unpack jdk
run: |
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}"
- name: Build multilib docker image
if: matrix.test == 'hotspot/tier1'
run: >
printf '%s\n%s\n'
'FROM ubuntu:latest'
'RUN dpkg --add-architecture i386 && apt-get update && apt-get -y install libc6:i386'
| docker build -t 'ubuntu-multilib:latest' -
- name: Run tests
run: >
chmod +x "${HOME}/jtreg/bin/jtreg" &&
Expand All @@ -624,7 +628,7 @@ jobs:
PRODUCT_HOME="${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}/j2sdk-image"
JT_HOME="${HOME}/jtreg"
ALT_OUTPUTDIR="${GITHUB_WORKSPACE}/test-results"
JAVA_ARGS="-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"
JAVA_ARGS="-Djdk.test.docker.image.name=ubuntu-multilib -Djdk.test.docker.image.version=latest"
JTREG_TIMEOUT_FACTOR="4"
make
"${{ matrix.suites }}"
Expand Down Expand Up @@ -1177,14 +1181,14 @@ jobs:
test:
- jdk/tier1
- langtools/tier1
# - hotspot/tier1
- hotspot/tier1
include:
- test: jdk/tier1
suites: jdk_tier1
- test: langtools/tier1
suites: langtools_tier1
# - test: hotspot/tier1
# suites: hotspot_tier1
- test: hotspot/tier1
suites: hotspot_tier1

env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}"
Expand Down Expand Up @@ -1557,6 +1561,7 @@ jobs:
continue-on-error: true
needs:
- prerequisites
- linux_additional_build
- linux_x64_test
- linux_x86_test
- windows_x64_test
Expand Down
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
project=jdk8u
jbs=JDK
version=openjdk8u362
version=openjdk8u372

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace
Expand Down
2 changes: 2 additions & 0 deletions common/autoconf/basics.m4
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
# Corresponds to --with-msvcr-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
# Corresponds to --with-vcruntime-1-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VCRUNTIME_1_DLL])
# Corresponds to --with-msvcp-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
# Corresponds to --with-ucrt-dll-dir
Expand Down
11 changes: 11 additions & 0 deletions common/autoconf/basics_windows.m4
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
path="[$]$1"
new_path=`$CYGPATH -u "$path"`
# preserve original basename
original_basename=`$BASENAME "${new_path}"`
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
Expand All @@ -130,6 +133,14 @@ AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
# If so, the updated path is stored in $new_path.
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path])
# get basename after fixup
fixed_basename=`$BASENAME "${new_path}"`
# if basename changed replace it with original value
if test "x$original_basename" != "x$fixed_basename"; then
new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
fi
if test "x$path" != "x$new_path"; then
$1="$new_path"
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
Expand Down
Loading

0 comments on commit 3b2b4b5

Please sign in to comment.