Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -102,7 +101,16 @@ 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:
Expand Down
41 changes: 36 additions & 5 deletions .github/workflows/spring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,48 @@ 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
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
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 repository cache (cross-OS)
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/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 }}-
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
Loading