Skip to content

Commit b984b0a

Browse files
committed
8293107: GHA: Bump to Ubuntu 22.04
8293098: GHA: Harmonize GCC version handling for host and cross builds 8293361: GHA: dump config.log in case of configure failure 8295213: Run GHA manually with user-specified make and configure arguments 8295885: GHA: Bump gcc versions 8313428: GHA: Bump GCC versions for July 2023 updates Reviewed-by: clanger Backport-of: d7536588b38e368eaa6395bcbcc6724a39303fc5
1 parent c86ba43 commit b984b0a

File tree

5 files changed

+100
-26
lines changed

5 files changed

+100
-26
lines changed

.github/workflows/build-cross-compile.yml

+18-6
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,22 @@ on:
2929
workflow_call:
3030
inputs:
3131
gcc-major-version:
32+
required: true
33+
type: string
34+
extra-conf-options:
35+
required: false
36+
type: string
37+
configure-arguments:
38+
required: false
39+
type: string
40+
make-arguments:
3241
required: false
3342
type: string
34-
default: '10'
3543

3644
jobs:
3745
build-cross-compile:
3846
name: build
39-
runs-on: ubuntu-20.04
47+
runs-on: ubuntu-22.04
4048

4149
strategy:
4250
fail-fast: false
@@ -110,7 +118,7 @@ jobs:
110118
--verbose
111119
--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
112120
--resolve-deps
113-
buster
121+
bullseye
114122
sysroot
115123
https://httpredir.debian.org/debian/
116124
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
@@ -135,12 +143,16 @@ jobs:
135143
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
136144
--with-sysroot=sysroot
137145
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
138-
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-10
139-
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-10
146+
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-${{ inputs.gcc-major-version }}
147+
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-${{ inputs.gcc-major-version }}
148+
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
149+
echo "Dumping config.log:" &&
150+
cat config.log &&
151+
exit 1)
140152
141153
- name: 'Build'
142154
id: build
143155
uses: ./.github/actions/do-build
144156
with:
145-
make-target: 'hotspot'
157+
make-target: 'hotspot ${{ inputs.make-arguments }}'
146158
platform: linux-${{ matrix.target-cpu }}

.github/workflows/build-linux.yml

+19-6
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,30 @@ on:
4242
required: false
4343
type: string
4444
default: '[ "debug", "release" ]'
45-
apt-gcc-version:
45+
gcc-major-version:
4646
required: true
4747
type: string
48+
gcc-package-suffix:
49+
required: false
50+
type: string
51+
default: ''
4852
apt-architecture:
4953
required: false
5054
type: string
5155
apt-extra-packages:
5256
required: false
5357
type: string
58+
configure-arguments:
59+
required: false
60+
type: string
61+
make-arguments:
62+
required: false
63+
type: string
5464

5565
jobs:
5666
build-linux:
5767
name: build
58-
runs-on: ubuntu-20.04
68+
runs-on: ubuntu-22.04
5969

6070
strategy:
6171
fail-fast: false
@@ -97,8 +107,8 @@ jobs:
97107
fi
98108
sudo apt-get update
99109
sudo apt-get install --only-upgrade apt
100-
sudo apt-get install gcc-${{ inputs.apt-gcc-version }} g++-${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
101-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
110+
sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
111+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
102112
103113
- name: 'Configure'
104114
run: >
@@ -110,13 +120,16 @@ jobs:
110120
--with-jtreg=${{ steps.jtreg.outputs.path }}
111121
--enable-jtreg-failure-handler
112122
--with-zlib=system
113-
${{ inputs.extra-conf-options }}
123+
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
124+
echo "Dumping config.log:" &&
125+
cat config.log &&
126+
exit 1)
114127
115128
- name: 'Build'
116129
id: build
117130
uses: ./.github/actions/do-build
118131
with:
119-
make-target: '${{ inputs.make-target }}'
132+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
120133
platform: ${{ inputs.platform }}
121134
debug-suffix: '${{ matrix.suffix }}'
122135

.github/workflows/build-macos.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ on:
4545
xcode-toolset-version:
4646
required: true
4747
type: string
48+
configure-arguments:
49+
required: false
50+
type: string
51+
make-arguments:
52+
required: false
53+
type: string
4854

