-
Notifications
You must be signed in to change notification settings - Fork 3
133 lines (131 loc) · 4.52 KB
/
main.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: "Build & Test"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: turtlebrowser/get-conan@main
- name: Run Conan Install
run: |
conan profile detect
conan profile detect --name debug
echo "&:build_type=Debug" >> $(conan profile path debug)
conan install -of . -pr debug -o with_tests=True .
- name: Run CMake
run: cmake --preset conan-debug -DUSE_COVERAGE=ON .
- name: Compile
run: cmake --build build/Debug --target tests
- name: Run Tests
run: ./build/Debug/test/tests --log_format=JUNIT --log_level=all --log_sink=boosttest.xml
- name: Install GCovr
run: pip install gcovr
- name: Extract Coverage
run: gcovr -r . -e ./test --object-directory=./build/Debug/CMakeFiles --exclude-unreachable-branches --exclude-throw-branches -b --sonarqube coverage.xml --xml cobertura.xml
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./boosttest.xml,./coverage.xml,./cobertura.xml
verbose: true # optional (default = false)
fail_ci_if_error: true
test_release_win:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: turtlebrowser/get-conan@main
- uses: ilammy/msvc-dev-cmd@v1
- name: Run Conan Install
run: |
conan profile detect
powershell -Command "(gc $(conan profile path default)) -replace 'compiler.cppstd=14', 'compiler.cppstd=17' | Out-File -encoding ASCII $(conan profile path default)"
conan install -of . -o with_tests=True .
- name: Run CMake
run: cmake --preset conan-default .
- name: Compile
run: cmake --build build --preset conan-release --target tests
- name: Run Tests
run: ./build/test/Release/tests.exe
test_without_conan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install parallelism library for C++
run: sudo apt update && sudo apt install libtbb2
- uses: MarkusJx/[email protected]
with:
boost_version: 1.81.0
- name: Install SCIP
run: |
wget https://github.com/scipopt/scip/releases/download/v803/SCIPOptSuite-8.0.3-Linux-ubuntu.sh
chmod +x SCIPOptSuite-8.0.3-Linux-ubuntu.sh
./SCIPOptSuite-8.0.3-Linux-ubuntu.sh --skip-license
- name: Build SCIP++
run: |
CMAKE_PREFIX_PATH=./lib/cmake/scip:./boost/boost/lib/cmake/Boost-1.81.0 cmake -DBUILD_TESTS=ON .
make -j tests
- name: Run tests
run: ./test/tests
test_release_inx:
strategy:
matrix:
os: [ ubuntu-latest, macos-11 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: turtlebrowser/get-conan@main
- name: Run Conan Install
run: |
conan profile detect
conan install -of . -o with_tests=True .
- name: Run CMake
run: cmake --preset conan-release .
- name: Compile
run: cmake --build build/Release --target tests
- name: Run Tests
run: ./build/Release/test/tests
clang_tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: turtlebrowser/get-conan@main
- name: Run Conan Install
run: |
conan profile detect
conan install -of . .
- name: Create CMake Compilation Database
run: cmake --preset conan-release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
- name: Run Clang-Tidy
run: clang-tidy-14 -p build/Release source/*.cpp include/**/*.hpp
clang_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DoozyX/[email protected]
with:
source: source include test
extensions: 'hpp,cpp'
clangFormatVersion: 16
doxygen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ssciwr/doxygen-install@v1
with:
version: "1.9.6"
- uses: ts-graphviz/setup-graphviz@v1
- name: Prepare Doxygen Config
run: echo "PROJECT_NUMBER = ${GITHUB_REF}" >> Doxyfile
- name: Run Doxygen
run: doxygen
- name: Zip HTML Docu
run: zip -q -9 -r html.zip html
- name: Store HTML Docu
uses: actions/upload-artifact@v3
with:
name: doxygen-html
path: html.zip
retention-days: 2