diff options
author | Merry <[email protected]> | 2022-12-31 17:28:39 +0000 |
---|---|---|
committer | Merry <[email protected]> | 2022-12-31 17:28:42 +0000 |
commit | 3dce8d1984229908f29fcf61b6169965e9cd99ed (patch) | |
tree | 6c903a44c80e03ba56139334df54017fbb307dc5 /externals/catch/.github | |
parent | 31a684361fb1bd1c1f03f3d833d7630b5b8d47b5 (diff) | |
parent | 6879e5bb1c598a9a517d7bdec8ba1a0bace3ef10 (diff) | |
download | dynarmic-3dce8d1984229908f29fcf61b6169965e9cd99ed.tar.gz dynarmic-3dce8d1984229908f29fcf61b6169965e9cd99ed.zip |
externals: Add catch2 v3.2.1
Merge commit '6879e5bb1c598a9a517d7bdec8ba1a0bace3ef10' as 'externals/catch'
Diffstat (limited to 'externals/catch/.github')
10 files changed, 454 insertions, 0 deletions
diff --git a/externals/catch/.github/FUNDING.yml b/externals/catch/.github/FUNDING.yml new file mode 100644 index 00000000..9122aa8a --- /dev/null +++ b/externals/catch/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: "horenmar" +custom: "https://www.paypal.me/horenmar" diff --git a/externals/catch/.github/ISSUE_TEMPLATE/bug_report.md b/externals/catch/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..dbeff115 --- /dev/null +++ b/externals/catch/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create an issue that documents a bug +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Reproduction steps** +Steps to reproduce the bug. +<!-- Usually this means a small and self-contained piece of code that uses Catch and specifying compiler flags if relevant. --> + + +**Platform information:** +<!-- Fill in any extra information that might be important for your issue. --> + - OS: **Windows NT** + - Compiler+version: **GCC v2.9.5** + - Catch version: **v1.2.3** + + +**Additional context** +Add any other context about the problem here. diff --git a/externals/catch/.github/ISSUE_TEMPLATE/feature_request.md b/externals/catch/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..be9b9eea --- /dev/null +++ b/externals/catch/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,14 @@ +--- +name: Feature request +about: Create an issue that requests a feature or other improvement +title: '' +labels: '' +assignees: '' + +--- + +**Description** +Describe the feature/change you request and why do you want it. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/externals/catch/.github/pull_request_template.md b/externals/catch/.github/pull_request_template.md new file mode 100644 index 00000000..ea2b7bb5 --- /dev/null +++ b/externals/catch/.github/pull_request_template.md @@ -0,0 +1,28 @@ +<!-- +Please do not submit pull requests changing the `version.hpp` +or the single-include `catch.hpp` file, these are changed +only when a new release is made. + +Before submitting a PR you should probably read the contributor documentation +at docs/contributing.md. It will tell you how to properly test your changes. +--> + + +## Description +<!-- +Describe the what and the why of your pull request. Remember that these two +are usually a bit different. As an example, if you have made various changes +to decrease the number of new strings allocated, that's what. The why probably +was that you have a large set of tests and found that this speeds them up. +--> + +## GitHub Issues +<!-- +If this PR was motivated by some existing issues, reference them here. + +If it is a simple bug-fix, please also add a line like 'Closes #123' +to your commit message, so that it is automatically closed. +If it is not, don't, as it might take several iterations for a feature +to be done properly. If in doubt, leave it open and reference it in the +PR itself, so that maintainers can decide. +--> diff --git a/externals/catch/.github/workflows/linux-bazel-builds.yml b/externals/catch/.github/workflows/linux-bazel-builds.yml new file mode 100644 index 00000000..9006652e --- /dev/null +++ b/externals/catch/.github/workflows/linux-bazel-builds.yml @@ -0,0 +1,24 @@ +name: Bazel build + +on: [push, pull_request] + +jobs: + build_and_test_ubuntu: + name: Linux Ubuntu 22.04 Bazel build <GCC 11.2.0> + runs-on: ubuntu-22.04 + strategy: + matrix: + compilation_mode: [fastbuild, dbg, opt] + + steps: + - uses: actions/checkout@v3 + + - name: Mount bazel cache + uses: actions/cache@v3 + with: + path: "/home/runner/.cache/bazel" + key: bazel-ubuntu22-gcc11 + + - name: Build Catch2 + run: | + bazelisk build --compilation_mode=${{matrix.compilation_mode}} //... diff --git a/externals/catch/.github/workflows/linux-meson-builds.yml b/externals/catch/.github/workflows/linux-meson-builds.yml new file mode 100644 index 00000000..dec701b6 --- /dev/null +++ b/externals/catch/.github/workflows/linux-meson-builds.yml @@ -0,0 +1,43 @@ +name: Linux builds (meson) + +on: [push, pull_request] + +jobs: + build: + name: meson ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} + runs-on: ubuntu-22.04 + strategy: + matrix: + cxx: + - g++-11 + - clang++-11 + build_type: [debug, release] + std: [14, 17] + include: + - cxx: clang++-11 + other_pkgs: clang-11 + + steps: + - uses: actions/checkout@v2 + + - name: Prepare environment + run: sudo apt-get install -y meson ninja-build ${{matrix.other_pkgs}} + + - name: Configure build + env: + CXX: ${{matrix.cxx}} + CXXFLAGS: -std=c++${{matrix.std}} ${{matrix.cxxflags}} + # Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}. + # This is important + run: | + meson -Dbuildtype=${{matrix.build_type}} ${{runner.workspace}}/meson-build + + - name: Build tests + lib + working-directory: ${{runner.workspace}}/meson-build + run: ninja + + - name: Run tests + working-directory: ${{runner.workspace}}/meson-build + # Hardcode 2 cores we know are there + run: | + meson test --verbose diff --git a/externals/catch/.github/workflows/linux-other-builds.yml b/externals/catch/.github/workflows/linux-other-builds.yml new file mode 100644 index 00000000..cf4e2c06 --- /dev/null +++ b/externals/catch/.github/workflows/linux-other-builds.yml @@ -0,0 +1,104 @@ +# The builds in this file are more complex (e.g. they need custom CMake +# configuration) and thus are unsuitable to the simple build matrix +# approach used in simple-builds +name: Linux builds (complex) + +on: [push, pull_request] + +jobs: + build: + name: ${{matrix.build_description}}, ${{matrix.cxx}}, C++${{matrix.std}} ${{matrix.build_type}} + runs-on: ubuntu-20.04 + strategy: + matrix: + # We add builds one by one in this case, because there are no + # dimensions that are shared across the builds + include: + + # Single surrogate header build + - cxx: clang++-10 + build_description: Surrogates build + build_type: Debug + std: 14 + other_pkgs: clang-10 + cmake_configurations: -DCATCH_BUILD_SURROGATES=ON + + # Extras and examples with gcc-7 + - cxx: g++-7 + build_description: Extras + Examples + build_type: Debug + std: 14 + other_pkgs: g++-7 + cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON + - cxx: g++-7 + build_description: Extras + Examples + build_type: Release + std: 14 + other_pkgs: g++-7 + cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON + + # Extras and examples with Clang-10 + - cxx: clang++-10 + build_description: Extras + Examples + build_type: Debug + std: 17 + other_pkgs: clang-10 + cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON + - cxx: clang++-10 + build_description: Extras + Examples + build_type: Release + std: 17 + other_pkgs: clang-10 + cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON + + # Configure tests with Clang-10 + - cxx: clang++-10 + build_description: CMake configuration tests + build_type: Debug + std: 14 + other_pkgs: clang-10 + cmake_configurations: -DCATCH_ENABLE_CONFIGURE_TESTS=ON + + # Valgrind test Clang-10 + - cxx: clang++-10 + build_description: Valgrind tests + build_type: Debug + std: 14 + other_pkgs: clang-10 valgrind + cmake_configurations: -DMEMORYCHECK_COMMAND=`which valgrind` -DMEMORYCHECK_COMMAND_OPTIONS="-q --track-origins=yes --leak-check=full --num-callers=50 --show-leak-kinds=definite --error-exitcode=1" + other_ctest_args: -T memcheck -LE uses-python + + + steps: + - uses: actions/checkout@v2 + + - name: Prepare environment + run: sudo apt-get install -y ninja-build ${{matrix.other_pkgs}} + + - name: Configure build + working-directory: ${{runner.workspace}} + env: + CXX: ${{matrix.cxx}} + CXXFLAGS: ${{matrix.cxxflags}} + # Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}. + # This is important + run: | + cmake -Bbuild -H$GITHUB_WORKSPACE \ + -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ + -DCMAKE_CXX_STANDARD=${{matrix.std}} \ + -DCMAKE_CXX_STANDARD_REQUIRED=ON \ + -DCMAKE_CXX_EXTENSIONS=OFF \ + -DCATCH_DEVELOPMENT_BUILD=ON \ + ${{matrix.cmake_configurations}} \ + -G Ninja + + - name: Build tests + lib + working-directory: ${{runner.workspace}}/build + run: ninja + + - name: Run tests + env: + CTEST_OUTPUT_ON_FAILURE: 1 + working-directory: ${{runner.workspace}}/build + # Hardcode 2 cores we know are there + run: ctest -C ${{matrix.build_type}} -j 2 ${{matrix.other_ctest_args}} diff --git a/externals/catch/.github/workflows/linux-simple-builds.yml b/externals/catch/.github/workflows/linux-simple-builds.yml new file mode 100644 index 00000000..989c4942 --- /dev/null +++ b/externals/catch/.github/workflows/linux-simple-builds.yml @@ -0,0 +1,122 @@ +name: Linux builds (basic) + +on: [push, pull_request] + +jobs: + build: + name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} + runs-on: ubuntu-20.04 + strategy: + matrix: + cxx: + - g++-5 + - g++-6 + - g++-7 + - g++-8 + - g++-9 + - g++-10 + - clang++-6.0 + - clang++-7 + - clang++-8 + - clang++-9 + - clang++-10 + build_type: [Debug, Release] + std: [14] + include: + - cxx: g++-5 + other_pkgs: g++-5 + - cxx: g++-6 + other_pkgs: g++-6 + - cxx: g++-7 + other_pkgs: g++-7 + - cxx: g++-8 + other_pkgs: g++-8 + - cxx: g++-9 + other_pkgs: g++-9 + - cxx: g++-10 + other_pkgs: g++-10 + - cxx: clang++-6.0 + other_pkgs: clang-6.0 + - cxx: clang++-7 + other_pkgs: clang-7 + - cxx: clang++-8 + other_pkgs: clang-8 + - cxx: clang++-9 + other_pkgs: clang-9 + - cxx: clang++-10 + other_pkgs: clang-10 + # Clang 6 + C++17 + # does not work with the default libstdc++ version thanks + # to a disagreement on variant implementation. + # - cxx: clang++-6.0 + # build_type: Debug + # std: 17 + # other_pkgs: clang-6.0 + # - cxx: clang++-6.0 + # build_type: Release + # std: 17 + # other_pkgs: clang-6.0 + # Clang 10 + C++17 + - cxx: clang++-10 + build_type: Debug + std: 17 + other_pkgs: clang-10 + - cxx: clang++-10 + build_type: Release + std: 17 + other_pkgs: clang-10 + - cxx: clang++-10 + build_type: Debug + std: 20 + other_pkgs: clang-10 + - cxx: clang++-10 + build_type: Release + std: 20 + other_pkgs: clang-10 + - cxx: g++-10 + build_type: Debug + std: 20 + other_pkgs: g++-10 + - cxx: g++-10 + build_type: Release + std: 20 + other_pkgs: g++-10 + + steps: + - uses: actions/checkout@v2 + + - name: Add repositories for older GCC + run: | + sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic main' + sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic universe' + if: ${{ matrix.cxx == 'g++-5' || matrix.cxx == 'g++-6' }} + + - name: Prepare environment + run: sudo apt-get install -y ninja-build ${{matrix.other_pkgs}} + + - name: Configure build + working-directory: ${{runner.workspace}} + env: + CXX: ${{matrix.cxx}} + CXXFLAGS: ${{matrix.cxxflags}} + # Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}. + # This is important + run: | + cmake -Bbuild -H$GITHUB_WORKSPACE \ + -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ + -DCMAKE_CXX_STANDARD=${{matrix.std}} \ + -DCMAKE_CXX_STANDARD_REQUIRED=ON \ + -DCMAKE_CXX_EXTENSIONS=OFF \ + -DCATCH_DEVELOPMENT_BUILD=ON \ + -G Ninja + + - name: Build tests + lib + working-directory: ${{runner.workspace}}/build + run: ninja + + - name: Run tests + env: + CTEST_OUTPUT_ON_FAILURE: 1 + working-directory: ${{runner.workspace}}/build + # Hardcode 2 cores we know are there + run: ctest -C ${{matrix.build_type}} -j 2 diff --git a/externals/catch/.github/workflows/mac-builds.yml b/externals/catch/.github/workflows/mac-builds.yml new file mode 100644 index 00000000..955b81fc --- /dev/null +++ b/externals/catch/.github/workflows/mac-builds.yml @@ -0,0 +1,52 @@ +name: Mac builds + +on: [push, pull_request] + +jobs: + build: + # macos-12 updated to a toolchain that crashes when linking the + # test binary. This seems to be a known bug in that version, + # and will eventually get fixed in an update. After that, we can go + # back to newer macos images. + runs-on: macos-11 + strategy: + matrix: + cxx: + - g++-11 + - clang++ + build_type: [Debug, Release] + std: [14, 17] + include: + - build_type: Debug + examples: ON + extra_tests: ON + + steps: + - uses: actions/checkout@v2 + + - name: Configure build + working-directory: ${{runner.workspace}} + env: + CXX: ${{matrix.cxx}} + CXXFLAGS: ${{matrix.cxxflags}} + # Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}. + # This is important + run: | + cmake -Bbuild -H$GITHUB_WORKSPACE \ + -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ + -DCMAKE_CXX_STANDARD=${{matrix.std}} \ + -DCMAKE_CXX_STANDARD_REQUIRED=ON \ + -DCATCH_DEVELOPMENT_BUILD=ON \ + -DCATCH_BUILD_EXAMPLES=${{matrix.examples}} \ + -DCATCH_BUILD_EXTRA_TESTS=${{matrix.examples}} + + - name: Build tests + lib + working-directory: ${{runner.workspace}}/build + run: make -j 2 + + - name: Run tests + env: + CTEST_OUTPUT_ON_FAILURE: 1 + working-directory: ${{runner.workspace}}/build + # Hardcode 2 cores we know are there + run: ctest -C ${{matrix.build_type}} -j 2 diff --git a/externals/catch/.github/workflows/validate-header-guards.yml b/externals/catch/.github/workflows/validate-header-guards.yml new file mode 100644 index 00000000..c02b5d49 --- /dev/null +++ b/externals/catch/.github/workflows/validate-header-guards.yml @@ -0,0 +1,36 @@ +name: Check header guards + +on: [push, pull_request] + +jobs: + build: + # Set the type of machine to run on + runs-on: ubuntu-20.04 + steps: + + - name: Checkout source code + uses: actions/checkout@v2 + + - name: Setup Dependencies + uses: actions/setup-python@v2 + with: + python-version: '3.7' + - name: Install checkguard + run: pip install guardonce + + - name: Check that include guards are properly named + run: | + wrong_files=$(checkguard -r src/catch2/ -p "name | append _INCLUDED | upper") + if [[ $wrong_files ]]; then + echo "Files with wrong header guard:" + echo $wrong_files + exit 1 + fi + + - name: Check that there are no duplicated filenames + run: | + ./tools/scripts/checkDuplicateFilenames.py + + - name: Check that all source files have the correct license header + run: | + ./tools/scripts/checkLicense.py |