-
Notifications
You must be signed in to change notification settings - Fork 1
166 lines (138 loc) · 5.32 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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Continuous Integration
on:
push:
paths-ignore:
- 'doc/**'
- '**.md'
pull_request:
schedule:
- cron: '0 0 * * FRI'
workflow_dispatch:
env:
CMAKE_CCACHE_LAUNCHER: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
jobs:
maybe_skip:
runs-on: ubuntu-latest
outputs:
should_skip: ${{steps.skip_check.outputs.should_skip}}
steps:
- uses: fkirc/skip-duplicate-actions@v5
id: skip_check
with:
cancel_others: 'true'
build:
name: build (${{matrix.os}}, ${{matrix.robotology.yarp}}, ${{matrix.compiler.cc}})
runs-on: ${{matrix.os}}
needs: maybe_skip
if: ${{needs.maybe_skip.outputs.should_skip != 'true'}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
robotology:
- { yarp: yarp-3.7, cmake: 3.16.x }
- { yarp: yarp-3.8, cmake: 3.16.x }
- { yarp: master, cmake: 3.16.x }
compiler:
- { cc: gcc, cxx: g++ }
- { cc: clang, cxx: clang++ }
experimental:
- ${{github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}}
exclude:
- { experimental: false, robotology: { yarp: master } }
steps:
- name: Check out openrave-yarp-plugins
uses: actions/checkout@v3
- name: Check out YCM
uses: actions/checkout@v3
with:
repository: robotology/ycm
path: .deps/ycm
- name: Check out YARP
uses: actions/checkout@v3
with:
repository: robotology/yarp
ref: ${{matrix.robotology.yarp}}
path: .deps/yarp
- name: Check out RapidJSON
uses: actions/checkout@v3
with:
repository: Tencent/rapidjson
path: .deps/rapidjson
- name: Check out OpenRAVE
uses: actions/checkout@v3
with:
repository: rdiankov/openrave
path: .deps/openrave
- name: Check out asrob-uc3m/yarp-devices
uses: actions/checkout@v3
with:
repository: asrob-uc3m/yarp-devices
path: .deps/yarp-devices
- name: Check out roboticslab-uc3m/vision
uses: actions/checkout@v3
with:
repository: roboticslab-uc3m/vision
path: .deps/vision
- name: Check out roboticslab-uc3m/kinematics-dynamics
uses: actions/checkout@v3
with:
repository: roboticslab-uc3m/kinematics-dynamics
path: .deps/kinematics-dynamics
- name: Install dependencies via apt
run: sudo apt-get update && sudo apt-get install -qq ccache libboost-regex-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-iostreams-dev libboost-date-time-dev libxml2-dev libpcl-dev swig
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: ${{matrix.robotology.cmake}}
- name: Set up Ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{matrix.os}}-${{matrix.robotology.yarp}}-${{matrix.compiler.cc}}
- name: Set environment variables
run: |
echo "CC=${{matrix.compiler.cc}}" >> $GITHUB_ENV
echo "CXX=${{matrix.compiler.cxx}}" >> $GITHUB_ENV
- name: Build YCM
run: |
cmake -S .deps/ycm -B .deps/ycm/build
cmake --build .deps/ycm/build
sudo cmake --install .deps/ycm/build
- name: Build YARP
run: |
cmake -S .deps/yarp -B .deps/yarp/build $CMAKE_CCACHE_LAUNCHER -DSKIP_ACE=ON -DYARP_DISABLE_VERSION_SOURCE=ON
cmake --build .deps/yarp/build
sudo cmake --install .deps/yarp/build
- name: Build RapidJSON
run: |
cmake -S .deps/rapidjson -B .deps/rapidjson/build $CMAKE_CCACHE_LAUNCHER -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF
cmake --build .deps/rapidjson/build
sudo cmake --install .deps/rapidjson/build
- name: Build OpenRAVE
run: |
CFLAGS=-w CXXFLAGS=-w cmake -S .deps/openrave -B .deps/openrave/build $CMAKE_CCACHE_LAUNCHER -DOPT_VIDEORECORDING=OFF -DOPT_PLUGINS=OFF -DOPT_PYTHON=OFF -DOPT_PYTHON3=OFF -DOPT_COLLADA=OFF -DOPT_CBINDINGS=OFF -DOPT_MSGPACK=OFF
cmake --build .deps/openrave/build
sudo cmake --install .deps/openrave/build
- name: Build asrob-uc3m/yarp-devices
run: |
cmake -S .deps/yarp-devices -B .deps/yarp-devices/build $CMAKE_CCACHE_LAUNCHER
cmake --build .deps/yarp-devices/build
sudo cmake --install .deps/yarp-devices/build
- name: Build roboticslab-uc3m/vision
run: |
cmake -S .deps/vision -B .deps/vision/build $CMAKE_CCACHE_LAUNCHER -DDOWNLOAD_MODELS=OFF
cmake --build .deps/vision/build
sudo cmake --install .deps/vision/build
- name: Build roboticslab-uc3m/kinematics-dynamics
run: |
cmake -S .deps/kinematics-dynamics -B .deps/kinematics-dynamics/build $CMAKE_CCACHE_LAUNCHER
cmake --build .deps/kinematics-dynamics/build
sudo cmake --install .deps/kinematics-dynamics/build
- name: Configure openrave-yarp-plugins
run: cmake -S . -B build $CMAKE_CCACHE_LAUNCHER -DCREATE_BINDINGS_PYTHON=ON -DENABLE_examples=ON
- name: Compile openrave-yarp-plugins
run: cmake --build build
- name: Install openrave-yarp-plugins
run: sudo cmake --install build && sudo ldconfig
- name: Uninstall openrave-yarp-plugins
run: sudo cmake --build build --target uninstall