From 130ac13cb9c2dede4ceede4ad6c3c820fdea2fe3 Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Tue, 3 Sep 2024 19:04:04 +0000 Subject: [PATCH] 8337265: Test static-libs build in GitHub Actions Reviewed-by: erikj, ihse --- .github/actions/upload-bundles/action.yml | 8 ++++++-- .github/workflows/build-linux.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/actions/upload-bundles/action.yml b/.github/actions/upload-bundles/action.yml index b35ee3a42e9..4e974ae58ba 100644 --- a/.github/actions/upload-bundles/action.yml +++ b/.github/actions/upload-bundles/action.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -45,6 +45,7 @@ runs: jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)" symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)" tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)" + static_libs_bundle="$(ls build/*/bundles/jdk-*_bin-static-libs${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)" mkdir bundles @@ -60,8 +61,11 @@ runs: if [[ "$tests_bundle" != "" ]]; then mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz" fi + if [[ "$static_libs_bundle" != "" ]]; then + mv "$static_libs_bundle" "bundles/static-libs-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz" + fi - if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle" != "" ]]; then + if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then echo 'bundles-found=true' >> $GITHUB_OUTPUT else echo 'bundles-found=false' >> $GITHUB_OUTPUT diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index f3ea4e4fb6a..b1d4278f8b4 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -133,8 +133,12 @@ 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 }} ${{ inputs.make-arguments }}' + make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}' platform: ${{ inputs.platform }} debug-suffix: '${{ matrix.suffix }}'