-
Notifications
You must be signed in to change notification settings - Fork 611
134 lines (122 loc) · 4.03 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
134
name: Linux / MacOS - c++
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- test: unit_tests
os: ubuntu-22.04
build_type: RelWithDebInfo
access: row_major
ensure: default_panic
- os: ubuntu-24.04
build_type: RelWithDebInfo
access: col_major
test: unit_tests
ensure: default_panic
- os: ubuntu-24.04
build_type: RelWithDebInfo
access: col_major
test: unit_tests
ensure: default_panic
- os: ubuntu-24.04
build_type: RelWithDebInfo
access: col_major
test: unit_tests
ensure: default_panic
- test: unit_tests
os: macos-13
build_type: RelWithDebInfo
access: col_major
ensure: default_panic
- test: unit_tests
os: macos-14
build_type: RelWithDebInfo
access: col_major
ensure: default_panic
- test: install_test
os: ubuntu-22.04
build_type: RelWithDebInfo
access: col_major
ensure: default_panic
- test: install_test
os: ubuntu-22.04
build_type: RelWithDebInfo
access: col_major
ensure: custom_handler
- test: install_test
os: macos-14
build_type: RelWithDebInfo
access: col_major
ensure: default_panic
- test: install_test
os: macos-14
build_type: RelWithDebInfo
access: col_major
ensure: custom_handler
- test: install_test
os: ubuntu-22.04
build_type: RelWithDebInfo
access: col_major
ensure: default_panic
- test: install_test
os: ubuntu-22.04
build_type: RelWithDebInfo
access: col_major
ensure: custom_handler
- test: install_test
os: macos-14
build_type: RelWithDebInfo
access: col_major
ensure: default_panic
- test: install_test
os: macos-14
build_type: RelWithDebInfo
access: col_major
ensure: custom_handler
fail-fast: false
steps:
- name: Set default value for ROW_MAJOR_DEFAULT to OFF
run: echo "ROW_MAJOR_DEFAULT=OFF" >> $GITHUB_ENV
- name: Update ROW_MAJOR_DEFAULT=ON if condition is met
if: matrix.access == 'row_major'
run: echo "ROW_MAJOR_DEFAULT=ON" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.access }}-${{ matrix.test }}
restore-keys: |
${{ runner.os }}-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.access }}-${{ matrix.test }}
- name: Install dependencies (Linux incl. Ceres)
run: ./scripts/install_ubuntu_deps_incl_ceres.sh
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04'
- name: Install dependencies (Mac OS incl. Ceres)
run: ./scripts/install_osx_deps_incl_ceres.sh
if: matrix.os == 'macos-14' || matrix.os == 'macos-13'
- name: Run tests
run: ./scripts/run_cpp_tests.sh
if: matrix.test == 'unit_tests'
- name: Install test
run: |
echo "Install test"
mkdir build_dir
cd build_dir
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
# Ubuntu builds via Github actions run on 2-core virtual machines
make -j2
sudo make install
cd ..
cd examples
mkdir build_dir
cd build_dir
cmake ..
make
ls -la
if: matrix.test == 'install_test'