Skip to content

Commit 260f287

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 8313428: GHA: Bump GCC versions for July 2023 updates 8313707: GHA: Bootstrap sysroots with --variant=minbase Reviewed-by: clanger Backport-of: d7536588b38e368eaa6395bcbcc6724a39303fc5
1 parent d7b3306 commit 260f287

File tree

5 files changed

+113
-29
lines changed

5 files changed

+113
-29
lines changed

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

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,23 @@ on:
2929
workflow_call:
3030
inputs:
3131
gcc-major-version:
32-
required: false
32+
required: true
3333
type: string
34-
default: '10'
3534
apt-gcc-version:
35+
required: true
36+
type: string
37+
apt-gcc-cross-version:
38+
required: true
39+
type: string
40+
extra-conf-options:
41+
required: false
42+
type: string
43+
configure-arguments:
3644
required: false
3745
type: string
38-
default: '10.4.0-4ubuntu1~22.04'
39-
apt-gcc-cross-suffix:
46+
make-arguments:
4047
required: false
4148
type: string
42-
default: 'cross1'
4349

4450
jobs:
4551
build-cross-compile:
@@ -109,8 +115,8 @@ jobs:
109115
sudo apt-get install \
110116
gcc-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
111117
g++-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
112-
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
113-
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
118+
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
119+
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
114120
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
115121
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 }}
116122
@@ -132,6 +138,7 @@ jobs:
132138
--verbose
133139
--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
134140
--resolve-deps
141+
--variant=minbase
135142
${{ matrix.debian-version }}
136143
sysroot
137144
${{ matrix.debian-repository }}
@@ -157,12 +164,16 @@ jobs:
157164
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
158165
--with-sysroot=sysroot
159166
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
160-
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-10
161-
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-10
167+
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-${{ inputs.gcc-major-version }}
168+
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-${{ inputs.gcc-major-version }}
169+
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
170+
echo "Dumping config.log:" &&
171+
cat config.log &&
172+
exit 1)
162173
163174
- name: 'Build'
164175
id: build
165176
uses: ./.github/actions/do-build
166177
with:
167-
make-target: 'hotspot'
178+
make-target: 'hotspot ${{ inputs.make-arguments }}'
168179
platform: linux-${{ matrix.target-cpu }}

.github/workflows/build-linux.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ on:
4242
required: false
4343
type: string
4444
default: '[ "debug", "release" ]'
45+
gcc-major-version:
46+
required: true
47+
type: string
48+
gcc-package-suffix:
49+
required: false
50+
type: string
51+
default: ''
4552
apt-gcc-version:
4653
required: true
4754
type: string
@@ -51,11 +58,17 @@ on:
5158
apt-extra-packages:
5259
required: false
5360
type: string
61+
configure-arguments:
62+
required: false
63+
type: string
64+
make-arguments:
65+
required: false
66+
type: string
5467

5568
jobs:
5669
build-linux:
5770
name: build
58-
runs-on: ubuntu-20.04
71+
runs-on: ubuntu-22.04
5972

6073
strategy:
6174
fail-fast: false
@@ -101,8 +114,8 @@ jobs:
101114
fi
102115
sudo apt-get update
103116
sudo apt-get install --only-upgrade apt
104-
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 }}
105-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
117+
sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ inputs.apt-gcc-version }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ 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 }}
118+
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 }}
106119
107120
- name: 'Configure'
108121
run: >
@@ -115,13 +128,16 @@ jobs:
115128
--with-gtest=${{ steps.gtest.outputs.path }}
116129
--enable-jtreg-failure-handler
117130
--with-zlib=system
118-
${{ inputs.extra-conf-options }}
131+
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
132+
echo "Dumping config.log:" &&
133+
cat config.log &&
134+
exit 1)
119135
120136
- name: 'Build'
121137
id: build
122138
uses: ./.github/actions/do-build
123139
with:
124-
make-target: '${{ inputs.make-target }}'
140+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
125141
platform: ${{ inputs.platform }}
126142
debug-suffix: '${{ matrix.suffix }}'
127143

.github/workflows/build-macos.yml

Lines changed: 11 additions & 2 deletions
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:
@@ -97,13 +103,16 @@ jobs:
97103
--with-gtest=${{ steps.gtest.outputs.path }}
98104
--enable-jtreg-failure-handler
99105
--with-zlib=system
100-
${{ inputs.extra-conf-options }}
106+
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
107+
echo "Dumping config.log:" &&
108+
cat config.log &&
109+
exit 1)
101110
102111
- name: 'Build'
103112
id: build
104113
uses: ./.github/actions/do-build
105114
with:
106-
make-target: '${{ inputs.make-target }}'
115+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
107116
platform: ${{ inputs.platform }}
108117
debug-suffix: '${{ matrix.suffix }}'
109118

.github/workflows/build-windows.yml

Lines changed: 11 additions & 2 deletions
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
@@ -124,7 +130,10 @@ jobs:
124130
--with-gtest=${{ steps.gtest.outputs.path }}
125131
--enable-jtreg-failure-handler
126132
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
127-
${{ inputs.extra-conf-options }}
133+
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
134+
echo "Dumping config.log:" &&
135+
cat config.log &&
136+
exit 1)
128137
env:
129138
# We need a minimal PATH on Windows
130139
# Set PATH to "", so just GITHUB_PATH is included
@@ -134,7 +143,7 @@ jobs:
134143
id: build
135144
uses: ./.github/actions/do-build
136145
with:
137-
make-target: '${{ inputs.make-target }}'
146+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
138147
platform: ${{ inputs.platform }}
139148
debug-suffix: '${{ matrix.suffix }}'
140149

.github/workflows/main.yml

