-
Notifications
You must be signed in to change notification settings - Fork 321
56 lines (51 loc) · 1.87 KB
/
cpp.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
name: C++ API
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
BUILD_TYPE: Release
jobs:
cpp_api:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04, windows-2022, macos-14]
steps:
- uses: actions/checkout@v3
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: "3.25.x"
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/cpp/kiss_icp
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# As the previous job will always install the dependencies from cmake, and this is guaranteed to
# work, we also want to support dev sandboxes where the main dependencies are already
# pre-installed in the system. For now, we only support dev machines under a GNU/Linux
# environmnets. If you are reading this and need the same functionallity in Windows/macOS please
# open a ticket.
cpp_api_dev:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.apt/cache
key: ${{ runner.os }}-apt-${{ hashFiles('**/ubuntu_dependencies.yml') }}
restore-keys: |
${{ runner.os }}-apt-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake git libeigen3-dev libtbb-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/cpp/kiss_icp
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}