-
Notifications
You must be signed in to change notification settings - Fork 8
106 lines (102 loc) · 4.35 KB
/
cpp.yml
File metadata and controls
106 lines (102 loc) · 4.35 KB
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
name: C++
on:
push:
branches: [ main, devel ]
pull_request:
branches: [ main, devel ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ]
steps:
- uses: actions/checkout@v4
- name: Update submodules
run: git submodule update --init --recursive
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev \
libglfw3-dev libcairo2-dev libtbb-dev libasio-dev libboost-all-dev \
libgsl-dev libeigen3-dev libtbb-dev libopencv-dev libyaml-cpp-dev \
libncurses-dev libevdev-dev libmodbus-dev libpcl-dev libglm-dev
# - name: Install cyclonedds
# run: |
# git clone -b 0.9.1 https://github.com/eclipse-cyclonedds/cyclonedds.git
# cd cyclonedds && mkdir build && cd build
# cmake -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DENABLE_SHM=NO ..
# make -j && sudo make install
# - name: Install iceoryx
# run: |
# sudo apt-get install -y libacl1-dev libncurses5-dev pkg-config
# git clone -b v2.0.3 https://github.com/eclipse-iceoryx/iceoryx.git
# cd iceoryx
# cmake -Bbuild -Hiceoryx_meta -DCMAKE_PREFIX_PATH=$(pwd)/build/dependencies/
# cmake --build build && sudo cmake --build build --target install
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake (ubuntu-22.04, 24.04)
if: ${{ matrix.os != 'ubuntu-20.04' }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Configure CMake (ubuntu-20.04)
if: ${{ matrix.os == 'ubuntu-20.04' }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_VISUALIZATION=OFF
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
test:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ]
steps:
# - name: Install cyclonedds
# run: |
# git clone -b 0.9.1 https://github.com/eclipse-cyclonedds/cyclonedds.git
# cd cyclonedds && mkdir build && cd build
# cmake -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DENABLE_SHM=NO ..
# make -j && sudo make install
# - name: Install iceoryx
# run: |
# sudo apt-get install -y libacl1-dev libncurses5-dev pkg-config
# git clone -b v2.0.3 https://github.com/eclipse-iceoryx/iceoryx.git
# cd iceoryx
# cmake -Bbuild -Hiceoryx_meta -DCMAKE_PREFIX_PATH=$(pwd)/build/dependencies/
# cmake --build build && sudo cmake --build build --target install
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev \
libglfw3-dev libcairo2-dev libtbb-dev libasio-dev libboost-all-dev \
libgsl-dev libeigen3-dev libtbb-dev libopencv-dev libyaml-cpp-dev \
libncurses-dev libevdev-dev libmodbus-dev libpcl-dev libglm-dev
- name: Update submodules
run: git submodule update --init --recursive
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake (ubuntu-22.04, 24.04)
if: ${{ matrix.os != 'ubuntu-20.04' }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_TESTING=ON
- name: Configure CMake (ubuntu-20.04)
if: ${{ matrix.os == 'ubuntu-20.04' }}
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_TESTING=ON -DENABLE_VISUALIZATION=OFF
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
run: ctest