catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Build against the Progmasoft remote cache
- Commit
dacada4eeab3a6a4ef1d0898d657d60c634b8cf5- Author
- Leitwolf11 ·
- Parents
57dc4f2fee68
Changes
.github/workflows/bazel-builds.yml | 42 ++++++++++++++++++++++++++++ .github/workflows/validate-header-guards.yml | 21 ++++++++++++++ 2 files changed, 63 insertions(+) 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: