-
Notifications
You must be signed in to change notification settings - Fork 30
67 lines (55 loc) · 2 KB
/
ci.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
name: CI Workflow
on:
push:
pull_request:
branches:
- master
- devel
schedule:
- cron: '0 2 * * *'
jobs:
build:
name: '[${{ matrix.os }}@${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
matrix:
build_type: [Release, Debug]
os: [ubuntu-20.04, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@master
- name: Remove broken apt repos [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
- name: Dependencies [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install libeigen3-dev
- name: Dependencies [macOS]
if: matrix.os == 'macOS-latest'
run: brew install eigen
- name: Dependencies [Windows]
if: matrix.os == 'windows-latest'
shell: bash
run: |
${VCPKG_INSTALLATION_ROOT}/vcpkg.exe install eigen3:x64-windows
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake [Ubuntu/macOS]
if: contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
- name: Configure CMake [Windows]
if: contains(matrix.os, 'windows-latest')
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -A x64 -DBUILD_TESTING:BOOL=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config ${{matrix.build_type}}
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
run: ctest -C ${{matrix.build_type}} -VV