-
Notifications
You must be signed in to change notification settings - Fork 227
257 lines (257 loc) · 7.91 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build-macos:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-12
env:
CCACHE_COMPRESS: true
CCACHE_MAXSIZE: 500M
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Tap
run: brew tap roboticslibrary/rl
- name: Install dependencies
run: >
brew install
boost
bullet
ccache
cmake
coin
eigen
fcl
ninja
nlopt
ode
pqp
solid
soqt
- name: Update environment variables
run: |
echo "CCACHE_BASEDIR=${{ runner.workspace }}" >> $GITHUB_ENV
echo "CCACHE_DIR=${{ runner.workspace }}/.ccache" >> $GITHUB_ENV
- name: Cache compiler
uses: actions/cache@v3
with:
path: ${{ runner.workspace }}/.ccache
key: ${{ matrix.os }}-ccache-${{ github.sha }}
restore-keys: ${{ matrix.os }}-ccache-
- name: Configure CMake
run: cmake -GNinja -DCMAKE_BUILD_TYPE=Release -S"${{ github.workspace }}" -B"${{ runner.workspace }}/rl-build"
- name: Build
working-directory: ${{ runner.workspace }}/rl-build
run: cmake --build .
- name: Test
working-directory: ${{ runner.workspace }}/rl-build
run: ctest --output-on-failure
- name: Create archive
working-directory: ${{ runner.workspace }}/rl-build
run: cpack -G TXZ
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: ${{ runner.workspace }}/rl-build/rl-*.tar.xz
build-msvc:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2019
- windows-2022
qt:
- qt5
- qt6
include:
- os: windows-2019
toolchain: 14.2
- os: windows-2022
toolchain: 14.3
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Install dependencies
working-directory: ${{ runner.workspace }}
run: |
curl -L https://github.com/roboticslibrary/rl-3rdparty/releases/download/latest/rl-3rdparty-msvc-${{ matrix.toolchain }}-x64-${{ matrix.qt }}.7z -o rl-3rdparty.7z
7z x rl-3rdparty.7z -orl-3rdparty-install
Write-Output "${{ runner.workspace }}\rl-3rdparty-install\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: Configure CMake
run: cmake -GNinja -DCMAKE_BUILD_TYPE=Release -S"${{ github.workspace }}" -B"${{ runner.workspace }}/rl-build"
- name: Build
working-directory: ${{ runner.workspace }}/rl-build
run: cmake --build .
- name: Test
working-directory: ${{ runner.workspace }}/rl-build
run: ctest --output-on-failure
- name: Create archive
working-directory: ${{ runner.workspace }}/rl-build
run: cpack -G 7Z
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-msvc-${{ matrix.toolchain }}-${{ matrix.qt }}
path: ${{ runner.workspace }}/rl-build/rl-*.7z
build-msys2:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2022
sys:
- ucrt64
env:
CCACHE_COMPRESS: true
CCACHE_MAXSIZE: 500M
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
pacboy: >-
boost:p
bullet:p
ccache:p
cmake:p
coin:p
eigen3:p
libxml2:p
libxslt:p
ninja:p
nlopt:p
ode:p
pqp:p
solid3:p
soqt:p
toolchain:p
update: true
- name: Update environment variables
run: |
echo "CCACHE_BASEDIR=${{ runner.workspace }}" >> $GITHUB_ENV
echo "CCACHE_DIR=${{ runner.workspace }}/.ccache" >> $GITHUB_ENV
- name: Cache compiler
uses: actions/cache@v3
with:
path: ${{ runner.workspace }}/.ccache
key: ${{ matrix.os }}-msys2-${{ matrix.sys }}-ccache-${{ github.sha }}
restore-keys: ${{ matrix.os }}-msys2-${{ matrix.sys }}-ccache-
- name: Configure CMake
run: cmake -GNinja -DCMAKE_BUILD_TYPE=Release -S"${{ github.workspace }}" -B"${{ runner.workspace }}/rl-build"
- name: Build
working-directory: ${{ runner.workspace }}/rl-build
run: cmake --build .
- name: Test
working-directory: ${{ runner.workspace }}/rl-build
run: ctest --output-on-failure
- name: Create archive
working-directory: ${{ runner.workspace }}/rl-build
run: cpack -G TXZ
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-msys2-${{ matrix.sys }}
path: ${{ runner.workspace }}/rl-build/rl-*.tar.xz
build-ubuntu:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
compiler:
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
env:
CC: ${{ matrix.compiler.cc }}
CCACHE_COMPRESS: true
CCACHE_MAXSIZE: 500M
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CXX: ${{ matrix.compiler.cxx }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up PPA
run: |
sudo apt-get install -y software-properties-common
sudo apt-add-repository -y -u ppa:roblib/ppa
- name: Install dependencies
run: >
sudo apt-get install -y
build-essential
ccache
clang
cmake
libboost-dev
libbullet-dev
libcomedi-dev
libdc1394-dev
libeigen3-dev
libfcl-dev
libnlopt-dev
libode-dev
libpqp-dev
libsimage-dev
libsolid3d-dev
libsoqt-dev
libxml2-dev
libxslt1-dev
ninja-build
- name: Update environment variables
run: |
echo "CCACHE_BASEDIR=${{ runner.workspace }}" >> $GITHUB_ENV
echo "CCACHE_DIR=${{ runner.workspace }}/.ccache" >> $GITHUB_ENV
- name: Cache compiler
uses: actions/cache@v3
with:
path: ${{ runner.workspace }}/.ccache
key: ${{ matrix.os }}-${{ matrix.compiler.cc }}-ccache-${{ github.sha }}
restore-keys: ${{ matrix.os }}-${{ matrix.compiler.cc }}-ccache-
- name: Configure CMake
run: cmake -GNinja -DCMAKE_BUILD_TYPE=Release -S"${{ github.workspace }}" -B"${{ runner.workspace }}/rl-build"
- name: Build
working-directory: ${{ runner.workspace }}/rl-build
run: cmake --build .
- name: Test
working-directory: ${{ runner.workspace }}/rl-build
run: ctest --output-on-failure
- name: Create archive
working-directory: ${{ runner.workspace }}/rl-build
run: cpack -G TXZ
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.compiler.cc }}
path: ${{ runner.workspace }}/rl-build/rl-*.tar.xz