Skip to content

8350443: GHA: Split static-libs-bundles into a separate job #23715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/actions/upload-bundles/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
debug-suffix:
description: 'File name suffix denoting debug level, possibly empty'
required: false
bundle-suffix:
description: 'Bundle name suffix, possibly empty'
required: false

runs:
using: composite
Expand Down Expand Up @@ -75,7 +78,7 @@ runs:
- name: 'Upload bundles artifact'
uses: actions/upload-artifact@v4
with:
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.bundle-suffix }}
path: bundles
retention-days: 1
if: steps.bundles.outputs.bundles-found == 'true'
20 changes: 8 additions & 12 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ on:
make-arguments:
required: false
type: string
bundle-suffix:
required: false
type: string

jobs:
build-linux:
Expand All @@ -71,10 +74,6 @@ jobs:
fail-fast: false
matrix:
debug-level: ${{ fromJSON(inputs.debug-levels) }}
include:
- debug-level: debug
flags: --with-debug-level=fastdebug
suffix: -debug

steps:
- name: 'Checkout the JDK source'
Expand Down Expand Up @@ -118,7 +117,7 @@ jobs:
run: >
bash configure
--with-conf-name=${{ inputs.platform }}
${{ matrix.flags }}
${{ matrix.debug-level == 'debug' && '--with-debug-level=fastdebug' || '' }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
--with-jtreg=${{ steps.jtreg.outputs.path }}
Expand All @@ -133,17 +132,14 @@ jobs:
- name: 'Build'
id: build
uses: ./.github/actions/do-build
env:
# Only build static-libs-bundles for release builds.
# For debug builds, building static-libs often exceeds disk space.
STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }}
with:
make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"

- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
with:
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
bundle-suffix: ${{ inputs.bundle-suffix }}
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,25 @@ jobs:
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-x64-variants == 'true'

build-linux-x64-static-libs:
name: linux-x64-static-libs
needs: prepare
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
make-target: 'static-libs-bundles'
# Only build static-libs-bundles for release builds.
# For debug builds, building static-libs often exceeds disk space.
debug-levels: '[ "release" ]'
gcc-major-version: '10'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
# This bundle is not used by testing jobs, but downstreams use it to check that
# dependent projects, e.g. libgraal, builds fine.
bundle-suffix: "-static-libs"
if: needs.prepare.outputs.linux-x64-variants == 'true'

build-linux-cross-compile:
name: linux-cross-compile
needs: prepare
Expand Down