-
Notifications
You must be signed in to change notification settings - Fork 9
67 lines (58 loc) · 2.01 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: C++ CI Workflow
on:
push:
pull_request:
branches:
- main
jobs:
build:
name: '[${{ matrix.os }}@${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
matrix:
build_type: [Release]
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- 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')
shell: bash -l {0}
run: |
sudo apt-get update
sudo apt install -y cmake libeigen3-dev libmlpack-dev libopencv-dev libpcl-dev libtclap-dev libconfig++-dev
- name: Dependencies (from source) [Ubuntu]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
# bayes-filters-lib
cd ${GITHUB_WORKSPACE}
git clone https://github.com/robotology/bayes-filters-lib
cd bayes-filters-lib
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE} ..
cmake --build . --config ${{ matrix.build_type }} --target install
# nanoflann
cd ${GITHUB_WORKSPACE}
git clone https://github.com/jlblancoc/nanoflann
cd nanoflann
git checkout 05d9c35d175fbcedd9f1f854ab49d04ae0bc5dbc
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE} -DNANOFLANN_BUILD_EXAMPLES:BOOL=OFF -DNANOFLANN_BUILD_TESTS:BOOL=OFF ..
cmake --build . --config ${{ matrix.build_type }} --target install
- name: Configure CMake [Ubuntu]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ..
- name: Build
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{matrix.build_type}}