Debian Codegraph @

3rdparty/catch2/.github/workflows/linux-other-builds.yml

raw symbols SCIP
1 # The builds in this file are more complex (e.g. they need custom CMake
2 # configuration) and thus are unsuitable to the simple build matrix
3 # approach used in simple-builds
4 name: Linux builds (complex)
5
6 on: [push, pull_request]
7
8 jobs:
9 build:
10 name: ${{matrix.build_description}}, ${{matrix.cxx}}, C++${{matrix.std}} ${{matrix.build_type}}
11 runs-on: ubuntu-20.04
12 strategy:
13 matrix:
14 # We add builds one by one in this case, because there are no
15 # dimensions that are shared across the builds
16 include:
17
18 # Single surrogate header build
19 - cxx: clang++-10
20 build_description: Surrogates build
21 build_type: Debug
22 std: 14
23 other_pkgs: clang-10
24 cmake_configurations: -DCATCH_BUILD_SURROGATES=ON
25
26 # Extras and examples with gcc-7
27 - cxx: g++-7
28 build_description: Extras + Examples
29 build_type: Debug
30 std: 14
31 other_pkgs: g++-7
32 cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON
33 - cxx: g++-7
34 build_description: Extras + Examples
35 build_type: Release
36 std: 14
37 other_pkgs: g++-7
38 cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON
39
40 # Extras and examples with Clang-10
41 - cxx: clang++-10
42 build_description: Extras + Examples
43 build_type: Debug
44 std: 17
45 other_pkgs: clang-10
46 cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON
47 - cxx: clang++-10
48 build_description: Extras + Examples
49 build_type: Release
50 std: 17
51 other_pkgs: clang-10
52 cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON
53
54 # Configure tests with Clang-10
55 - cxx: clang++-10
56 build_description: CMake configuration tests
57 build_type: Debug
58 std: 14
59 other_pkgs: clang-10
60 cmake_configurations: -DCATCH_ENABLE_CONFIGURE_TESTS=ON
61
62 # Valgrind test Clang-10
63 - cxx: clang++-10
64 build_description: Valgrind tests
65 build_type: Debug
66 std: 14
67 other_pkgs: clang-10 valgrind
68 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"
69 other_ctest_args: -T memcheck -LE uses-python
70
71
72 steps:
73 - uses: actions/checkout@v2
74
75 - name: Prepare environment
76 run: sudo apt-get install -y ninja-build ${{matrix.other_pkgs}}
77
78 - name: Configure build
79 working-directory: ${{runner.workspace}}
80 env:
81 CXX: ${{matrix.cxx}}
82 CXXFLAGS: ${{matrix.cxxflags}}
83 # Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}.
84 # This is important
85 run: |
86 cmake -Bbuild -H$GITHUB_WORKSPACE \
87 -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
88 -DCMAKE_CXX_STANDARD=${{matrix.std}} \
89 -DCMAKE_CXX_STANDARD_REQUIRED=ON \
90 -DCMAKE_CXX_EXTENSIONS=OFF \
91 -DCATCH_DEVELOPMENT_BUILD=ON \
92 ${{matrix.cmake_configurations}} \
93 -G Ninja
94
95 - name: Build tests + lib
96 working-directory: ${{runner.workspace}}/build
97 run: ninja
98
99 - name: Run tests
100 env:
101 CTEST_OUTPUT_ON_FAILURE: 1
102 working-directory: ${{runner.workspace}}/build
103 # Hardcode 2 cores we know are there
104 run: ctest -C ${{matrix.build_type}} -j 2 ${{matrix.other_ctest_args}}