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
Deprecate the Premake build
- Commit
9268eaa2d0c9a0ffdd29594478556ec2356ecd4a- Author
- Leitwolf11 ·
- Parents
f8c84ccf6344
Changes
.github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/pull_request_template.md | 2 +- .github/workflows/alternative-build-systems.yml | 43 ------------------------- README.md | 8 +++-- docs/contributing.md | 4 ++- docs/progmasoft-catch3.md | 17 ++++++---- premake5.lua | 5 +++ 7 files changed, 25 insertions(+), 56 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f704f815..5c6e6198 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -36,7 +36,7 @@ Provide a small C++17 test, the command used to build and run it, and the test-r - Catch3 commit or release: - OS and architecture: - Compiler and version: -- Build system and version (Bazel, CMake, Meson, Xmake, or Premake): +- Build system and version (Bazel, CMake, Meson, Xmake, or the deprecated Premake): - Relevant flags or configuration: ### Additional context diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d18e09af..64fd484c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -16,7 +16,7 @@ upstream code and its original license separately from new Progmasoft code. ## Verification - [ ] SelfTest and relevant Progmasoft property/snapshot/XML tests were run. -- [ ] The affected Bazel, CMake, Meson, Xmake, or Premake build path was checked. +- [ ] The affected Bazel, CMake, Meson or Xmake build path was checked (Premake is deprecated and not checked). - [ ] Public headers and compiled-library behavior were considered; this PR does not accidentally make Catch3 header-only. - [ ] I checked formatting, licenses, generated files, and `git diff --check`. diff --git a/.github/workflows/alternative-build-systems.yml b/.github/workflows/alternative-build-systems.yml index 8068a00c..d73cbe5e 100644 --- a/.github/workflows/alternative-build-systems.yml +++ b/.github/workflows/alternative-build-systems.yml @@ -66,46 +66,3 @@ jobs: - name: Run property tests run: xmake run ProgmasoftPropertyTests - - premake: - name: Premake on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [windows-2022, ubuntu-26.04] - - steps: - - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 - with: - persist-credentials: false - - - uses: abel0b/setup-premake@b80dc6f70e8ab159fb854bdadbeb1a53cfc28723 # v2.4 - with: - version: '5.0.0-beta7' - - - uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3 - if: runner.os == 'Windows' - with: - msbuild-architecture: x64 - - - name: Generate and build Visual Studio projects - if: runner.os == 'Windows' - shell: pwsh - run: | - premake5 vs2022 - msbuild build/premake/Catch3.sln /m /p:Configuration=Debug /p:Platform=x64 /nologo - - - name: Run property tests on Windows - if: runner.os == 'Windows' - run: build/premake/bin/Debug/ProgmasoftPropertyTests.exe - - - name: Generate and build Clang Makefiles - if: runner.os == 'Linux' - run: | - premake5 gmake --cc=clang - make -C build/premake config=debug -j 4 - - - name: Run property tests on Linux - if: runner.os == 'Linux' - run: build/premake/bin/Debug/ProgmasoftPropertyTests diff --git a/README.md b/README.md index 751d7eeb..13263eb6 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,11 @@ Bazel is the primary build and validation path. From the repository root: bazel test //tests/Progmasoft:property_tests ``` -The same suite is also available through the maintained CMake, Meson, Xmake, -and Premake project files. Their setup details and toolchain requirements are -in the [build guide](https://catch3.uk/docs/progmasoft-catch3/#build-quick-start). +The same suite is also available through the maintained CMake, Meson and +Xmake project files. Their setup details and toolchain requirements are in the +[build guide](https://catch3.uk/docs/progmasoft-catch3/#build-quick-start). +The Premake project files are deprecated: they are not tested, and APIs added +from now on are not added to them. For a CMake consumer of the installed library: diff --git a/docs/contributing.md b/docs/contributing.md index 047d79f1..14e428b1 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -44,7 +44,9 @@ cmake --build build ctest --test-dir build -j ``` -Meson, Xmake and Premake builds exist as well and are checked in CI. +Meson and Xmake builds exist as well and are checked in CI. The Premake build is +deprecated: it is not tested, and new APIs are not added to it, so a change does +not need to touch `premake5.lua`. Before you push, run the repository checks: diff --git a/docs/progmasoft-catch3.md b/docs/progmasoft-catch3.md index e326f85d..d7c50363 100644 --- a/docs/progmasoft-catch3.md +++ b/docs/progmasoft-catch3.md @@ -199,7 +199,7 @@ c++ -std=c++17 tests.cpp $(pkg-config --cflags --libs catch3-with-main) ``` The pkg-config modules are `catch3` and `catch3-with-main`. CMake, Meson, -Xmake and Premake build the files under the same names. +Xmake and the deprecated Premake build make the files under the same names. In the Bazel Central Registry, from 0.5.0 on, the module is `progmasoft_catch3`, for Bazel 8 and later: @@ -217,10 +217,11 @@ to C++14). In this repository the Bazel target is `//:catch3`; its tests are `//tests/Progmasoft:property_tests`, and `tests/Progmasoft/BazelModule` is a module that depends on Catch3 as a user's does. Bazel is the primary -build path; CMake, Meson, Xmake, and Premake are also maintained as alternate -ways to build the same engine and property tests. Their root files are -`CMakeLists.txt`, `meson.build`, `xmake.lua`, and `premake5.lua`. Xmake and -Premake materialize the default generated configuration header, +build path; CMake, Meson and Xmake are also maintained as alternate ways to +build the same engine and property tests. Their root files are +`CMakeLists.txt`, `meson.build` and `xmake.lua`. `premake5.lua` remains but is +deprecated: it is not tested, and APIs added from now on are not added to it. +Xmake and Premake materialize the default generated configuration header, `Progmasoft/Catch3/UserConfig.hpp`, from the checked-in template. Meson 1.1.0 or newer is required for the Clang-CL C++17 test target. @@ -253,13 +254,15 @@ meson setup build/meson --vsenv -Dtests=true -Dinstall=false meson compile -C build/meson meson test -C build/meson --print-errorlogs -# Premake (choose an action supported by the host) +# Premake, deprecated: not tested, and without the APIs added from now on premake5 vs2022 ``` Premake generates projects rather than compiling directly; build the generated solution with the corresponding host toolchain. On macOS, use -`premake5 gmake`, then build the generated makefiles with `make`. Meson users on +`premake5 gmake`, then build the generated makefiles with `make`. The Premake +build is deprecated: it is not tested, it warns when it runs, and APIs added +from now on are not added to it. Meson users on macOS can select Apple Clang with `CC=clang CXX=clang++` before configuration. ## Compatibility and licensing boundary diff --git a/premake5.lua b/premake5.lua index 9404eba8..1e1ae02e 100644 --- a/premake5.lua +++ b/premake5.lua @@ -1,6 +1,11 @@ -- Copyright (c) 2026 Progmasoft. -- SPDX-License-Identifier: LGPL-3.0-or-later +-- Deprecated: this Premake build is no longer tested, and APIs added to Catch3 from now on are not added to it. +-- Use Bazel, CMake, Meson or Xmake. +premake.warn("The Premake build of Catch3 is deprecated: it is not tested, and new APIs are not added to it. " .. + "Use Bazel, CMake, Meson or Xmake.") + local repository_root = path.getabsolute(".") local generated_include = path.join(repository_root, "build", "premake", "generated") local configure_catch3 = dofile(path.join(repository_root, "buildsupport", "catch3_config.lua"))