Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/validate-header-guards.yml
diff options
context:
space:
mode:
authorLeitwolf2026-11-16 18:11:10 +0300
committerGitHub2026-11-16 18:11:10 +0300
commiteea3be11a9e1a047442d71626557e57c3061da1a (patch)
treecc2934976615781eb59d66134e58efa78dfc410d /.github/workflows/validate-header-guards.yml
parent57dc4f2fee6881884b10085e85927a0c1710ea61 (diff)
parentdacada4eeab3a6a4ef1d0898d657d60c634b8cf5 (diff)
downloadcatch3-devel.tar.gz
Merge pull request #49 from Progmasoft/ci/remote-cacheHEADdevel
Build against the Progmasoft remote cache
Diffstat (limited to '.github/workflows/validate-header-guards.yml')
-rw-r--r--.github/workflows/validate-header-guards.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/.github/workflows/validate-header-guards.yml b/.github/workflows/validate-header-guards.yml
index bceb79ae..27080040 100644
--- a/.github/workflows/validate-header-guards.yml
+++ b/.github/workflows/validate-header-guards.yml
@@ -24,6 +24,27 @@ jobs:
bazelisk-cache: true
repository-cache: true
+ # Pushes to the default branch write to the Progmasoft remote cache and
+ # pull requests only read it; a pull request from a fork gets no secrets
+ # and builds without it.
+ - name: Use the Progmasoft remote cache
+ shell: bash
+ env:
+ WRITES: ${{ github.event_name == 'push' && github.ref_name == github.event.repository.default_branch }}
+ CACHE_READ: ${{ secrets.BAZEL_CACHE_READ }}
+ CACHE_WRITE: ${{ github.event_name == 'push' && github.ref_name == github.event.repository.default_branch && secrets.BAZEL_CACHE_WRITE || '' }}
+ run: |
+ auth=$([ "$WRITES" = true ] && echo "$CACHE_WRITE" || echo "$CACHE_READ")
+ if [ -z "$auth" ]; then
+ echo "No cache credentials: building without the remote cache."
+ exit 0
+ fi
+ {
+ echo "common --remote_cache=https://remotecache.progmasoft.com"
+ echo "common --remote_header=\"Authorization=Basic $auth\""
+ [ "$WRITES" = true ] || echo "common --remote_upload_local_results=false"
+ } >> "$HOME/.bazelrc"
+
- name: Test the tools
run: bazel test //tools:tools_tests
env: