Debian Codegraph @

3rdparty/catch2/.github/workflows/mac-builds.yml

raw symbols SCIP
1 name: Mac builds
2
3 on: [push, pull_request]
4
5 jobs:
6 build:
7 # macos-12 updated to a toolchain that crashes when linking the
8 # test binary. This seems to be a known bug in that version,
9 # and will eventually get fixed in an update. After that, we can go
10 # back to newer macos images.
11 runs-on: macos-11
12 strategy:
13 matrix:
14 cxx:
15 - g++-11
16 - clang++
17 build_type: [Debug, Release]
18 std: [14, 17]
19 include:
20 - build_type: Debug
21 examples: ON
22 extra_tests: ON
23
24 steps:
25 - uses: actions/checkout@v2
26
27 - name: Configure build
28 working-directory: ${{runner.workspace}}
29 env:
30 CXX: ${{matrix.cxx}}
31 CXXFLAGS: ${{matrix.cxxflags}}
32 # Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}.
33 # This is important
34 run: |
35 cmake -Bbuild -H$GITHUB_WORKSPACE \
36 -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
37 -DCMAKE_CXX_STANDARD=${{matrix.std}} \
38 -DCMAKE_CXX_STANDARD_REQUIRED=ON \
39 -DCATCH_DEVELOPMENT_BUILD=ON \
40 -DCATCH_BUILD_EXAMPLES=${{matrix.examples}} \
41 -DCATCH_BUILD_EXTRA_TESTS=${{matrix.examples}}
42
43 - name: Build tests + lib
44 working-directory: ${{runner.workspace}}/build
45 run: make -j 2
46
47 - name: Run tests
48 env:
49 CTEST_OUTPUT_ON_FAILURE: 1
50 working-directory: ${{runner.workspace}}/build
51 # Hardcode 2 cores we know are there
52 run: ctest -C ${{matrix.build_type}} -j 2