4955
jobs:
5056
build-macos:
@@ -92,13 +98,16 @@ jobs:
9298
--with-jtreg=${{ steps.jtreg.outputs.path }}
9399
--enable-jtreg-failure-handler
94100
--with-zlib=system
95-
${{ inputs.extra-conf-options }}
101+
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
102+
echo "Dumping config.log:" &&
103+
cat config.log &&
104+
exit 1)
96105
97106
- name: 'Build'
98107
id: build
99108
uses: ./.github/actions/do-build
100109
with:
101-
make-target: '${{ inputs.make-target }}'
110+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
102111
platform: ${{ inputs.platform }}
103112
debug-suffix: '${{ matrix.suffix }}'
104113

.github/workflows/build-windows.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ on:
4848
msvc-toolset-architecture:
4949
required: true
5050
type: string
51+
configure-arguments:
52+
required: false
53+
type: string
54+
make-arguments:
55+
required: false
56+
type: string
5157

5258
env:
5359
# These are needed to make the MSYS2 bash work properly
@@ -119,7 +125,10 @@ jobs:
119125
--with-jtreg=${{ steps.jtreg.outputs.path }}
120126
--enable-jtreg-failure-handler
121127
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
122-
${{ inputs.extra-conf-options }}
128+
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
129+
echo "Dumping config.log:" &&
130+
cat config.log &&
131+
exit 1)
123132
env:
124133
# We need a minimal PATH on Windows
125134
# Set PATH to "", so just GITHUB_PATH is included
@@ -129,7 +138,7 @@ jobs:
129138
id: build
130139
uses: ./.github/actions/do-build
131140
with:
132-
make-target: '${{ inputs.make-target }}'
141+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
133142
platform: ${{ inputs.platform }}
134143
debug-suffix: '${{ matrix.suffix }}'
135144

.github/workflows/main.yml

+41-10
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ on:
3636
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
3737
required: true
3838
default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64'
39+
configure-arguments:
40+
description: 'Additional configure arguments'
41+
required: false
42+
make-arguments:
43+
description: 'Additional make arguments'
44+
required: false
3945

4046
concurrency:
4147
group: ${{ github.workflow }}-${{ github.ref }}
@@ -49,7 +55,7 @@ jobs:
4955

5056
select:
5157
name: 'Select platforms'
52-
runs-on: ubuntu-20.04
58+
runs-on: ubuntu-22.04
5359
outputs:
5460
linux-x64: ${{ steps.include.outputs.linux-x64 }}
5561
linux-x86: ${{ steps.include.outputs.linux-x86 }}
@@ -121,7 +127,9 @@ jobs:
121127
uses: ./.github/workflows/build-linux.yml
122128
with:
123129
platform: linux-x64
124-
apt-gcc-version: '10'
130+
gcc-major-version: '10'
131+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
132+
make-arguments: ${{ github.event.inputs.make-arguments }}
125133
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
126134
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
127135

@@ -131,12 +139,15 @@ jobs:
131139
uses: ./.github/workflows/build-linux.yml
132140
with:
133141
platform: linux-x86
134-
apt-gcc-version: '10-multilib'
142+
gcc-major-version: '10'
143+
gcc-package-suffix: '-multilib'
135144
apt-architecture: 'i386'
136145
# Some multilib libraries do not have proper inter-dependencies, so we have to
137146
# install their dependencies manually.
138147
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
139148
extra-conf-options: '--with-target-bits=32'
149+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
150+
make-arguments: ${{ github.event.inputs.make-arguments }}
140151
if: needs.select.outputs.linux-x86 == 'true'
141152

142153
build-linux-x64-hs-nopch:
@@ -147,8 +158,10 @@ jobs:
147158
platform: linux-x64
148159
make-target: 'hotspot'
149160
debug-levels: '[ "debug" ]'
150-
apt-gcc-version: '10'
161+
gcc-major-version: '10'
151162
extra-conf-options: '--disable-precompiled-headers'
163+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
164+
make-arguments: ${{ github.event.inputs.make-arguments }}
152165
if: needs.select.outputs.linux-x64-variants == 'true'
153166

