From 760a260fbbe733a76c18e4d630999c94ac8cfe63 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Wed, 12 Oct 2022 13:34:50 +0000 Subject: [PATCH] 8295213: Run GHA manually with user-specified make and configure arguments Reviewed-by: shade --- .github/workflows/build-cross-compile.yml | 10 ++++++-- .github/workflows/build-linux.yml | 10 ++++++-- .github/workflows/build-macos.yml | 10 ++++++-- .github/workflows/build-windows.yml | 10 ++++++-- .github/workflows/main.yml | 28 +++++++++++++++++++++++ 5 files changed, 60 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-cross-compile.yml b/.github/workflows/build-cross-compile.yml index 2bea6a2f1b8..eae3fd9157b 100644 --- a/.github/workflows/build-cross-compile.yml +++ b/.github/workflows/build-cross-compile.yml @@ -40,6 +40,12 @@ on: extra-conf-options: required: false type: string + configure-arguments: + required: false + type: string + make-arguments: + required: false + type: string jobs: build-cross-compile: @@ -165,7 +171,7 @@ jobs: --with-jmod-compress=zip-1 CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-${{ inputs.gcc-major-version }} CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-${{ inputs.gcc-major-version }} - ${{ inputs.extra-conf-options }} || ( + ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || ( echo "Dumping config.log:" && cat config.log && exit 1) @@ -174,5 +180,5 @@ jobs: id: build uses: ./.github/actions/do-build with: - make-target: 'hotspot' + make-target: 'hotspot ${{ inputs.make-arguments }}' platform: linux-${{ matrix.target-cpu }} diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 8a8e40baaea..5057eb4f0fc 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -58,6 +58,12 @@ on: apt-extra-packages: required: false type: string + configure-arguments: + required: false + type: string + make-arguments: + required: false + type: string jobs: build-linux: @@ -123,7 +129,7 @@ jobs: --enable-jtreg-failure-handler --with-zlib=system --with-jmod-compress=zip-1 - ${{ inputs.extra-conf-options }} || ( + ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || ( echo "Dumping config.log:" && cat config.log && exit 1) @@ -132,7 +138,7 @@ jobs: id: build uses: ./.github/actions/do-build with: - make-target: '${{ inputs.make-target }}' + make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}' platform: ${{ inputs.platform }} debug-suffix: '${{ matrix.suffix }}' diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index d7221484729..55851907769 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -45,6 +45,12 @@ on: xcode-toolset-version: required: true type: string + configure-arguments: + required: false + type: string + make-arguments: + required: false + type: string jobs: build-macos: @@ -98,7 +104,7 @@ jobs: --enable-jtreg-failure-handler --with-zlib=system --with-jmod-compress=zip-1 - ${{ inputs.extra-conf-options }} || ( + ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || ( echo "Dumping config.log:" && cat config.log && exit 1) @@ -107,7 +113,7 @@ jobs: id: build uses: ./.github/actions/do-build with: - make-target: '${{ inputs.make-target }}' + make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}' platform: ${{ inputs.platform }} debug-suffix: '${{ matrix.suffix }}' diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 72ddf1a595d..e57db3b63e8 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -48,6 +48,12 @@ on: msvc-toolset-architecture: required: true type: string + configure-arguments: + required: false + type: string + make-arguments: + required: false + type: string env: # These are needed to make the MSYS2 bash work properly @@ -111,7 +117,7 @@ jobs: --enable-jtreg-failure-handler --with-msvc-toolset-version=${{ inputs.msvc-toolset-version }} --with-jmod-compress=zip-1 - ${{ inputs.extra-conf-options }} || ( + ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || ( echo "Dumping config.log:" && cat config.log && exit 1) @@ -124,7 +130,7 @@ jobs: id: build uses: ./.github/actions/do-build with: - make-target: '${{ inputs.make-target }}' + make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}' platform: ${{ inputs.platform }} debug-suffix: '${{ matrix.suffix }}' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ebd7cc68766..fd01dfdce95 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,6 +36,12 @@ on: description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")' required: true default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64' + configure-arguments: + description: 'Additional configure arguments' + required: false + make-arguments: + description: 'Additional make arguments' + required: false concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -125,6 +131,8 @@ jobs: platform: linux-x64 gcc-major-version: '10' apt-gcc-version: '10.3.0-15ubuntu1' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} # The linux-x64 jdk bundle is used as buildjdk for the cross-compile job if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true' @@ -142,6 +150,8 @@ jobs: # install their dependencies manually. apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386' extra-conf-options: '--with-target-bits=32' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.linux-x86 == 'true' build-linux-x64-hs-nopch: @@ -155,6 +165,8 @@ jobs: gcc-major-version: '10' apt-gcc-version: '10.3.0-15ubuntu1' extra-conf-options: '--disable-precompiled-headers' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.linux-x64-variants == 'true' build-linux-x64-hs-zero: @@ -168,6 +180,8 @@ jobs: gcc-major-version: '10' apt-gcc-version: '10.3.0-15ubuntu1' extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.linux-x64-variants == 'true' build-linux-x64-hs-minimal: @@ -181,6 +195,8 @@ jobs: gcc-major-version: '10' apt-gcc-version: '10.3.0-15ubuntu1' extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.linux-x64-variants == 'true' build-linux-x64-hs-optimized: @@ -195,6 +211,8 @@ jobs: gcc-major-version: '10' apt-gcc-version: '10.3.0-15ubuntu1' extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.linux-x64-variants == 'true' build-linux-cross-compile: @@ -207,6 +225,8 @@ jobs: gcc-major-version: '10' apt-gcc-version: '10.3.0-15ubuntu1' apt-gcc-cross-version: '10.3.0-8ubuntu1cross1' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.linux-cross-compile == 'true' build-macos-x64: @@ -216,6 +236,8 @@ jobs: with: platform: macos-x64 xcode-toolset-version: '11.7' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.macos-x64 == 'true' build-macos-aarch64: @@ -226,6 +248,8 @@ jobs: platform: macos-aarch64 xcode-toolset-version: '12.4' extra-conf-options: '--openjdk-target=aarch64-apple-darwin' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.macos-aarch64 == 'true' build-windows-x64: @@ -236,6 +260,8 @@ jobs: platform: windows-x64 msvc-toolset-version: '14.29' msvc-toolset-architecture: 'x86.x64' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.windows-x64 == 'true' build-windows-aarch64: @@ -248,6 +274,8 @@ jobs: msvc-toolset-architecture: 'arm64' make-target: 'hotspot' extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin' + configure-arguments: ${{ github.event.inputs.configure-arguments }} + make-arguments: ${{ github.event.inputs.make-arguments }} if: needs.select.outputs.windows-aarch64 == 'true' ###