diff options
| author | Leitwolf | 2026-11-16 14:48:52 +0300 |
|---|---|---|
| committer | GitHub | 2026-11-16 14:48:52 +0300 |
| commit | 57dc4f2fee6881884b10085e85927a0c1710ea61 (patch) | |
| tree | f04d44d03b84c93b0383dfbce492b32b1c23dc76 /.github | |
| parent | 48a52e544ae90d6767240a8b5f030350795fbd7b (diff) | |
| parent | 5a63d9c746daa1748db7622a5e3effb9ca5c4b40 (diff) | |
| download | catch3-devel.tar.gz | |
Prepare the Bazel Central Registry entry as progmasoft_catch3
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/bazel-builds.yml | 29 | ||||
| -rw-r--r-- | .github/workflows/publish-to-bcr.yml | 35 |
2 files changed, 64 insertions, 0 deletions
diff --git a/.github/workflows/bazel-builds.yml b/.github/workflows/bazel-builds.yml index 8033e3d7..f0672a7a 100644 --- a/.github/workflows/bazel-builds.yml +++ b/.github/workflows/bazel-builds.yml @@ -42,3 +42,32 @@ jobs: run: bazel test tests/Progmasoft:property_tests env: CC: clang + + module: + name: Bazel ${{ matrix.bazel }} module on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-2025-vs2026, ubuntu-26.04] + # bazel_compatibility in MODULE.bazel is >=8.0.0; the Bazel Central + # Registry runs the same test module on both lines. + bazel: [8.x, 9.x] + + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false + + - uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 + with: + bazelisk-cache: true + repository-cache: true + + - name: Test the module as a user's module depends on it + working-directory: tests/Progmasoft/BazelModule + run: bazel test //... + shell: bash + env: + USE_BAZEL_VERSION: ${{ matrix.bazel }} + BAZEL_SH: ${{ runner.os == 'Windows' && 'C:\Program Files\Git\bin\bash.exe' || '' }} diff --git a/.github/workflows/publish-to-bcr.yml b/.github/workflows/publish-to-bcr.yml new file mode 100644 index 00000000..beac20a0 --- /dev/null +++ b/.github/workflows/publish-to-bcr.yml @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: 2026 Progmasoft <[email protected]> +# SPDX-License-Identifier: LGPL-3.0-or-later + +# Opens the pull request that adds a release to the Bazel Central Registry as +# progmasoft_catch3, from the templates in .bcr/. The registry builds the test +# module of .bcr/presubmit.yml before it accepts the version. +name: Publish to BCR + +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag_name: + description: The release tag, such as catch3-0.5.0 + required: true + type: string + +permissions: {} + +jobs: + publish: + if: startsWith(github.event.release.tag_name || inputs.tag_name, 'catch3-') + uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@3b1b972e41764b9a7498cf9128ed4ed2258a3687 # v1.6.0 + with: + tag_name: ${{ github.event.release.tag_name || inputs.tag_name }} + tag_prefix: catch3- + registry_fork: Leitwolf11/bazel-central-registry + # BCR accepts source attestations only from bazel-contrib's release + # workflow; Catch3's releases are made without it. + attest: false + permissions: + contents: write # the reusable workflow may add files to the release + secrets: + publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }} |