From 8442827a495b6ca85ada4f22ae33aa9d6939826c Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 10 Aug 2026 21:20:49 +0000 Subject: [PATCH 01/13] ci: optimize unit test CI runtime and rename bulk filter - Rename bulk-filter to generated-libraries-filter in ci.yaml - Add -T 1C to test execution in build.sh for parallel module builds - Switch from mvn install to mvn test during test execution to prevent redundant re-packaging and re-installation into local maven repository --- .github/workflows/ci.yaml | 56 +++++++++++++++++++-------------------- .kokoro/build.sh | 3 ++- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a01f8647b352..85d525d5cb1b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,8 +23,8 @@ on: pull_request: name: ci jobs: - # detect whether or note we should run "bulk" (non-handwritten) unit tests - bulk-filter: + # detect whether or not we should run generated (non-handwritten) unit tests + generated-libraries-filter: runs-on: ubuntu-latest permissions: pull-requests: read @@ -60,7 +60,7 @@ jobs: # these unit tests are "bulk" (non-handwritten) libraries units: runs-on: ubuntu-latest - needs: bulk-filter + needs: generated-libraries-filter strategy: fail-fast: false matrix: @@ -68,76 +68,76 @@ jobs: steps: - name: Get current week within the year id: date - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: persist-credentials: false - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: distribution: temurin java-version: ${{matrix.java}} - run: java -version - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 id: mvn-cache - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh - if: ${{ needs.bulk-filter.outputs.runnable == 'true' && (needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true') }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} env: JOB_TYPE: test JOB_NAME: units-${{matrix.java}} units-8-runtime: runs-on: ubuntu-latest - needs: bulk-filter + needs: generated-libraries-filter name: "units (8)" steps: - name: Get current week within the year id: date - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: persist-credentials: false - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: java-version: 8 distribution: temurin - 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 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV shell: bash - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: java-version: 11 distribution: temurin cache: maven - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 id: mvn-cache - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh - if: ${{ needs.bulk-filter.outputs.runnable == 'true' && (needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true') }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} shell: bash env: JOB_TYPE: test JOB_NAME: units-8-runtime-${{matrix.java}} # detect which libraries have changed changes: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest permissions: pull-requests: read @@ -376,7 +376,7 @@ jobs: env: BUILD_SUBDIR: ${{matrix.package}} required: - needs: [ bulk-filter, changes, split-units, split-clirr, split-dependencies ] + needs: [ generated-libraries-filter, changes, split-units, split-clirr, split-dependencies ] name: conditional-required-check if: ${{ always() }} # Always run even if any "needs" jobs fail runs-on: ubuntu-22.04 @@ -387,8 +387,8 @@ jobs: - name: Success otherwise run: echo "Success!" windows: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: windows-latest steps: - name: Support longpaths @@ -407,8 +407,8 @@ jobs: JOB_TYPE: test JOB_NAME: windows-units lint: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 @@ -426,8 +426,8 @@ jobs: HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }} BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} enforcer: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest steps: - name: Get current week within the year @@ -449,8 +449,8 @@ jobs: - run: java -version - run: mvn -B -ntp enforcer:enforce@enforce -T 1C gapic-libraries-bom: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 92e714cb451e..75faa720e6e7 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -50,13 +50,14 @@ case ${JOB_TYPE} in fi echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}" retry_with_backoff 3 10 \ - mvn install \ + mvn test \ -B -ntp \ -Pquick-build \ -Dorg.slf4j.simpleLogger.showDateTime=true \ -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \ -Dmaven.wagon.http.retryHandler.count=5 \ --also-make \ + -T 1C \ ${SUREFIRE_JVM_OPT} "${EXTRA_PROFILE_OPTS[@]}" RETURN_CODE=$? From a1833df77c886363d99acda6c1048c7c89334df7 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 10 Aug 2026 21:48:10 +0000 Subject: [PATCH 02/13] ci: defer bulk unit tests to push and keep parallel install - Update units, units-8-runtime, and windows jobs to only run on push to main - Keep -T 1C parallel flag and use mvn install in build.sh for full lifecycle compatibility --- .github/workflows/ci.yaml | 4 +++- .kokoro/build.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f15c83c9b67e..87795c64722c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -61,6 +61,7 @@ jobs: units: runs-on: ubuntu-latest needs: generated-libraries-filter + if: ${{ github.event_name == 'push' && needs.generated-libraries-filter.outputs.runnable == 'true' }} strategy: fail-fast: false matrix: @@ -95,6 +96,7 @@ jobs: units-8-runtime: runs-on: ubuntu-latest needs: generated-libraries-filter + if: ${{ github.event_name == 'push' && needs.generated-libraries-filter.outputs.runnable == 'true' }} name: "units (8)" steps: - name: Get current week within the year @@ -388,7 +390,7 @@ jobs: run: echo "Success!" windows: needs: generated-libraries-filter - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ github.event_name == 'push' && needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: windows-latest steps: - name: Support longpaths diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 75faa720e6e7..a9db2c4efa8c 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -50,7 +50,7 @@ case ${JOB_TYPE} in fi echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}" retry_with_backoff 3 10 \ - mvn test \ + mvn install \ -B -ntp \ -Pquick-build \ -Dorg.slf4j.simpleLogger.showDateTime=true \ From 38667b382ea7f8bcf3046f26fb032ab62f77d14a Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 10 Aug 2026 21:57:01 +0000 Subject: [PATCH 03/13] ci: compile generated modules across Java versions without running unit tests - Add compile case in .kokoro/build.sh to run mvn compile with -T 1C - Update units, units-8-runtime, and windows CI jobs to run compile instead of running unit tests - Fix stale bulk-filter references in ci.yaml --- .github/workflows/ci.yaml | 36 ++++++++++++++++-------------------- .kokoro/build.sh | 25 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 87795c64722c..89a7140e1619 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -57,11 +57,12 @@ jobs: ci: - '.github/workflows/ci.yaml' - '.kokoro/**' - # these unit tests are "bulk" (non-handwritten) libraries + # compile all modules across supported Java versions units: + name: "compile (${{matrix.java}})" runs-on: ubuntu-latest needs: generated-libraries-filter - if: ${{ github.event_name == 'push' && needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} strategy: fail-fast: false matrix: @@ -76,7 +77,7 @@ jobs: with: persist-credentials: false - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: distribution: temurin java-version: ${{matrix.java}} @@ -91,13 +92,13 @@ jobs: - run: .kokoro/build.sh if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} env: - JOB_TYPE: test - JOB_NAME: units-${{matrix.java}} + JOB_TYPE: compile + JOB_NAME: compile-${{matrix.java}} units-8-runtime: runs-on: ubuntu-latest needs: generated-libraries-filter - if: ${{ github.event_name == 'push' && needs.generated-libraries-filter.outputs.runnable == 'true' }} - name: "units (8)" + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + name: "compile (8)" steps: - name: Get current week within the year id: date @@ -108,18 +109,12 @@ jobs: with: persist-credentials: false - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: java-version: 8 distribution: temurin - - 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 - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} - run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV - shell: bash - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: java-version: 11 distribution: temurin @@ -134,8 +129,8 @@ jobs: if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} shell: bash env: - JOB_TYPE: test - JOB_NAME: units-8-runtime-${{matrix.java}} + JOB_TYPE: compile + JOB_NAME: compile-8-runtime # detect which libraries have changed changes: needs: generated-libraries-filter @@ -389,8 +384,9 @@ jobs: - name: Success otherwise run: echo "Success!" windows: + name: "windows-compile" needs: generated-libraries-filter - if: ${{ github.event_name == 'push' && needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: windows-latest steps: - name: Support longpaths @@ -406,8 +402,8 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: test - JOB_NAME: windows-units + JOB_TYPE: compile + JOB_NAME: windows-compile lint: needs: generated-libraries-filter if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} diff --git a/.kokoro/build.sh b/.kokoro/build.sh index a9db2c4efa8c..bc8ab073c130 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -68,6 +68,31 @@ case ${JOB_TYPE} in fi echo "Finished running unit tests" ;; + compile) + if [[ -n "${BUILD_SUBDIR}" ]] + then + echo "Compiling all modules for ${BUILD_SUBDIR}" + mvn compile \ + -B -ntp \ + -Pquick-build \ + -Dorg.slf4j.simpleLogger.showDateTime=true \ + -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \ + -Dmaven.wagon.http.retryHandler.count=5 \ + --projects "${BUILD_SUBDIR}" \ + --also-make \ + -T 1C + else + echo "Compiling all modules in repository" + mvn compile \ + -B -ntp \ + -Pquick-build \ + -Dorg.slf4j.simpleLogger.showDateTime=true \ + -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \ + -Dmaven.wagon.http.retryHandler.count=5 \ + -T 1C + fi + RETURN_CODE=$? + ;; install) if [[ -n "${BUILD_SUBDIR}" ]] then From f0e0a0eeb3f585eab1dbf5449a9ce8c35f12aaf7 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 10 Aug 2026 22:02:16 +0000 Subject: [PATCH 04/13] ci: restore exact job names for required checks compatibility - Keep original job names (units (11), units (8), windows, bulk-filter) - Use JOB_TYPE: compile so jobs run fast compilation without renaming GitHub checks --- .github/workflows/ci.yaml | 64 +++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 89a7140e1619..de3e1df7895c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,7 +24,7 @@ on: name: ci jobs: # detect whether or not we should run generated (non-handwritten) unit tests - generated-libraries-filter: + bulk-filter: runs-on: ubuntu-latest permissions: pull-requests: read @@ -59,10 +59,9 @@ jobs: - '.kokoro/**' # compile all modules across supported Java versions units: - name: "compile (${{matrix.java}})" runs-on: ubuntu-latest - needs: generated-libraries-filter - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + needs: bulk-filter + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} strategy: fail-fast: false matrix: @@ -70,71 +69,71 @@ jobs: steps: - name: Get current week within the year id: date - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} with: persist-credentials: false - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} with: distribution: temurin java-version: ${{matrix.java}} - run: java -version - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 id: mvn-cache - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} with: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' && (needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true') }} env: JOB_TYPE: compile - JOB_NAME: compile-${{matrix.java}} + JOB_NAME: units-${{matrix.java}} units-8-runtime: runs-on: ubuntu-latest - needs: generated-libraries-filter - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} - name: "compile (8)" + needs: bulk-filter + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + name: "units (8)" steps: - name: Get current week within the year id: date - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} with: persist-credentials: false - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} with: java-version: 8 distribution: temurin - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} with: java-version: 11 distribution: temurin cache: maven - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 id: mvn-cache - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} with: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} + if: ${{ needs.bulk-filter.outputs.runnable == 'true' && (needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true') }} shell: bash env: JOB_TYPE: compile - JOB_NAME: compile-8-runtime + JOB_NAME: units-8-runtime-${{matrix.java}} # detect which libraries have changed changes: - needs: generated-libraries-filter - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + needs: bulk-filter + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest permissions: pull-requests: read @@ -384,9 +383,8 @@ jobs: - name: Success otherwise run: echo "Success!" windows: - name: "windows-compile" - needs: generated-libraries-filter - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + needs: bulk-filter + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} runs-on: windows-latest steps: - name: Support longpaths @@ -403,10 +401,10 @@ jobs: - run: .kokoro/build.sh env: JOB_TYPE: compile - JOB_NAME: windows-compile + JOB_NAME: windows-units lint: - needs: generated-libraries-filter - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + needs: bulk-filter + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 @@ -424,8 +422,8 @@ jobs: HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }} BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} enforcer: - needs: generated-libraries-filter - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + needs: bulk-filter + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest steps: - name: Get current week within the year @@ -447,8 +445,8 @@ jobs: - run: java -version - run: mvn -B -ntp enforcer:enforce@enforce -T 1C gapic-libraries-bom: - needs: generated-libraries-filter - if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} + needs: bulk-filter + if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 From cf722336e6262715dd060efe7bdfbc894f6404f4 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 10 Aug 2026 22:04:04 +0000 Subject: [PATCH 05/13] ci: rename bulk-filter to generated-libraries-filter - Rename filter job to generated-libraries-filter for clarity - Preserve required job display names for units, units (8), and windows --- .github/workflows/ci.yaml | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index de3e1df7895c..dd92ee5f68b4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,7 +24,7 @@ on: name: ci jobs: # detect whether or not we should run generated (non-handwritten) unit tests - bulk-filter: + generated-libraries-filter: runs-on: ubuntu-latest permissions: pull-requests: read @@ -60,8 +60,8 @@ jobs: # compile all modules across supported Java versions units: runs-on: ubuntu-latest - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} strategy: fail-fast: false matrix: @@ -69,71 +69,71 @@ jobs: steps: - name: Get current week within the year id: date - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: persist-credentials: false - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: distribution: temurin java-version: ${{matrix.java}} - run: java -version - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 id: mvn-cache - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh - if: ${{ needs.bulk-filter.outputs.runnable == 'true' && (needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true') }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} env: JOB_TYPE: compile JOB_NAME: units-${{matrix.java}} units-8-runtime: runs-on: ubuntu-latest - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} name: "units (8)" steps: - name: Get current week within the year id: date - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: persist-credentials: false - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: java-version: 8 distribution: temurin - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0 - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: java-version: 11 distribution: temurin cache: maven - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 id: mvn-cache - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} with: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh - if: ${{ needs.bulk-filter.outputs.runnable == 'true' && (needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true') }} + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} shell: bash env: JOB_TYPE: compile JOB_NAME: units-8-runtime-${{matrix.java}} # detect which libraries have changed changes: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest permissions: pull-requests: read @@ -383,8 +383,8 @@ jobs: - name: Success otherwise run: echo "Success!" windows: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: windows-latest steps: - name: Support longpaths @@ -403,8 +403,8 @@ jobs: JOB_TYPE: compile JOB_NAME: windows-units lint: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 @@ -422,8 +422,8 @@ jobs: HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }} BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} enforcer: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest steps: - name: Get current week within the year @@ -445,8 +445,8 @@ jobs: - run: java -version - run: mvn -B -ntp enforcer:enforce@enforce -T 1C gapic-libraries-bom: - needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.runnable == 'true' }} + needs: generated-libraries-filter + if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 From a94078e2c1bd38e2a67c0c11b00cec9048a8fd47 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 9 Jul 2026 02:12:39 -0400 Subject: [PATCH 06/13] Run GAPIC unit-test CI as compile-only and trim now-unneeded test-skip config --- .kokoro/build.sh | 16 ++++++++-------- .kokoro/common.sh | 1 + google-cloud-jar-parent/pom.xml | 17 ++++++++++++++++- .../gapic-generator-java-pom-parent/pom.xml | 16 +++++++++++++++- 4 files changed, 40 insertions(+), 10 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index bc8ab073c130..85ffe13759f4 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -37,28 +37,28 @@ RETURN_CODE=0 case ${JOB_TYPE} in test) + MAVEN_GOAL="test" if [[ -n "${BUILD_SUBDIR}" ]] then echo "Compiling and building all modules for ${BUILD_SUBDIR}" install_modules "${BUILD_SUBDIR}" echo "Running in subdir: ${BUILD_SUBDIR}" pushd "${BUILD_SUBDIR}" - EXTRA_PROFILE_OPTS=() else - EXTRA_PROFILE_OPTS=("-PbulkTests") - install_modules "sdk-platform-java" + # These are pure GAPIC-generated modules with no unit tests to run here; Showcase + # integration tests already cover the generated code's behavior, so this pass only + # needs to confirm everything compiles. + MAVEN_GOAL="compile" fi - echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}" + echo "MAVEN_GOAL: ${MAVEN_GOAL}" retry_with_backoff 3 10 \ - mvn install \ + mvn ${MAVEN_GOAL} \ -B -ntp \ -Pquick-build \ -Dorg.slf4j.simpleLogger.showDateTime=true \ -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \ -Dmaven.wagon.http.retryHandler.count=5 \ - --also-make \ - -T 1C \ - ${SUREFIRE_JVM_OPT} "${EXTRA_PROFILE_OPTS[@]}" + -T 1C RETURN_CODE=$? if [[ -n "${BUILD_SUBDIR}" ]] diff --git a/.kokoro/common.sh b/.kokoro/common.sh index 9a56b378131a..26de64791fc2 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -416,6 +416,7 @@ function install_modules() { printf "Installing submodules:\n%s\n" "$all_submodules" always_install_deps_list=( + 'grpc-gcp-java' 'java-monitoring/google-cloud-monitoring' 'java-monitoring/google-cloud-monitoring-bom' 'java-kms/google-cloud-kms' diff --git a/google-cloud-jar-parent/pom.xml b/google-cloud-jar-parent/pom.xml index b1e26861cab0..22b6ebf6d23c 100644 --- a/google-cloud-jar-parent/pom.xml +++ b/google-cloud-jar-parent/pom.xml @@ -19,7 +19,22 @@ ../google-cloud-pom-parent/pom.xml - false + + true + + ${skipUnitTests} true diff --git a/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml b/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml index 800881bdf0a1..acc9249073cd 100644 --- a/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml +++ b/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml @@ -20,6 +20,16 @@ + false java.header 8 @@ -224,7 +234,11 @@ - + bulkTests From 9d7946b81a80ed96ff263c139f591a5ec5ddce6c Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 10 Aug 2026 22:17:42 +0000 Subject: [PATCH 07/13] ci: use JOB_TYPE: test with dynamic goal selection - Set JOB_TYPE: test in units, units-8-runtime, and windows to leverage dynamic compile goal in build.sh --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dd92ee5f68b4..0775faa52ecc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -91,7 +91,7 @@ jobs: - run: .kokoro/build.sh if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} env: - JOB_TYPE: compile + JOB_TYPE: test JOB_NAME: units-${{matrix.java}} units-8-runtime: runs-on: ubuntu-latest @@ -128,7 +128,7 @@ jobs: if: ${{ needs.generated-libraries-filter.outputs.runnable == 'true' && (needs.generated-libraries-filter.outputs.src == 'true' || needs.generated-libraries-filter.outputs.ci == 'true') }} shell: bash env: - JOB_TYPE: compile + JOB_TYPE: test JOB_NAME: units-8-runtime-${{matrix.java}} # detect which libraries have changed changes: @@ -400,7 +400,7 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: compile + JOB_TYPE: test JOB_NAME: windows-units lint: needs: generated-libraries-filter From 9e3ab73055e3e4cd859fb2314fbf04e06f5e5b6e Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 10 Aug 2026 22:45:42 +0000 Subject: [PATCH 08/13] fix(logging-logback): ignore unused protobuf-java dependency - Add ignoredUnusedDeclaredDependency for protobuf-java with combine.children=append in maven-dependency-plugin config - Preserves compile-time classpath required by javac for Struct while satisfying dependency:analyze --- java-logging-logback/pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/java-logging-logback/pom.xml b/java-logging-logback/pom.xml index daf8f4b9d831..72ab00e311da 100644 --- a/java-logging-logback/pom.xml +++ b/java-logging-logback/pom.xml @@ -156,6 +156,15 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + com.google.protobuf:protobuf-java + + + org.codehaus.mojo flatten-maven-plugin From e8242b0bb96367d710dfad4f01b4796a0af4df8a Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 11 Aug 2026 00:10:17 +0000 Subject: [PATCH 09/13] fix(logging-logback): set skipUnitTests=false for handwritten module - Override skipUnitTests to false in java-logging-logback/pom.xml so test sources compile and run - Enables dependency:analyze to properly recognize test-scoped dependencies in split-dependencies CI --- java-logging-logback/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/java-logging-logback/pom.xml b/java-logging-logback/pom.xml index 72ab00e311da..bbc751870d3a 100644 --- a/java-logging-logback/pom.xml +++ b/java-logging-logback/pom.xml @@ -14,6 +14,7 @@ + false 1.2.13 5.6.0 1.4.4 From 89b57b087bfd2113de60a29e81ad4b56e1d8c508 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 11 Aug 2026 00:21:07 +0000 Subject: [PATCH 10/13] build: override skipUnitTests=false in all handwritten libraries - Explicitly set skipUnitTests=false in all handwritten library root POMs - Set skipUnitTests=true in pure generated submodules (firestore-admin, gapic-storage-v2) - Ensures handwritten unit tests run in split-units and dependencies compile in split-dependencies --- java-bigquery-jdbc/pom.xml | 1 + java-bigquery/pom.xml | 1 + java-bigquerystorage/pom.xml | 1 + java-bigtable/pom.xml | 1 + java-common-protos/pom.xml | 1 + java-datastore/pom.xml | 1 + java-dns/pom.xml | 1 + java-firestore/google-cloud-firestore-admin/pom.xml | 3 +++ java-firestore/pom.xml | 1 + java-iam/pom.xml | 1 + java-logging/pom.xml | 1 + java-notification/pom.xml | 1 + java-pubsub/pom.xml | 1 + java-showcase/pom.xml | 1 + java-spanner-jdbc/pom.xml | 1 + java-spanner/pom.xml | 1 + java-storage-nio/pom.xml | 1 + java-storage/gapic-google-cloud-storage-v2/pom.xml | 3 +++ java-storage/pom.xml | 1 + 19 files changed, 23 insertions(+) diff --git a/java-bigquery-jdbc/pom.xml b/java-bigquery-jdbc/pom.xml index 24bd9b89eec9..6bf17a80d920 100644 --- a/java-bigquery-jdbc/pom.xml +++ b/java-bigquery-jdbc/pom.xml @@ -27,6 +27,7 @@ JDBC for BigQuery + false UTF-8 UTF-8 github diff --git a/java-bigquery/pom.xml b/java-bigquery/pom.xml index ee1fcd22dfc8..dbdd5b097703 100644 --- a/java-bigquery/pom.xml +++ b/java-bigquery/pom.xml @@ -51,6 +51,7 @@ + false UTF-8 UTF-8 github diff --git a/java-bigquerystorage/pom.xml b/java-bigquerystorage/pom.xml index 5eee00a606fb..72730f284ccb 100644 --- a/java-bigquerystorage/pom.xml +++ b/java-bigquerystorage/pom.xml @@ -51,6 +51,7 @@ + false UTF-8 UTF-8 3.25.4 diff --git a/java-bigtable/pom.xml b/java-bigtable/pom.xml index c6bd75e5f4f7..828dc7af906d 100644 --- a/java-bigtable/pom.xml +++ b/java-bigtable/pom.xml @@ -139,6 +139,7 @@ + false UTF-8 UTF-8 github diff --git a/java-common-protos/pom.xml b/java-common-protos/pom.xml index c394d6e0e109..4742ee359174 100644 --- a/java-common-protos/pom.xml +++ b/java-common-protos/pom.xml @@ -39,6 +39,7 @@ + false UTF-8 UTF-8 github diff --git a/java-datastore/pom.xml b/java-datastore/pom.xml index 674bdac579f4..81d36bac48b6 100644 --- a/java-datastore/pom.xml +++ b/java-datastore/pom.xml @@ -139,6 +139,7 @@ + false UTF-8 UTF-8 github diff --git a/java-dns/pom.xml b/java-dns/pom.xml index 128eacde4b6a..d147937ceb51 100644 --- a/java-dns/pom.xml +++ b/java-dns/pom.xml @@ -18,6 +18,7 @@ + false UTF-8 UTF-8 github diff --git a/java-firestore/google-cloud-firestore-admin/pom.xml b/java-firestore/google-cloud-firestore-admin/pom.xml index 74f2bcbb25f2..c8b77288446a 100644 --- a/java-firestore/google-cloud-firestore-admin/pom.xml +++ b/java-firestore/google-cloud-firestore-admin/pom.xml @@ -15,6 +15,9 @@ google-cloud-firestore-parent 3.46.0-SNAPSHOT + + true + com.google.api.grpc diff --git a/java-firestore/pom.xml b/java-firestore/pom.xml index 04b20ffa9e6a..b2e833b98129 100644 --- a/java-firestore/pom.xml +++ b/java-firestore/pom.xml @@ -139,6 +139,7 @@ + false UTF-8 UTF-8 github diff --git a/java-iam/pom.xml b/java-iam/pom.xml index 38e68f14a1f7..1f9b5b192c94 100644 --- a/java-iam/pom.xml +++ b/java-iam/pom.xml @@ -39,6 +39,7 @@ + false UTF-8 UTF-8 github diff --git a/java-logging/pom.xml b/java-logging/pom.xml index a1d584eb2611..a39c48bb8334 100644 --- a/java-logging/pom.xml +++ b/java-logging/pom.xml @@ -51,6 +51,7 @@ + false UTF-8 UTF-8 github diff --git a/java-notification/pom.xml b/java-notification/pom.xml index ac93556a90a7..9857d5bef462 100644 --- a/java-notification/pom.xml +++ b/java-notification/pom.xml @@ -19,6 +19,7 @@ ../google-cloud-jar-parent/pom.xml + false google-cloud-notification diff --git a/java-pubsub/pom.xml b/java-pubsub/pom.xml index 21d3534d373d..fdf5bb8a449f 100644 --- a/java-pubsub/pom.xml +++ b/java-pubsub/pom.xml @@ -51,6 +51,7 @@ + false UTF-8 UTF-8 github diff --git a/java-showcase/pom.xml b/java-showcase/pom.xml index d5e4704dd22f..04eb5813f350 100644 --- a/java-showcase/pom.xml +++ b/java-showcase/pom.xml @@ -17,6 +17,7 @@ + false UTF-8 UTF-8 github diff --git a/java-spanner-jdbc/pom.xml b/java-spanner-jdbc/pom.xml index e5ef2d1a4a46..844d846172d8 100644 --- a/java-spanner-jdbc/pom.xml +++ b/java-spanner-jdbc/pom.xml @@ -49,6 +49,7 @@ + false google-cloud-spanner-jdbc 4.13.2 3.0.2 diff --git a/java-spanner/pom.xml b/java-spanner/pom.xml index d2bf601f3905..196edb6a446b 100644 --- a/java-spanner/pom.xml +++ b/java-spanner/pom.xml @@ -51,6 +51,7 @@ + false UTF-8 UTF-8 github diff --git a/java-storage-nio/pom.xml b/java-storage-nio/pom.xml index 398d154a9ba4..cedd12514b91 100644 --- a/java-storage-nio/pom.xml +++ b/java-storage-nio/pom.xml @@ -60,6 +60,7 @@ + false UTF-8 UTF-8 github diff --git a/java-storage/gapic-google-cloud-storage-v2/pom.xml b/java-storage/gapic-google-cloud-storage-v2/pom.xml index 8a58812a9987..1b7885ef69b4 100644 --- a/java-storage/gapic-google-cloud-storage-v2/pom.xml +++ b/java-storage/gapic-google-cloud-storage-v2/pom.xml @@ -12,6 +12,9 @@ google-cloud-storage-parent 2.72.0-SNAPSHOT + + true + io.grpc diff --git a/java-storage/pom.xml b/java-storage/pom.xml index 2a22db9081f3..1eb019c1310f 100644 --- a/java-storage/pom.xml +++ b/java-storage/pom.xml @@ -51,6 +51,7 @@ + false UTF-8 UTF-8 github From 680c9492edfa8d238a182ec3ea01bf55831b5492 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 11 Aug 2026 00:50:26 +0000 Subject: [PATCH 11/13] ci: optimize split-dependencies and allow test compilation - Remove maven.test.skip from google-cloud-jar-parent so test classes compile for dependency:analyze and surefire skip handles execution - Add cache: maven to split-dependencies and split-clirr in GitHub Actions workflow - Use mvn test-compile and add -T 1C in dependencies.sh for fast parallel execution --- .github/workflows/ci.yaml | 2 ++ .kokoro/dependencies.sh | 8 ++++---- google-cloud-jar-parent/pom.xml | 6 ------ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0775faa52ecc..19f44acf2584 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -349,6 +349,7 @@ jobs: with: distribution: temurin java-version: 11 + cache: maven - run: .kokoro/build.sh env: BUILD_SUBDIR: ${{matrix.package}} @@ -368,6 +369,7 @@ jobs: with: distribution: temurin java-version: 17 + cache: maven - run: .kokoro/dependencies.sh env: BUILD_SUBDIR: ${{matrix.package}} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index f341016b5033..4b0c0edcf1f8 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -56,11 +56,11 @@ then pushd "${BUILD_SUBDIR}" fi -# this should run maven enforcer -mvn install -B -V -ntp \ - -Pquick-build -DskipTests=true -Dmaven.javadoc.skip=true -Denforcer.skip=false +# this should run maven enforcer and compile test dependencies +mvn test-compile -B -V -ntp \ + -Pquick-build -DskipTests=true -Dmaven.javadoc.skip=true -Denforcer.skip=false -T 1C -mvn -B dependency:analyze -Pquick-build -DfailOnWarning=true -Dmdep.analyze.skip=false +mvn -B dependency:analyze -Pquick-build -DfailOnWarning=true -Dmdep.analyze.skip=false -T 1C if [[ -n "${BUILD_SUBDIR}" ]] then diff --git a/google-cloud-jar-parent/pom.xml b/google-cloud-jar-parent/pom.xml index 22b6ebf6d23c..02ba1cf661d8 100644 --- a/google-cloud-jar-parent/pom.xml +++ b/google-cloud-jar-parent/pom.xml @@ -29,12 +29,6 @@ unit tests without also skipping failsafe/ITs. --> true - - ${skipUnitTests} true From 4429a570c295871ca815712009b7a49e9f999faa Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 11 Aug 2026 14:50:09 +0000 Subject: [PATCH 12/13] fix(graalvm): enable unit tests when native profile is active - Add skipUnitTests=false property to native profile in google-cloud-jar-parent and native-image-shared-config - Ensures Surefire executes client tests during native-image builds to generate test configuration required by native-maven-plugin --- google-cloud-jar-parent/pom.xml | 7 +++++++ java-shared-config/native-image-shared-config/pom.xml | 3 +++ 2 files changed, 10 insertions(+) diff --git a/google-cloud-jar-parent/pom.xml b/google-cloud-jar-parent/pom.xml index 02ba1cf661d8..d07276a83d6b 100644 --- a/google-cloud-jar-parent/pom.xml +++ b/google-cloud-jar-parent/pom.xml @@ -206,6 +206,13 @@ + + + native + + false + + diff --git a/java-shared-config/native-image-shared-config/pom.xml b/java-shared-config/native-image-shared-config/pom.xml index 554e6bca9bd0..747178a74d3e 100644 --- a/java-shared-config/native-image-shared-config/pom.xml +++ b/java-shared-config/native-image-shared-config/pom.xml @@ -227,6 +227,9 @@ native + + false + From e8fa27216fb758bc7b498782768f808f8522fe06 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 11 Aug 2026 15:52:34 +0000 Subject: [PATCH 13/13] chore(logging-logback): remove redundant ignoredUnusedDeclaredDependencies - Since test classes are compiled and skipUnitTests=false is set, dependency:analyze recognizes test-scoped usages cleanly without custom ignore rules --- java-logging-logback/pom.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/java-logging-logback/pom.xml b/java-logging-logback/pom.xml index bbc751870d3a..05b4b20bb2f0 100644 --- a/java-logging-logback/pom.xml +++ b/java-logging-logback/pom.xml @@ -157,15 +157,6 @@ - - org.apache.maven.plugins - maven-dependency-plugin - - - com.google.protobuf:protobuf-java - - - org.codehaus.mojo flatten-maven-plugin