This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git
The following commit(s) were added to refs/heads/main by this push:
new ee8532f1a ci: fix Bazel cache paths for C++ workflows (#3535)
ee8532f1a is described below
commit ee8532f1ac816b3d3b3f12db0ae7dcca98b5daec
Author: Shawn Yang <[email protected]>
AuthorDate: Fri Apr 3 15:51:06 2026 +0800
ci: fix Bazel cache paths for C++ workflows (#3535)
## Summary
- cache the Bazel output base used by `setup-bazel` on GitHub-hosted
runners
- keep the existing legacy cache paths alongside the actual `~/.bazel`
locations
- replace the sanitizer `//cpp/...` sweep with a smaller smoke suite
that still exercises util/meta/row/encoder plus representative
serialization entry tests
## Verification
- `python3 - <<'PY' ... yaml.safe_load(".github/workflows/ci.yml") ...
PY`
- `git diff --check`
This PR is intended to drive the C++ ASan and UBSan jobs closer to the
PR-time budget. If the new smoke suite is still too slow, the next step
is reducing to a single sanitizer on PRs and moving the broader sweep to
nightly.
---
.github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f969e6ed1..867fe8aea 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -593,9 +593,13 @@ jobs:
- name: Cache Bazel repository cache
uses: actions/cache@v4
with:
+ # setup-bazel uses ~/.bazel on GitHub-hosted runners.
path: |
+ ~/.bazel/external
~/.cache/bazel/_bazel_*/*/external
~/Library/Caches/bazel/_bazel_*/*/external
+ ~/Library/Caches/bazel/external
+ C:\users\runneradmin\.bazel\external
C:\users\runneradmin\_bazel_runneradmin\*/external
key: bazel-repo-${{ runner.os }}-${{ runner.arch }}-py311-${{
hashFiles('WORKSPACE', '.bazelrc', 'bazel/**') }}
restore-keys: |
@@ -603,9 +607,12 @@ jobs:
- name: Cache Bazel build outputs
uses: actions/cache@v4
with:
+ # setup-bazel uses ~/.bazel on GitHub-hosted runners.
path: |
+ ~/.bazel
~/.cache/bazel
~/Library/Caches/bazel
+ C:\users\runneradmin\.bazel
C:\users\runneradmin\_bazel_runneradmin
key: bazel-build-cpp-${{ runner.os }}-${{ runner.arch }}-${{
hashFiles('cpp/**', 'BUILD', 'WORKSPACE') }}
- name: Run C++ CI with Bazel
@@ -641,7 +648,9 @@ jobs:
- name: Cache Bazel repository cache
uses: actions/cache@v4
with:
+ # setup-bazel uses ~/.bazel on GitHub-hosted runners.
path: |
+ ~/.bazel/external
~/.cache/bazel/_bazel_*/*/external
key: bazel-repo-sanitizer-${{ runner.os }}-${{ runner.arch
}}-py311-${{ hashFiles('WORKSPACE', '.bazelrc', 'bazel/**') }}
restore-keys: |
@@ -649,7 +658,10 @@ jobs:
- name: Cache Bazel build outputs
uses: actions/cache@v4
with:
- path: ~/.cache/bazel
+ # setup-bazel uses ~/.bazel on GitHub-hosted runners.
+ path: |
+ ~/.bazel
+ ~/.cache/bazel
key: bazel-build-cpp-sanitizer-${{ runner.os }}-${{ runner.arch
}}-${{ matrix.sanitizer }}-${{ hashFiles('cpp/**', 'BUILD', 'WORKSPACE',
'.bazelrc') }}
- name: Install Bazel and C++ deps
run: python ./ci/run_ci.py cpp --install-deps-only
@@ -660,7 +672,22 @@ jobs:
if [[ "${ARCH}" == "x86_64" || "${ARCH}" == "amd64" ]]; then
BAZEL_CONFIGS="--config=x86_64 ${BAZEL_CONFIGS}"
fi
- bazel test --cache_test_results=no ${BAZEL_CONFIGS} $(bazel query
//cpp/...)
+ TEST_TARGETS=(
+ //cpp/fory/util:buffer_test
+ //cpp/fory/util:error_test
+ //cpp/fory/util:logging_test
+ //cpp/fory/util:result_test
+ //cpp/fory/meta:enum_info_test
+ //cpp/fory/meta:field_info_test
+ //cpp/fory/meta:meta_string_test
+ //cpp/fory/meta:type_traits_test
+ //cpp/fory/row:row_test
+ //cpp/fory/encoder:row_encoder_test
+ //cpp/fory/serialization:serialization_test
+ //cpp/fory/serialization:namespace_macro_test
+ //cpp/fory/serialization:stream_test
+ )
+ bazel test --cache_test_results=no ${BAZEL_CONFIGS}
"${TEST_TARGETS[@]}"
- name: Upload Bazel Test Logs (${{ matrix.sanitizer }})
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]