-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (64 loc) · 2.17 KB
/
cmake.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
name: GitHub actions
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
env:
BUILD_TYPE: Debug
EIGEN3_WIN_INSTALL_DIR: C:/ProgramData/chocolatey/lib/eigen/include
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Eigen3
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
choco install eigen
elif [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y libeigen3-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install eigen
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Configure stab POSIX
if: matrix.os != 'windows-latest'
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_QPP=OFF
- name: Configure stab Windows
shell: cmd
if: matrix.os == 'windows-latest'
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DEIGEN3_INSTALL_DIR=${{env.EIGEN3_WIN_INSTALL_DIR}} -DUSE_QPP=OFF
- name: Build stab
run: cmake --build build --parallel 4
- name: Run stab POSIX
if: matrix.os != 'windows-latest'
run: ./build/stab
- name: Run stab Windows
if: matrix.os == 'windows-latest'
shell: cmd
run: .\build\${{env.BUILD_TYPE}}\stab.exe
- name: Build unit tests POSIX
if: matrix.os != 'windows-latest'
run: cmake --build build --target unit_tests --parallel 4
- name: Build unit tests Windows
if: matrix.os == 'windows-latest'
shell: cmd
run: |
set PATH=%PATH%;${{github.workspace}}\build\${{env.BUILD_TYPE}}
cmake --build build --target unit_tests --parallel 4
- name: Run unit tests POSIX
if: matrix.os != 'windows-latest'
run: ctest --test-dir build
- name: Run unit tests Windows
if: matrix.os == 'windows-latest'
shell: cmd
run: |
set PATH=%PATH%;${{github.workspace}}\build\${{env.BUILD_TYPE}}
ctest --test-dir build