Skip to content

Commit fd99463

Browse files
committed
Merge tag 'jdk-20-ga' of https://github.com/openjdk/jdk into jdk-20
Added tag jdk-20-ga for changeset 8274990
2 parents 646cd27 + 8274990 commit fd99463

File tree

9,672 files changed

+491750
-356957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,672 files changed

+491750
-356957
lines changed

.github/actions/config/action.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#
2+
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
name: 'Config'
27+
description: 'Read JDK Configuration Variables'
28+
inputs:
29+
var:
30+
description: 'The name of the variable to read'
31+
required: true
32+
outputs:
33+
value:
34+
description: 'The value of the configuration variable'
35+
value: ${{ steps.read-config.outputs.value }}
36+
37+
runs:
38+
using: composite
39+
steps:
40+
- name: 'Read configuration variable from repo'
41+
id: read-config
42+
run: |
43+
# Extract value from configuration file
44+
value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
45+
echo "value=$value" >> $GITHUB_OUTPUT
46+
shell: bash

.github/actions/do-build/action.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#
2+
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
name: 'Do build'
27+
description: 'Build the JDK using make'
28+
inputs:
29+
make-target:
30+
description: 'Make target(s)'
31+
required: true
32+
platform:
33+
description: 'Platform name'
34+
required: true
35+
debug-suffix:
36+
description: 'File name suffix denoting debug level, possibly empty'
37+
required: false
38+
39+
runs:
40+
using: composite
41+
steps:
42+
- name: 'Build'
43+
id: build
44+
run: >
45+
make LOG=info ${{ inputs.make-target }}
46+
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
47+
shell: bash
48+
49+
- name: 'Check for failure'
50+
id: check
51+
run: |
52+
# Check for failure marker file
53+
build_dir="$(ls -d build/*)"
54+
if [[ -e $build_dir/build-failure ]]; then
55+
# Collect relevant log files
56+
mkdir failure-logs
57+
cp \
58+
$build_dir/spec.gmk \
59+
$build_dir/build.log \
60+
$build_dir/configure.log \
61+
$build_dir/make-support/failure-summary.log \
62+
$build_dir/make-support/failure-logs/* \
63+
failure-logs/ 2> /dev/null || true
64+
echo 'failure=true' >> $GITHUB_OUTPUT
65+
fi
66+
shell: bash
67+
68+
- name: 'Upload build logs'
69+
uses: actions/upload-artifact@v3
70+
with:
71+
name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
72+
path: failure-logs
73+
if: steps.check.outputs.failure == 'true'
74+
75+
# This is the best way I found to abort the job with an error message
76+
- name: 'Notify about build failures'
77+
uses: actions/github-script@v6
78+
with:
79+
script: core.setFailed('Build failed. See summary for details.')
80+
if: steps.check.outputs.failure == 'true'
+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#
2+
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
name: 'Get BootJDK'
27+
description: 'Download the BootJDK from cache or source location'
28+
inputs:
29+
platform:
30+
description: 'Platform'
31+
required: true
32+
outputs:
33+
path:
34+
description: 'Path to the installed BootJDK'
35+
value: ${{ steps.path-name.outputs.path }}
36+
37+
runs:
38+
using: composite
39+
steps:
40+
- name: 'Determine platform prefix'
41+
id: platform-prefix
42+
run: |
43+
# Convert platform name to upper case
44+
platform_prefix="$(echo ${{ inputs.platform }} | tr [a-z-] [A-Z_])"
45+
echo "value=$platform_prefix" >> $GITHUB_OUTPUT
46+
shell: bash
47+
48+
- name: 'Get URL configuration'
49+
id: url
50+
uses: ./.github/actions/config
51+
with:
52+
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_URL
53+
54+
- name: 'Get SHA256 configuration'
55+
id: sha256
56+
uses: ./.github/actions/config
57+
with:
58+
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_SHA256
59+
60+
- name: 'Get file extension configuration'
61+
id: ext
62+
uses: ./.github/actions/config
63+
with:
64+
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_EXT
65+
66+
- name: 'Check cache for BootJDK'
67+
id: get-cached-bootjdk
68+
uses: actions/cache@v3
69+
with:
70+
path: bootjdk/jdk
71+
key: boot-jdk-${{ inputs.platform }}-${{ steps.sha256.outputs.value }}
72+
73+
# macOS is missing sha256sum
74+
- name: 'Install sha256sum'
75+
run: |
76+
# Run Homebrew installation
77+
brew install coreutils
78+
shell: bash
79+
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true' && runner.os == 'macOS'
80+
81+
- name: 'Download BootJDK'
82+
run: |
83+
# Download BootJDK and verify checksum
84+
mkdir -p bootjdk/jdk
85+
mkdir -p bootjdk/unpacked
86+
wget --progress=dot:mega -O bootjdk/jdk.${{ steps.ext.outputs.value }} '${{ steps.url.outputs.value }}'
87+
echo '${{ steps.sha256.outputs.value }} bootjdk/jdk.${{ steps.ext.outputs.value }}' | sha256sum -c >/dev/null -
88+
shell: bash
89+
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
90+
91+
- name: 'Unpack BootJDK'
92+
run: |
93+
# Unpack the BootJDK and move files to a common location
94+
if [[ '${{ steps.ext.outputs.value }}' == 'tar.gz' ]]; then
95+
tar -xf bootjdk/jdk.${{ steps.ext.outputs.value }} -C bootjdk/unpacked
96+
else
97+
unzip -q bootjdk/jdk.${{ steps.ext.outputs.value }} -d bootjdk/unpacked
98+
fi
99+
jdk_root="$(dirname $(find bootjdk/unpacked -name bin -type d))"
100+
mv "$jdk_root"/* bootjdk/jdk/
101+
shell: bash
102+
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
103+
104+
- name: 'Export path to where BootJDK is installed'
105+
id: path-name
106+
run: |
107+
# Export the path
108+
echo 'path=bootjdk/jdk' >> $GITHUB_OUTPUT
109+
shell: bash
+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#
2+
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
name: 'Get bundles'
27+
description: 'Download resulting JDK bundles'
28+
inputs:
29+
platform:
30+
description: 'Platform name'
31+
required: true
32+
debug-suffix:
33+
description: 'File name suffix denoting debug level, possibly empty'
34+
required: false
35+
outputs:
36+
jdk-path:
37+
description: 'Path to the installed JDK bundle'
38+
value: ${{ steps.path-name.outputs.jdk }}
39+
symbols-path:
40+
description: 'Path to the installed symbols bundle'
41+
value: ${{ steps.path-name.outputs.symbols }}
42+
tests-path:
43+
description: 'Path to the installed tests bundle'
44+
value: ${{ steps.path-name.outputs.tests }}
45+
46+
runs:
47+
using: composite
48+
steps:
49+
- name: 'Download bundles artifact'
50+
id: download-bundles
51+
uses: actions/download-artifact@v3
52+
with:
53+
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
54+
path: bundles
55+
continue-on-error: true
56+
57+
- name: 'Download bundles artifact (retry)'
58+
uses: actions/download-artifact@v3
59+
with:
60+
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
61+
path: bundles
62+
if: steps.download-bundles.outcome == 'failure'
63+
64+
- name: 'Unpack bundles'
65+
run: |
66+
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
67+
echo 'Unpacking jdk bundle...'
68+
mkdir -p bundles/jdk
69+
unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip -d bundles/jdk
70+
fi
71+
72+
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
73+
echo 'Unpacking jdk bundle...'
74+
mkdir -p bundles/jdk
75+
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
76+
fi
77+
78+
if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
79+
echo 'Unpacking symbols bundle...'
80+
mkdir -p bundles/symbols
81+
tar -xf bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/symbols
82+
fi
83+
84+
if [[ -e bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
85+
echo 'Unpacking tests bundle...'
86+
mkdir -p bundles/tests
87+
tar -xf bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/tests
88+
fi
89+
shell: bash
90+
91+
- name: 'Export paths to where bundles are installed'
92+
id: path-name
93+
run: |
94+
# Export the paths
95+
96+
jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/jdk -name bin -type d))"
97+
symbols_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/symbols -name bin -type d))"
98+
tests_dir="$GITHUB_WORKSPACE/bundles/tests"
99+
100+
if [[ '${{ runner.os }}' == 'Windows' ]]; then
101+
jdk_dir="$(cygpath $jdk_dir)"
102+
symbols_dir="$(cygpath $symbols_dir)"
103+
tests_dir="$(cygpath $tests_dir)"
104+
fi
105+
106+
echo "jdk=$jdk_dir" >> $GITHUB_OUTPUT
107+
echo "symbols=$symbols_dir" >> $GITHUB_OUTPUT
108+
echo "tests=$tests_dir" >> $GITHUB_OUTPUT
109+
shell: bash

0 commit comments

Comments
 (0)