-
Notifications
You must be signed in to change notification settings - Fork 47
109 lines (91 loc) · 3.05 KB
/
build-linux.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
# Based on GTSAM file (by @ProfFan)
name: CI Linux
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.name }} ${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
env:
CTEST_OUTPUT_ON_FAILURE: ON
CTEST_PARALLEL_LEVEL: 1
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
VERBOSE: 1 # to show all cmake scripts debug info
strategy:
fail-fast: false
matrix:
# Github Actions requires a single row to be added to the build matrix.
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name: [
ubuntu-20.04-clang-ppa-mrpt,
ubuntu-20.04-gcc-ppa-mrpt,
ubuntu-22.04-gcc-ppa-mrpt,
ubuntu-22.04-clang-ppa-mrpt,
]
build_type: [ Release ]
include:
- name: ubuntu-20.04-clang-ppa-mrpt
os: ubuntu-20.04
compiler: clang
install_mrpt_ppa: ON
- name: ubuntu-20.04-gcc-ppa-mrpt
os: ubuntu-20.04
compiler: gcc
install_mrpt_ppa: ON
- name: ubuntu-22.04-gcc-ppa-mrpt
os: ubuntu-22.04
compiler: gcc
install_mrpt_ppa: ON
- name: ubuntu-22.04-clang-ppa-mrpt
os: ubuntu-22.04
compiler: clang
install_mrpt_ppa: ON
steps:
- name: Checkout
uses: actions/checkout@master
- name: Git submodule
run: |
git submodule sync
git submodule update --init --recursive
- name: Install Dependencies
run: |
# See bug/issue: https://github.com/orgs/community/discussions/47863
sudo apt-mark hold grub-efi-amd64-signed
sudo apt-get -y update
sudo apt-get -y upgrade
if [ "${{ matrix.install_mrpt_ppa }}" = "ON" ]; then
sudo apt install software-properties-common -yq
sudo add-apt-repository ppa:joseluisblancoc/mrpt -y
fi
sudo apt install -y \
cmake build-essential cmake \
libbox2d-dev \
libmrpt-opengl-dev libmrpt-obs-dev libmrpt-maps-dev libmrpt-tclap-dev \
libmrpt-topography-dev \
libmrpt-gui-dev libmrpt-tfest-dev \
protobuf-compiler \
libzmq3-dev \
pybind11-dev \
libprotobuf-dev \
libpython3-dev \
python3-pip \
python3-virtualenv \
python3-protobuf
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++ g++
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
else
sudo apt-get install -y clang g++-multilib
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
- name: CMake configure
run: |
cmake -DCMAKE_VERBOSE_MAKEFILE=ON \
-H. -Bbuild
- name: Build
run: |
make -C build
- name: Run tests
run: |
ctest --verbose --test-dir build