Lines changed: 49 additions & 10 deletions
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,10 @@ jobs:
121127
uses: ./.github/workflows/build-linux.yml
122128
with:
123129
platform: linux-x64
124-
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
130+
gcc-major-version: '10'
131+
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
132+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
133+
make-arguments: ${{ github.event.inputs.make-arguments }}
125134
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
126135
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
127136

@@ -131,12 +140,16 @@ jobs:
131140
uses: ./.github/workflows/build-linux.yml
132141
with:
133142
platform: linux-x86
134-
apt-gcc-version: '10-multilib'
143+
gcc-major-version: '10'
144+
gcc-package-suffix: '-multilib'
145+
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
135146
apt-architecture: 'i386'
136147
# Some multilib libraries do not have proper inter-dependencies, so we have to
137148
# install their dependencies manually.
138149
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
139150
extra-conf-options: '--with-target-bits=32'
151+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
152+
make-arguments: ${{ github.event.inputs.make-arguments }}
140153
if: needs.select.outputs.linux-x86 == 'true'
141154

142155
build-linux-x64-hs-nopch:
@@ -147,8 +160,11 @@ jobs:
147160
platform: linux-x64
148161
make-target: 'hotspot'
149162
debug-levels: '[ "debug" ]'
150-
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
163+
gcc-major-version: '10'
164+
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
151165
extra-conf-options: '--disable-precompiled-headers'
166+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
167+
make-arguments: ${{ github.event.inputs.make-arguments }}
152168
if: needs.select.outputs.linux-x64-variants == 'true'
153169

154170
build-linux-x64-hs-zero:
@@ -159,8 +175,11 @@ jobs:
159175
platform: linux-x64
160176
make-target: 'hotspot'
161177
debug-levels: '[ "debug" ]'
162-
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
178+
gcc-major-version: '10'
179+
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
163180
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
181+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
182+
make-arguments: ${{ github.event.inputs.make-arguments }}
164183
if: needs.select.outputs.linux-x64-variants == 'true'
165184

166185
build-linux-x64-hs-minimal:
@@ -171,8 +190,11 @@ jobs:
171190
platform: linux-x64
172191
make-target: 'hotspot'
173192
debug-levels: '[ "debug" ]'
174-
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
193+
gcc-major-version: '10'
194+
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
175195
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
196+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
197+
make-arguments: ${{ github.event.inputs.make-arguments }}
176198
if: needs.select.outputs.linux-x64-variants == 'true'
177199

178200
build-linux-x64-hs-optimized:
@@ -184,8 +206,11 @@ jobs:
184206
make-target: 'hotspot'
185207
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
186208
debug-levels: '[ "debug" ]'
187-
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
209+
gcc-major-version: '10'
210+
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
188211
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
212+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
213+
make-arguments: ${{ github.event.inputs.make-arguments }}
189214
if: needs.select.outputs.linux-x64-variants == 'true'
190215

191216
build-linux-cross-compile:
@@ -194,6 +219,12 @@ jobs:
194219
- select
195220
- build-linux-x64
196221
uses: ./.github/workflows/build-cross-compile.yml
222+
with:
223+
gcc-major-version: '10'
224+
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
225+
apt-gcc-cross-version: '10.5.0-1ubuntu1~22.04cross1'
226+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
227+
make-arguments: ${{ github.event.inputs.make-arguments }}
197228
if: needs.select.outputs.linux-cross-compile == 'true'
198229

199230
build-macos-x64:
@@ -203,6 +234,8 @@ jobs:
203234
with:
204235
platform: macos-x64
205236
xcode-toolset-version: '12.5.1'
237+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
238+
make-arguments: ${{ github.event.inputs.make-arguments }}
206239
if: needs.select.outputs.macos-x64 == 'true'
207240

208241
build-macos-aarch64:
@@ -213,6 +246,8 @@ jobs:
213246
platform: macos-aarch64
214247
xcode-toolset-version: '12.5.1'
215248
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
249+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
250+
make-arguments: ${{ github.event.inputs.make-arguments }}
216251
if: needs.select.outputs.macos-aarch64 == 'true'
217252

218253
build-windows-x64:
@@ -223,6 +258,8 @@ jobs:
223258
platform: windows-x64
224259
msvc-toolset-version: '14.29'
225260
msvc-toolset-architecture: 'x86.x64'
261+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
262+
make-arguments: ${{ github.event.inputs.make-arguments }}
226263
if: needs.select.outputs.windows-x64 == 'true'
227264

228265
build-windows-aarch64:
@@ -235,6 +272,8 @@ jobs:
235272
msvc-toolset-architecture: 'arm64'
236273
make-target: 'hotspot'
237274
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
275+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
276+
make-arguments: ${{ github.event.inputs.make-arguments }}
238277
if: needs.select.outputs.windows-aarch64 == 'true'
239278

240279
###
@@ -249,7 +288,7 @@ jobs:
249288
with:
250289
platform: linux-x64
251290
bootjdk-platform: linux-x64
252-
runs-on: ubuntu-20.04
291+
runs-on: ubuntu-22.04
253292

254293
test-linux-x86:
255294
name: linux-x86
@@ -259,7 +298,7 @@ jobs:
259298
with:
260299
platform: linux-x86
261300
bootjdk-platform: linux-x64
262-
runs-on: ubuntu-20.04
301+
runs-on: ubuntu-22.04
263302

264303
test-macos-x64:
265304
name: macos-x64
@@ -284,7 +323,7 @@ jobs:
284323
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
285324
remove-bundles:
286325
name: 'Remove bundle artifacts'
287-
runs-on: ubuntu-20.04
326+
runs-on: ubuntu-22.04
288327
if: always()
289328
needs:
290329
- build-linux-x64

0 commit comments

Comments
 (0)