-
Notifications
You must be signed in to change notification settings - Fork 299
72 lines (61 loc) · 2.08 KB
/
test_catch2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Testing Catch2
on:
push:
branches: [ 'master', 'main', 'develop', 'actions_tests' ]
tags: [ 'v*' ]
pull_request:
branches: [ 'master', 'main', 'develop' ]
#schedule:
# - cron: '15 8 * * 3' # Run weekly
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Extract CoolProp version from CMakeLists.txt
shell: bash
run: |
set -x
COOLPROP_VERSION=$(python dev/extract_version.py --cmake-only)
echo COOLPROP_VERSION=$COOLPROP_VERSION >> $GITHUB_ENV
# Create the build directory too
mkdir build
- name: Configure CMake
working-directory: ./build
shell: bash
run: cmake -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE -DCOOLPROP_SHARED_LIBRARY:BOOL=ON -DCOOLPROP_CATCH_MODULE:BOOL=ON ..
- name: Build
working-directory: ./build
shell: bash
run: |
set -x
cmake --build . --target install -j $(nproc) --config $BUILD_TYPE
- name: Test
working-directory: ./build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
ctest -j $(nproc)
- name: Rerun failed Tests
if: failure()
working-directory: ./build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
ctest -j $(nproc) --rerun-failed --output-on-failure
# TODO: pick one style, for now I'm doing this so I can report zero new failures compared to catch1
- name: Rerun failed Tests in CatchTestRunner directly
if: failure()
working-directory: ./build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
./CatchTestRunner