Skip to content

Commit bd112c4

Browse files
committed
8350443: GHA: Split static-libs-bundles into a separate job
Reviewed-by: ihse, yzheng
1 parent 2731712 commit bd112c4

File tree

3 files changed

+31
-13
lines changed

3 files changed

+31
-13
lines changed

.github/actions/upload-bundles/action.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ inputs:
3232
debug-suffix:
3333
description: 'File name suffix denoting debug level, possibly empty'
3434
required: false
35+
bundle-suffix:
36+
description: 'Bundle name suffix, possibly empty'
37+
required: false
3538

3639
runs:
3740
using: composite
@@ -75,7 +78,7 @@ runs:
7578
- name: 'Upload bundles artifact'
7679
uses: actions/upload-artifact@v4
7780
with:
78-
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
81+
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.bundle-suffix }}
7982
path: bundles
8083
retention-days: 1
8184
if: steps.bundles.outputs.bundles-found == 'true'

.github/workflows/build-linux.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ on:
6161
make-arguments:
6262
required: false
6363
type: string
64+
bundle-suffix:
65+
required: false
66+
type: string
6467

6568
jobs:
6669
build-linux:
@@ -71,10 +74,6 @@ jobs:
7174
fail-fast: false
7275
matrix:
7376
debug-level: ${{ fromJSON(inputs.debug-levels) }}
74-
include:
75-
- debug-level: debug
76-
flags: --with-debug-level=fastdebug
77-
suffix: -debug
7877

7978
steps:
8079
- name: 'Checkout the JDK source'
@@ -118,7 +117,7 @@ jobs:
118117
run: >
119118
bash configure
120119
--with-conf-name=${{ inputs.platform }}
121-
${{ matrix.flags }}
120+
${{ matrix.debug-level == 'debug' && '--with-debug-level=fastdebug' || '' }}
122121
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
123122
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
124123
--with-jtreg=${{ steps.jtreg.outputs.path }}
@@ -133,17 +132,14 @@ jobs:
133132
- name: 'Build'
134133
id: build
135134
uses: ./.github/actions/do-build
136-
env:
137-
# Only build static-libs-bundles for release builds.
138-
# For debug builds, building static-libs often exceeds disk space.
139-
STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }}
140135
with:
141-
make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
136+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
142137
platform: ${{ inputs.platform }}
143-
debug-suffix: '${{ matrix.suffix }}'
138+
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
144139

145140
- name: 'Upload bundles'
146141
uses: ./.github/actions/upload-bundles
147142
with:
148143
platform: ${{ inputs.platform }}
149-
debug-suffix: '${{ matrix.suffix }}'
144+
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
145+
bundle-suffix: ${{ inputs.bundle-suffix }}

.github/workflows/main.yml

+19
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,25 @@ jobs:
225225
make-arguments: ${{ github.event.inputs.make-arguments }}
226226
if: needs.prepare.outputs.linux-x64-variants == 'true'
227227

228+
build-linux-x64-static-libs:
229+
name: linux-x64-static-libs
230+
needs: prepare
231+
uses: ./.github/workflows/build-linux.yml
232+
with:
233+
platform: linux-x64
234+
make-target: 'static-libs-bundles'
235+
# Only build static-libs-bundles for release builds.
236+
# For debug builds, building static-libs often exceeds disk space.
237+
debug-levels: '[ "release" ]'
238+
gcc-major-version: '10'
239+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
240+
make-arguments: ${{ github.event.inputs.make-arguments }}
241+
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
242+
# This bundle is not used by testing jobs, but downstreams use it to check that
243+
# dependent projects, e.g. libgraal, builds fine.
244+
bundle-suffix: "-static-libs"
245+
if: needs.prepare.outputs.linux-x64-variants == 'true'
246+
228247
build-linux-cross-compile:
229248
name: linux-cross-compile
230249
needs: prepare

0 commit comments

Comments
 (0)