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

summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorLeitwolf2026-11-16 18:11:16 +0300
committerGitHub2026-11-16 18:11:16 +0300
commitf581f27f59886ddbc6607456793cf6129400ddc1 (patch)
tree9bae14d8a734e37b167d01bb60671d3f0989a49e /.github/workflows
parent430cd475da04bf3dba74c96b273c4f12570d6577 (diff)
parenteea3be11a9e1a047442d71626557e57c3061da1a (diff)
downloadcatch3-f581f27f59886ddbc6607456793cf6129400ddc1.tar.gz
Merge branch 'devel' into security/bounded-strings
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/bazel-builds.yml42
-rw-r--r--.github/workflows/validate-header-guards.yml21
2 files changed, 63 insertions, 0 deletions
diff --git a/.github/workflows/bazel-builds.yml b/.github/workflows/bazel-builds.yml
index f0672a7a..f42170d1 100644
--- a/.github/workflows/bazel-builds.yml
+++ b/.github/workflows/bazel-builds.yml
@@ -30,6 +30,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: Run Progmasoft property tests on Windows
if: runner.os == 'Windows'
run: bazel test tests/Progmasoft:property_tests
@@ -64,6 +85,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 module as a user's module depends on it
working-directory: tests/Progmasoft/BazelModule
run: bazel test //...
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: