From 675e892cb4e2cbb350ea90e6134c43f2466b3bf4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 01:45:32 +0000 Subject: [PATCH 1/4] Switch spring workflow from Maven to Bazel --- .github/workflows/spring.yml | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/spring.yml b/.github/workflows/spring.yml index 5dd57c07c9..b1816ea892 100644 --- a/.github/workflows/spring.yml +++ b/.github/workflows/spring.yml @@ -11,6 +11,8 @@ jobs: matrix: java: [ 17, 21, 25, 26 ] runs-on: ubuntu-latest + env: + BAZELISK_SKIP_VERSION_CHECK: "1" steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - name: Setup Java @@ -18,10 +20,32 @@ jobs: with: distribution: 'temurin' java-version: ${{ matrix.java }} - - name: Cache local Maven repository + - name: Install Bazelisk + run: | + mkdir -p "$HOME/.local/bin" + curl -fsSL \ + https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-amd64 \ + -o "$HOME/.local/bin/bazel" + chmod +x "$HOME/.local/bin/bazel" + echo "$HOME/.local/bin" >> "$GITHUB_PATH" + - name: Restore Bazel caches uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-spring-${{ matrix.java }}-${{ hashFiles('pom.xml', '**/pom.xml') }} - - name: Build Spring modules with Maven - run: ./mvnw -q -B --define=org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -pl spring,spring-aot -am clean test + path: | + ~/.cache/bazel-disk-cache + ~/.cache/bazel/cache/repos/v1 + key: bazel-${{ runner.os }}-spring-java${{ matrix.java }}-${{ hashFiles('MODULE.bazel', '.bazelversion', 'maven_install.json') }} + restore-keys: | + bazel-${{ runner.os }}-spring-java${{ matrix.java }}- + bazel-${{ runner.os }}- + - name: Pin Maven dependencies + run: REPIN=1 bazel run @maven//:pin + - name: Build Spring integrations with Bazel + run: >- + bazel build --config=ci + //spring:client-java-spring-integration + //spring-aot:client-java-spring-aot-integration + - name: Test Spring integrations with Bazel + run: >- + bazel test --config=ci + //spring:tests From 6c67e4b952ed333588b70e5ff089b5afdf75cff9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 02:19:20 +0000 Subject: [PATCH 2/4] Align spring Bazel cache key with CI --- .github/workflows/spring.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spring.yml b/.github/workflows/spring.yml index b1816ea892..7d12f8c503 100644 --- a/.github/workflows/spring.yml +++ b/.github/workflows/spring.yml @@ -34,9 +34,9 @@ jobs: path: | ~/.cache/bazel-disk-cache ~/.cache/bazel/cache/repos/v1 - key: bazel-${{ runner.os }}-spring-java${{ matrix.java }}-${{ hashFiles('MODULE.bazel', '.bazelversion', 'maven_install.json') }} + key: bazel-${{ runner.os }}-java${{ matrix.java }}-${{ hashFiles('MODULE.bazel', '.bazelversion', 'maven_install.json') }} restore-keys: | - bazel-${{ runner.os }}-spring-java${{ matrix.java }}- + bazel-${{ runner.os }}-java${{ matrix.java }}- bazel-${{ runner.os }}- - name: Pin Maven dependencies run: REPIN=1 bazel run @maven//:pin From 7c5212fef77e8a94a9904155bccee8c27c602e80 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 15:44:58 +0000 Subject: [PATCH 3/4] Split spring cache for cross-OS repo reuse --- .github/workflows/spring.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/spring.yml b/.github/workflows/spring.yml index 7d12f8c503..2850fd0c43 100644 --- a/.github/workflows/spring.yml +++ b/.github/workflows/spring.yml @@ -28,12 +28,19 @@ jobs: -o "$HOME/.local/bin/bazel" chmod +x "$HOME/.local/bin/bazel" echo "$HOME/.local/bin" >> "$GITHUB_PATH" - - name: Restore Bazel caches + - name: Restore Bazel repository cache (cross-OS) uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 with: - path: | - ~/.cache/bazel-disk-cache - ~/.cache/bazel/cache/repos/v1 + path: ~/.cache/bazel/cache/repos/v1 + key: bazel-repos-${{ matrix.java }}-${{ hashFiles('MODULE.bazel', '.bazelversion', 'maven_install.json') }} + restore-keys: | + bazel-repos-${{ matrix.java }}- + bazel-repos- + enableCrossOsArchive: true + - name: Restore Bazel disk cache + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 + with: + path: ~/.cache/bazel-disk-cache key: bazel-${{ runner.os }}-java${{ matrix.java }}-${{ hashFiles('MODULE.bazel', '.bazelversion', 'maven_install.json') }} restore-keys: | bazel-${{ runner.os }}-java${{ matrix.java }}- From 94f531e2b4af3026fca0ea6e937f4a8cdc2c3fc5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 16:15:56 +0000 Subject: [PATCH 4/4] Enable cross-OS repo cache in main Bazel CI --- .github/workflows/bazel.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 8ba4071732..61acb1b48e 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -6,8 +6,7 @@ # Cache layers used: # 1. Repository cache – downloaded JARs / external repositories # 2. Disk cache – action output cache (build artifacts) -# Both are saved to GitHub Actions cache keyed on the OS, Bazel module lock, -# and Maven artifact list so cache hits are maximized across identical runs. +# Repository cache is shared across OS runners; disk cache remains OS-scoped. name: bazel @@ -98,13 +97,20 @@ jobs: # The disk cache stores compiled action outputs; the repository cache # stores downloaded external files (JARs, etc.). # ---------------------------------------------------------------- - - name: Restore Bazel caches + - name: Restore Bazel repository cache (cross-OS) + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 + with: + path: ~/.cache/bazel/cache/repos/v1 + key: bazel-repos-java${{ matrix.java }}-${{ hashFiles('MODULE.bazel', '.bazelversion', 'maven_install.json') }} + restore-keys: | + bazel-repos-java${{ matrix.java }}- + bazel-repos- + enableCrossOsArchive: true + - name: Restore Bazel disk cache id: bazel-cache uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 with: - path: | - ~/.cache/bazel-disk-cache - ~/.cache/bazel/cache/repos/v1 + path: ~/.cache/bazel-disk-cache key: bazel-${{ runner.os }}-java${{ matrix.java }}-${{ hashFiles('MODULE.bazel', '.bazelversion', 'maven_install.json') }} restore-keys: | bazel-${{ runner.os }}-java${{ matrix.java }}-