154167
build-linux-x64-hs-zero:
@@ -159,8 +172,10 @@ jobs:
159172
platform: linux-x64
160173
make-target: 'hotspot'
161174
debug-levels: '[ "debug" ]'
162-
apt-gcc-version: '10'
175+
gcc-major-version: '10'
163176
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
177+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
178+
make-arguments: ${{ github.event.inputs.make-arguments }}
164179
if: needs.select.outputs.linux-x64-variants == 'true'
165180

166181
build-linux-x64-hs-minimal:
@@ -171,8 +186,10 @@ jobs:
171186
platform: linux-x64
172187
make-target: 'hotspot'
173188
debug-levels: '[ "debug" ]'
174-
apt-gcc-version: '10'
189+
gcc-major-version: '10'
175190
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
191+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
192+
make-arguments: ${{ github.event.inputs.make-arguments }}
176193
if: needs.select.outputs.linux-x64-variants == 'true'
177194

178195
build-linux-x64-hs-optimized:
@@ -184,8 +201,10 @@ jobs:
184201
make-target: 'hotspot'
185202
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
186203
debug-levels: '[ "debug" ]'
187-
apt-gcc-version: '10'
204+
gcc-major-version: '10'
188205
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
206+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
207+
make-arguments: ${{ github.event.inputs.make-arguments }}
189208
if: needs.select.outputs.linux-x64-variants == 'true'
190209

191210
build-linux-cross-compile:
@@ -194,6 +213,10 @@ jobs:
194213
- select
195214
- build-linux-x64
196215
uses: ./.github/workflows/build-cross-compile.yml
216+
with:
217+
gcc-major-version: '10'
218+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
219+
make-arguments: ${{ github.event.inputs.make-arguments }}
197220
if: needs.select.outputs.linux-cross-compile == 'true'
198221

199222
build-macos-x64:
@@ -203,6 +226,8 @@ jobs:
203226
with:
204227
platform: macos-x64
205228
xcode-toolset-version: '11.7'
229+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
230+
make-arguments: ${{ github.event.inputs.make-arguments }}
206231
if: needs.select.outputs.macos-x64 == 'true'
207232

208233
build-macos-aarch64:
@@ -213,6 +238,8 @@ jobs:
213238
platform: macos-aarch64
214239
xcode-toolset-version: '12.4'
215240
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
241+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
242+
make-arguments: ${{ github.event.inputs.make-arguments }}
216243
if: needs.select.outputs.macos-aarch64 == 'true'
217244

218245
build-windows-x64:
@@ -223,6 +250,8 @@ jobs:
223250
platform: windows-x64
224251
msvc-toolset-version: '14.29'
225252
msvc-toolset-architecture: 'x86.x64'
253+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
254+
make-arguments: ${{ github.event.inputs.make-arguments }}
226255
if: needs.select.outputs.windows-x64 == 'true'
227256

228257
build-windows-aarch64:
@@ -235,6 +264,8 @@ jobs:
235264
msvc-toolset-architecture: 'arm64'
236265
make-target: 'hotspot'
237266
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
267+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
268+
make-arguments: ${{ github.event.inputs.make-arguments }}
238269
if: needs.select.outputs.windows-aarch64 == 'true'
239270

240271
###
@@ -249,7 +280,7 @@ jobs:
249280
with:
250281
platform: linux-x64
251282
bootjdk-platform: linux-x64
252-
runs-on: ubuntu-20.04
283+
runs-on: ubuntu-22.04
253284

254285
test-linux-x86:
255286
name: linux-x86
@@ -259,7 +290,7 @@ jobs:
259290
with:
260291
platform: linux-x86
261292
bootjdk-platform: linux-x64
262-
runs-on: ubuntu-20.04
293+
runs-on: ubuntu-22.04
263294

264295
test-macos-x64:
265296
name: macos-x64
@@ -284,7 +315,7 @@ jobs:
284315
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
285316
remove-bundles:
286317
name: 'Remove bundle artifacts'
287-
runs-on: ubuntu-20.04
318+
runs-on: ubuntu-22.04
288319
if: always()
289320
needs:
290321
- build-linux-x64

0 commit comments

Comments
 (0)