From a8a477b08c9afac5cb59535c659e7f6020a3307c Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 6 Aug 2026 15:21:48 +0000 Subject: [PATCH 1/3] ci(java-cloud-bom): optimize CI workflows and remove pre-install.sh This change optimizes java-cloud-bom CI pipelines and eliminates flakiness: - Removes java-cloud-bom/tests/pre-install.sh in favor of standard 'mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C'. - Adds quick-build profile to java-cloud-bom/pom.xml to skip unnecessary validation/format/checkstyle plugins during quick reactor installs. - Removes redundant javadoc, lint, and clirr jobs from java-cloud-bom-ci.yaml. - Inlines snapshot installation directly in workflow files. --- .../java-cloud-bom-bom-content-test.yaml | 10 +-- .github/workflows/java-cloud-bom-ci.yaml | 85 ++----------------- ...ava-cloud-bom-release-note-generation.yaml | 6 +- java-cloud-bom/pom.xml | 16 ++++ java-cloud-bom/tests/pre-install.sh | 43 ---------- 5 files changed, 31 insertions(+), 129 deletions(-) delete mode 100755 java-cloud-bom/tests/pre-install.sh diff --git a/.github/workflows/java-cloud-bom-bom-content-test.yaml b/.github/workflows/java-cloud-bom-bom-content-test.yaml index c95f2c03bf50..6ad0bca497f1 100644 --- a/.github/workflows/java-cloud-bom-bom-content-test.yaml +++ b/.github/workflows/java-cloud-bom-bom-content-test.yaml @@ -40,9 +40,8 @@ jobs: java-version: 11 cache: maven - run: java -version - - name: Pre-install all BOM modules to populate local cache - run: bash java-cloud-bom/tests/pre-install.sh - shell: bash + - name: Install snapshot modules locally + run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - name: Install BOMs run: | mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests @@ -70,9 +69,8 @@ jobs: distribution: zulu java-version: 11 - run: java -version - - name: Pre-install all BOM modules to populate local cache - run: bash java-cloud-bom/tests/pre-install.sh - shell: bash + - name: Install snapshot modules locally + run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - name: Install BOMs run: | mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests diff --git a/.github/workflows/java-cloud-bom-ci.yaml b/.github/workflows/java-cloud-bom-ci.yaml index bb5ce1dd05f1..6a34df0b3ddd 100644 --- a/.github/workflows/java-cloud-bom-ci.yaml +++ b/.github/workflows/java-cloud-bom-ci.yaml @@ -60,9 +60,8 @@ jobs: java-version: ${{matrix.java}} cache: 'maven' - run: java -version - - name: Pre-install all BOM modules to populate local cache - run: bash java-cloud-bom/tests/pre-install.sh - shell: bash + - name: Install snapshot modules locally + run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - run: .kokoro/build.sh env: JOB_TYPE: test @@ -92,9 +91,8 @@ jobs: java-version: 17 distribution: temurin cache: 'maven' - - name: Pre-install all BOM modules to populate local cache - run: bash java-cloud-bom/tests/pre-install.sh - shell: bash + - name: Install snapshot modules locally + run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - run: .kokoro/build.sh env: JOB_TYPE: test @@ -115,9 +113,8 @@ jobs: java-version: 8 cache: 'maven' - run: java -version - - name: Pre-install all BOM modules to populate local cache - run: bash java-cloud-bom/tests/pre-install.sh - shell: bash + - name: Install snapshot modules locally + run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - run: .kokoro/build.sh env: JOB_TYPE: test @@ -139,71 +136,7 @@ jobs: java-version: ${{matrix.java}} cache: 'maven' - run: java -version - - name: Pre-install all BOM modules to populate local cache - run: bash java-cloud-bom/tests/pre-install.sh - shell: bash + - name: Install snapshot modules locally + run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - run: .kokoro/dependencies.sh - javadoc: - needs: filter - if: ${{ needs.filter.outputs.library == 'true' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 - with: - distribution: temurin - java-version: 17 - cache: 'maven' - - run: java -version - - name: Pre-install all BOM modules to populate local cache - run: bash java-cloud-bom/tests/pre-install.sh - shell: bash - - run: .kokoro/build.sh - env: - JOB_TYPE: javadoc - lint: - needs: filter - if: ${{ needs.filter.outputs.library == 'true' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - fetch-depth: 0 - persist-credentials: false - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 - with: - distribution: temurin - java-version: 11 - cache: 'maven' - - run: java -version - - name: Pre-install all BOM modules to populate local cache - run: bash java-cloud-bom/tests/pre-install.sh - shell: bash - - run: .kokoro/build.sh - env: - JOB_TYPE: lint - HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }} - BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} - clirr: - needs: filter - if: ${{ needs.filter.outputs.library == 'true' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 - with: - distribution: temurin - java-version: 11 - cache: 'maven' - - run: java -version - - name: Pre-install all BOM modules to populate local cache - run: bash java-cloud-bom/tests/pre-install.sh - shell: bash - - run: .kokoro/build.sh - env: - JOB_TYPE: clirr - BUILD_SUBDIR: java-cloud-bom + diff --git a/.github/workflows/java-cloud-bom-release-note-generation.yaml b/.github/workflows/java-cloud-bom-release-note-generation.yaml index 1f1152f995a6..e0fcb6ce6b84 100644 --- a/.github/workflows/java-cloud-bom-release-note-generation.yaml +++ b/.github/workflows/java-cloud-bom-release-note-generation.yaml @@ -34,10 +34,8 @@ jobs: java-version: 11 cache: maven - run: java -version - - name: Pre-install Snapshot Dependencies - run: | - bash java-cloud-bom/tests/pre-install.sh - shell: bash + - name: Install snapshot modules locally + run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - name: Pick Libraries BOM version id: pick-version shell: bash diff --git a/java-cloud-bom/pom.xml b/java-cloud-bom/pom.xml index 0f2229b5ee9d..ec55d6f62f09 100644 --- a/java-cloud-bom/pom.xml +++ b/java-cloud-bom/pom.xml @@ -102,6 +102,22 @@ + + + quick-build + + true + true + true + true + true + true + true + true + true + true + + bulkTests diff --git a/java-cloud-bom/tests/pre-install.sh b/java-cloud-bom/tests/pre-install.sh deleted file mode 100755 index 56ab8a7208dd..000000000000 --- a/java-cloud-bom/tests/pre-install.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -( - for f in $(find . -mindepth 2 -name "pom.xml" | grep "\-bom/pom.xml" | grep -v "samples" | grep -v "/tests/" | grep -v "/resources/" | grep -v "java-cloud-bom"); do - grep -q "pom" "$f" && echo "$f" - done | sed 's|^\./||' | sed 's|/pom.xml$||' - echo "sdk-platform-java/java-shared-dependencies" - echo "sdk-platform-java/java-shared-dependencies/first-party-dependencies" - echo "sdk-platform-java/java-shared-dependencies/third-party-dependencies" - echo "sdk-platform-java/java-core" - echo "sdk-platform-java/java-core/google-cloud-core" - echo "sdk-platform-java/java-core/google-cloud-core-http" - echo "sdk-platform-java/java-core/google-cloud-core-grpc" - echo "google-auth-library-java" - echo "grpc-gcp-java" - for f in $(find . -maxdepth 1 -name "java-*" | grep -v "java-cloud-bom" | grep -v "java-shared-config" | grep -v "java-showcase" | grep -v "java-samples"); do - echo "$f" | sed 's|^\./||' - done -) | tr -d '\r' | tr '\n' ',' | sed 's/,$//' > bom_projects.txt - -if ! mvn install -pl $(cat bom_projects.txt) -am -amd -DskipTests=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Denforcer.skip=true -Danimal.sniffer.skip=true -Dclirr.skip=true -Dgcloud.download.skip=true -B -V -T 1C -l java-cloud-bom/tests/mvn-install.log; then - echo "========================================================================" - echo "mvn install failed! Printing mvn-install.log:" - echo "========================================================================" - cat java-cloud-bom/tests/mvn-install.log - exit 1 -fi -rm bom_projects.txt From b07cf55de250be76e3106af197441129fa9f12fe Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 6 Aug 2026 15:24:34 +0000 Subject: [PATCH 2/3] chore(ci): rename pre-install step to 'Install modules locally' --- .github/workflows/java-cloud-bom-bom-content-test.yaml | 4 ++-- .github/workflows/java-cloud-bom-ci.yaml | 8 ++++---- .../workflows/java-cloud-bom-release-note-generation.yaml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/java-cloud-bom-bom-content-test.yaml b/.github/workflows/java-cloud-bom-bom-content-test.yaml index 6ad0bca497f1..0cc734069b9d 100644 --- a/.github/workflows/java-cloud-bom-bom-content-test.yaml +++ b/.github/workflows/java-cloud-bom-bom-content-test.yaml @@ -40,7 +40,7 @@ jobs: java-version: 11 cache: maven - run: java -version - - name: Install snapshot modules locally + - name: Install modules locally run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - name: Install BOMs run: | @@ -69,7 +69,7 @@ jobs: distribution: zulu java-version: 11 - run: java -version - - name: Install snapshot modules locally + - name: Install modules locally run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - name: Install BOMs run: | diff --git a/.github/workflows/java-cloud-bom-ci.yaml b/.github/workflows/java-cloud-bom-ci.yaml index 6a34df0b3ddd..d613a19e0b2a 100644 --- a/.github/workflows/java-cloud-bom-ci.yaml +++ b/.github/workflows/java-cloud-bom-ci.yaml @@ -60,7 +60,7 @@ jobs: java-version: ${{matrix.java}} cache: 'maven' - run: java -version - - name: Install snapshot modules locally + - name: Install modules locally run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - run: .kokoro/build.sh env: @@ -91,7 +91,7 @@ jobs: java-version: 17 distribution: temurin cache: 'maven' - - name: Install snapshot modules locally + - name: Install modules locally run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - run: .kokoro/build.sh env: @@ -113,7 +113,7 @@ jobs: java-version: 8 cache: 'maven' - run: java -version - - name: Install snapshot modules locally + - name: Install modules locally run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - run: .kokoro/build.sh env: @@ -136,7 +136,7 @@ jobs: java-version: ${{matrix.java}} cache: 'maven' - run: java -version - - name: Install snapshot modules locally + - name: Install modules locally run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - run: .kokoro/dependencies.sh diff --git a/.github/workflows/java-cloud-bom-release-note-generation.yaml b/.github/workflows/java-cloud-bom-release-note-generation.yaml index e0fcb6ce6b84..d8ed304490f9 100644 --- a/.github/workflows/java-cloud-bom-release-note-generation.yaml +++ b/.github/workflows/java-cloud-bom-release-note-generation.yaml @@ -34,7 +34,7 @@ jobs: java-version: 11 cache: maven - run: java -version - - name: Install snapshot modules locally + - name: Install modules locally run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - name: Pick Libraries BOM version id: pick-version From 9df2664d7f992acdee6cd3df8f3f5349c794304e Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 6 Aug 2026 15:35:41 +0000 Subject: [PATCH 3/3] ci(java-cloud-bom): consolidate BOM CI workflows into java-cloud-bom-ci.yaml Consolidates all java-cloud-bom CI jobs into a single workflow file and removes redundant separate workflow files: - Moves bom-content-test, bom-assertion-test, test-invalid-bom, dashboard, and shared-dependencies-convergence into java-cloud-bom-ci.yaml. - Removes redundant units/windows matrix jobs. - Deletes java-cloud-bom-bom-content-test.yaml, java-cloud-bom-ci-validate-bom.yaml, and java-cloud-bom-dashboard.yaml. --- .../java-cloud-bom-bom-content-test.yaml | 80 ---------- .../java-cloud-bom-ci-validate-bom.yaml | 71 --------- .github/workflows/java-cloud-bom-ci.yaml | 150 +++++++++++------- .../workflows/java-cloud-bom-dashboard.yaml | 62 -------- 4 files changed, 95 insertions(+), 268 deletions(-) delete mode 100644 .github/workflows/java-cloud-bom-bom-content-test.yaml delete mode 100644 .github/workflows/java-cloud-bom-ci-validate-bom.yaml delete mode 100644 .github/workflows/java-cloud-bom-dashboard.yaml diff --git a/.github/workflows/java-cloud-bom-bom-content-test.yaml b/.github/workflows/java-cloud-bom-bom-content-test.yaml deleted file mode 100644 index 0cc734069b9d..000000000000 --- a/.github/workflows/java-cloud-bom-bom-content-test.yaml +++ /dev/null @@ -1,80 +0,0 @@ -permissions: - contents: read - -on: - push: - branches: - - main - pull_request: -name: java-cloud-bom ci -env: - BUILD_SUBDIR: java-cloud-bom -jobs: - filter: - runs-on: ubuntu-latest - outputs: - library: ${{ steps.filter.outputs.library }} - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 - id: filter - with: - filters: | - library: - - 'java-cloud-bom/**' - - 'sdk-platform-java/**' - - 'google-auth-library-java/**' - bom-content-test: - needs: filter - if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 - with: - distribution: temurin - java-version: 11 - cache: maven - - run: java -version - - name: Install modules locally - run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - - name: Install BOMs - run: | - mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests - - name: Ensure the members of the Libraries BOM exist in Maven Central - uses: ./java-cloud-bom/tests/validate-bom - with: - bom-path: java-cloud-bom/libraries-bom/pom.xml - - name: Ensure the BOM has valid content (at releases) - if: github.head_ref == 'release-please--branches--main' - run: | - mvn -B -V -ntp verify -Dtest="BomContentTest#testLibrariesBom" - working-directory: java-cloud-bom/tests - - bom-assertion-test: - needs: filter - if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' }} - name: BomContentAssertionsTest (Test for assertion logic in BomContentTest) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 - with: - distribution: zulu - java-version: 11 - - run: java -version - - name: Install modules locally - run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - - name: Install BOMs - run: | - mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests - - run: | - mvn -B -V -ntp verify -Dtest="BomContentAssertionsTest" - working-directory: java-cloud-bom/tests - diff --git a/.github/workflows/java-cloud-bom-ci-validate-bom.yaml b/.github/workflows/java-cloud-bom-ci-validate-bom.yaml deleted file mode 100644 index 954649ac32c3..000000000000 --- a/.github/workflows/java-cloud-bom-ci-validate-bom.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -permissions: - contents: read - -on: - push: - branches: - - main - pull_request: -name: java-cloud-bom test for tests/validate-bom logic -env: - BUILD_SUBDIR: java-cloud-bom -jobs: - filter: - runs-on: ubuntu-latest - outputs: - library: ${{ steps.filter.outputs.library }} - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 - id: filter - with: - filters: | - library: - - 'java-cloud-bom/**' - - 'sdk-platform-java/**' - - 'google-auth-library-java/**' - test-invalid-bom: - needs: filter - if: ${{ needs.filter.outputs.library == 'true' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - name: Fetch the bad protobuf-bom version 3.22.1 - shell: bash - # 3.22.1 had a issue in their pom.xml - # https://github.com/protocolbuffers/protobuf/issues/12170 - run: | - mkdir -p bad-protobuf-bom - curl https://repo1.maven.org/maven2/com/google/protobuf/protobuf-bom/3.22.1/protobuf-bom-3.22.1.pom \ - --output bad-protobuf-bom/pom.xml - - name: Check the bad BOM - uses: ./java-cloud-bom/tests/validate-bom - id: validate-bom - with: - bom-path: bad-protobuf-bom/pom.xml - continue-on-error: true - - name: Ensure the validate-bom invalidated the bad BOM - shell: bash - if: steps.validate-bom.outcome != 'failure' - run: | - echo "The validate-bom check should have invalidated the bad BOM" - exit 1 diff --git a/.github/workflows/java-cloud-bom-ci.yaml b/.github/workflows/java-cloud-bom-ci.yaml index d613a19e0b2a..dbfa6940b0ff 100644 --- a/.github/workflows/java-cloud-bom-ci.yaml +++ b/.github/workflows/java-cloud-bom-ci.yaml @@ -42,14 +42,13 @@ jobs: - 'java-cloud-bom/**' - 'sdk-platform-java/**' - 'google-auth-library-java/**' - units: + dependencies: needs: filter if: ${{ needs.filter.outputs.library == 'true' }} runs-on: ubuntu-latest strategy: - fail-fast: false matrix: - java: [11, 17, 21] + java: [17] steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: @@ -62,70 +61,111 @@ jobs: - run: java -version - name: Install modules locally run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - - run: .kokoro/build.sh - env: - JOB_TYPE: test - GH_TOKEN: ${{ github.token }} - units-java8: + - run: .kokoro/dependencies.sh + + bom-content-test: + needs: filter + if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + persist-credentials: false + - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 + with: + distribution: temurin + java-version: 11 + cache: maven + - run: java -version + - name: Install modules locally + run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C + - name: Install BOMs + run: | + mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests + - name: Ensure the members of the Libraries BOM exist in Maven Central + uses: ./java-cloud-bom/tests/validate-bom + with: + bom-path: java-cloud-bom/libraries-bom/pom.xml + - name: Ensure the BOM has valid content (at releases) + if: github.head_ref == 'release-please--branches--main' + run: | + mvn -B -V -ntp verify -Dtest="BomContentTest#testLibrariesBom" + working-directory: java-cloud-bom/tests + + bom-assertion-test: + needs: filter + if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' }} + name: BomContentAssertionsTest (Test for assertion logic in BomContentTest) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + persist-credentials: false + - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 + with: + distribution: zulu + java-version: 11 + - run: java -version + - name: Install modules locally + run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C + - name: Install BOMs + run: | + mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests + - run: | + mvn -B -V -ntp verify -Dtest="BomContentAssertionsTest" + working-directory: java-cloud-bom/tests + + test-invalid-bom: needs: filter if: ${{ needs.filter.outputs.library == 'true' }} - # Building using Java 17 and run the tests with Java 8 runtime - name: "units (8)" runs-on: ubuntu-latest steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 - with: - java-version: 8 - distribution: temurin - cache: 'maven' - - name: "Set jvm system property environment variable for surefire plugin (unit tests)" - # Maven surefire plugin (unit tests) allows us to specify JVM to run the tests. - # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm - run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java -P !java17" >> $GITHUB_ENV - shell: bash - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 - with: - java-version: 17 - distribution: temurin - cache: 'maven' - - name: Install modules locally - run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - - run: .kokoro/build.sh - env: - JOB_TYPE: test - GH_TOKEN: ${{ github.token }} - windows: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + persist-credentials: false + - name: Fetch the bad protobuf-bom version 3.22.1 + shell: bash + # 3.22.1 had a issue in their pom.xml + # https://github.com/protocolbuffers/protobuf/issues/12170 + run: | + mkdir -p bad-protobuf-bom + curl https://repo1.maven.org/maven2/com/google/protobuf/protobuf-bom/3.22.1/protobuf-bom-3.22.1.pom \ + --output bad-protobuf-bom/pom.xml + - name: Check the bad BOM + uses: ./java-cloud-bom/tests/validate-bom + id: validate-bom + with: + bom-path: bad-protobuf-bom/pom.xml + continue-on-error: true + - name: Ensure the validate-bom invalidated the bad BOM + shell: bash + if: steps.validate-bom.outcome != 'failure' + run: | + echo "The validate-bom check should have invalidated the bad BOM" + exit 1 + + dashboard: needs: filter if: ${{ needs.filter.outputs.library == 'true' }} - runs-on: windows-latest + runs-on: ubuntu-latest steps: - - name: Support longpaths - run: git config --system core.longpaths true - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: persist-credentials: false - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 with: distribution: temurin - java-version: 8 - cache: 'maven' + java-version: 11 + cache: maven - run: java -version - - name: Install modules locally - run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - - run: .kokoro/build.sh + - run: .kokoro/dashboard.sh env: - JOB_TYPE: test - GH_TOKEN: ${{ github.token }} - dependencies: + JOB_TYPE: dashboard-units-check + + shared-dependencies-convergence: needs: filter - if: ${{ needs.filter.outputs.library == 'true' }} + if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' && github.head_ref == 'release-please--branches--main' }} runs-on: ubuntu-latest - strategy: - matrix: - java: [17] steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: @@ -133,10 +173,10 @@ jobs: - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 with: distribution: temurin - java-version: ${{matrix.java}} - cache: 'maven' + java-version: 11 + cache: maven - run: java -version - - name: Install modules locally - run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C - - run: .kokoro/dependencies.sh + - run: .kokoro/dashboard.sh + env: + JOB_TYPE: dependency-convergence-check diff --git a/.github/workflows/java-cloud-bom-dashboard.yaml b/.github/workflows/java-cloud-bom-dashboard.yaml deleted file mode 100644 index 38aba4630992..000000000000 --- a/.github/workflows/java-cloud-bom-dashboard.yaml +++ /dev/null @@ -1,62 +0,0 @@ -permissions: - contents: read - -on: - push: - branches: - - main - pull_request: -name: java-cloud-bom ci -env: - BUILD_SUBDIR: java-cloud-bom -jobs: - filter: - runs-on: ubuntu-latest - outputs: - library: ${{ steps.filter.outputs.library }} - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 - id: filter - with: - filters: | - library: - - 'java-cloud-bom/**' - - 'sdk-platform-java/**' - - 'google-auth-library-java/**' - dashboard: - needs: filter - if: ${{ needs.filter.outputs.library == 'true' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 - with: - distribution: temurin - java-version: 11 - cache: maven - - run: java -version - - run: .kokoro/dashboard.sh - env: - JOB_TYPE: dashboard-units-check - shared-dependencies-convergence: - needs: filter - if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' && github.head_ref == 'release-please--branches--main' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 - with: - distribution: temurin - java-version: 11 - cache: maven - - run: java -version - - run: .kokoro/dashboard.sh - env: - JOB_TYPE: dependency-convergence-check