Skip to content

Commit 589becb

Browse files
Use Conan instead of Mason to install code dependencies (#6284)
* Use Conan instead of Mason to install code dependencies
1 parent 4e8ee28 commit 589becb

File tree

4 files changed

+1138
-144
lines changed

4 files changed

+1138
-144
lines changed

.github/workflows/osrm-backend.yml

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,24 @@ jobs:
9595
CUCUMBER_TIMEOUT: 60000
9696
ENABLE_CLANG_TIDY: ON
9797

98-
- name: mason-linux-debug-asan
98+
- name: conan-linux-debug-asan
9999
continue-on-error: false
100100
node: 12
101101
runs-on: ubuntu-20.04
102102
BUILD_TOOLS: ON
103103
BUILD_TYPE: Release
104104
CLANG_VERSION: 5.0.0
105-
ENABLE_MASON: ON
105+
ENABLE_CONAN: ON
106106
ENABLE_SANITIZER: ON
107107

108-
- name: mason-linux-release
108+
- name: conan-linux-release
109109
continue-on-error: false
110110
node: 12
111111
runs-on: ubuntu-20.04
112112
BUILD_TOOLS: ON
113113
BUILD_TYPE: Release
114114
CLANG_VERSION: 5.0.0
115-
ENABLE_MASON: ON
115+
ENABLE_CONAN: ON
116116

117117
- name: gcc-11-release
118118
continue-on-error: false
@@ -173,7 +173,7 @@ jobs:
173173
CCOMPILER: gcc-7
174174
CXXCOMPILER: g++-7
175175

176-
- name: mason-osx-release-node-12
176+
- name: conan-osx-release-node-12
177177
build_node_package: true
178178
continue-on-error: false
179179
node: 12
@@ -184,9 +184,9 @@ jobs:
184184
CXXCOMPILER: clang++
185185
CUCUMBER_TIMEOUT: 60000
186186
ENABLE_ASSERTIONS: ON
187-
ENABLE_MASON: ON
187+
ENABLE_CONAN: ON
188188

189-
- name: mason-osx-release-node-14
189+
- name: conan-osx-release-node-14
190190
build_node_package: true
191191
continue-on-error: false
192192
node: 14
@@ -197,9 +197,9 @@ jobs:
197197
CXXCOMPILER: clang++
198198
CUCUMBER_TIMEOUT: 60000
199199
ENABLE_ASSERTIONS: ON
200-
ENABLE_MASON: ON
200+
ENABLE_CONAN: ON
201201

202-
- name: mason-osx-release-node-16
202+
- name: conan-osx-release-node-16
203203
build_node_package: true
204204
continue-on-error: false
205205
node: 16
@@ -210,7 +210,7 @@ jobs:
210210
CXXCOMPILER: clang++
211211
CUCUMBER_TIMEOUT: 60000
212212
ENABLE_ASSERTIONS: ON
213-
ENABLE_MASON: ON
213+
ENABLE_CONAN: ON
214214

215215
- name: gcc-7-release-shared
216216
continue-on-error: false
@@ -222,74 +222,74 @@ jobs:
222222
CCOMPILER: gcc-7
223223
CXXCOMPILER: g++-7
224224

225-
- name: node-12-mason-linux-release
225+
- name: node-12-conan-linux-release
226226
build_node_package: true
227227
continue-on-error: false
228228
node: 12
229229
runs-on: ubuntu-20.04
230230
BUILD_TYPE: Release
231231
CLANG_VERSION: 5.0.0
232232
ENABLE_GLIBC_WORKAROUND: ON
233-
ENABLE_MASON: ON
233+
ENABLE_CONAN: ON
234234
NODE_PACKAGE_TESTS_ONLY: ON
235235

236-
- name: node-12-mason-linux-debug
236+
- name: node-12-conan-linux-debug
237237
build_node_package: true
238238
continue-on-error: false
239239
node: 12
240240
runs-on: ubuntu-20.04
241241
BUILD_TYPE: Debug
242242
CLANG_VERSION: 5.0.0
243243
ENABLE_GLIBC_WORKAROUND: ON
244-
ENABLE_MASON: ON
244+
ENABLE_CONAN: ON
245245
NODE_PACKAGE_TESTS_ONLY: ON
246246

247-
- name: node-14-mason-linux-release
247+
- name: node-14-conan-linux-release
248248
build_node_package: true
249249
continue-on-error: false
250250
node: 14
251251
runs-on: ubuntu-20.04
252252
BUILD_TYPE: Release
253253
CLANG_VERSION: 5.0.0
254254
ENABLE_GLIBC_WORKAROUND: ON
255-
ENABLE_MASON: ON
255+
ENABLE_CONAN: ON
256256
NODE_PACKAGE_TESTS_ONLY: ON
257257

258-
- name: node-14-mason-linux-debug
258+
- name: node-14-conan-linux-debug
259259
build_node_package: true
260260
continue-on-error: false
261261
node: 14
262262
runs-on: ubuntu-20.04
263263
BUILD_TYPE: Debug
264264
CLANG_VERSION: 5.0.0
265265
ENABLE_GLIBC_WORKAROUND: ON
266-
ENABLE_MASON: ON
266+
ENABLE_CONAN: ON
267267
NODE_PACKAGE_TESTS_ONLY: ON
268268

269269

270-
- name: node-16-mason-linux-release
270+
- name: node-16-conan-linux-release
271271
build_node_package: true
272272
continue-on-error: false
273273
node: 16
274274
runs-on: ubuntu-20.04
275275
BUILD_TYPE: Release
276276
CLANG_VERSION: 5.0.0
277277
ENABLE_GLIBC_WORKAROUND: ON
278-
ENABLE_MASON: ON
278+
ENABLE_CONAN: ON
279279
NODE_PACKAGE_TESTS_ONLY: ON
280280

281-
- name: node-16-mason-linux-debug
281+
- name: node-16-conan-linux-debug
282282
build_node_package: true
283283
continue-on-error: false
284284
node: 16
285285
runs-on: ubuntu-20.04
286286
BUILD_TYPE: Debug
287287
CLANG_VERSION: 5.0.0
288288
ENABLE_GLIBC_WORKAROUND: ON
289-
ENABLE_MASON: ON
289+
ENABLE_CONAN: ON
290290
NODE_PACKAGE_TESTS_ONLY: ON
291291

292-
- name: mason-osx-release-node-latest
292+
- name: conan-osx-release-node-latest
293293
build_node_package: true
294294
continue-on-error: true
295295
# TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257
@@ -300,9 +300,9 @@ jobs:
300300
CXXCOMPILER: clang++
301301
CUCUMBER_TIMEOUT: 60000
302302
ENABLE_ASSERTIONS: ON
303-
ENABLE_MASON: ON
303+
ENABLE_CONAN: ON
304304

305-
- name: node-latest-mason-linux-release
305+
- name: node-latest-conan-linux-release
306306
build_node_package: true
307307
continue-on-error: true
308308
# TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257
@@ -311,10 +311,10 @@ jobs:
311311
BUILD_TYPE: Release
312312
CLANG_VERSION: 5.0.0
313313
ENABLE_GLIBC_WORKAROUND: ON
314-
ENABLE_MASON: ON
314+
ENABLE_CONAN: ON
315315
NODE_PACKAGE_TESTS_ONLY: ON
316316

317-
- name: node-latest-mason-linux-debug
317+
- name: node-latest-conan-linux-debug
318318
build_node_package: true
319319
continue-on-error: true
320320
# TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257
@@ -323,10 +323,10 @@ jobs:
323323
BUILD_TYPE: Debug
324324
CLANG_VERSION: 5.0.0
325325
ENABLE_GLIBC_WORKAROUND: ON
326-
ENABLE_MASON: ON
326+
ENABLE_CONAN: ON
327327
NODE_PACKAGE_TESTS_ONLY: ON
328328

329-
- name: mason-osx-release-node-lts
329+
- name: conan-osx-release-node-lts
330330
build_node_package: true
331331
continue-on-error: true
332332
node: "lts/*"
@@ -336,28 +336,28 @@ jobs:
336336
CXXCOMPILER: clang++
337337
CUCUMBER_TIMEOUT: 60000
338338
ENABLE_ASSERTIONS: ON
339-
ENABLE_MASON: ON
339+
ENABLE_CONAN: ON
340340

341-
- name: node-lts-mason-linux-release
341+
- name: node-lts-conan-linux-release
342342
build_node_package: true
343343
continue-on-error: true
344344
node: "lts/*"
345345
runs-on: ubuntu-20.04
346346
BUILD_TYPE: Release
347347
CLANG_VERSION: 5.0.0
348348
ENABLE_GLIBC_WORKAROUND: ON
349-
ENABLE_MASON: ON
349+
ENABLE_CONAN: ON
350350
NODE_PACKAGE_TESTS_ONLY: ON
351351

352-
- name: node-lts-mason-linux-debug
352+
- name: node-lts-conan-linux-debug
353353
build_node_package: true
354354
continue-on-error: true
355355
node: "lts/*"
356356
runs-on: ubuntu-20.04
357357
BUILD_TYPE: Debug
358358
CLANG_VERSION: 5.0.0
359359
ENABLE_GLIBC_WORKAROUND: ON
360-
ENABLE_MASON: ON
360+
ENABLE_CONAN: ON
361361
NODE_PACKAGE_TESTS_ONLY: ON
362362

363363

@@ -378,7 +378,7 @@ jobs:
378378
ENABLE_CLANG_TIDY: ${{ matrix.ENABLE_CLANG_TIDY }}
379379
ENABLE_COVERAGE: ${{ matrix.ENABLE_COVERAGE }}
380380
ENABLE_GLIBC_WORKAROUND: ${{ matrix.ENABLE_GLIBC_WORKAROUND }}
381-
ENABLE_MASON: ${{ matrix.ENABLE_MASON }}
381+
ENABLE_CONAN: ${{ matrix.ENABLE_CONAN }}
382382
ENABLE_SANITIZER: ${{ matrix.ENABLE_SANITIZER }}
383383
NODE_PACKAGE_TESTS_ONLY: ${{ matrix.NODE_PACKAGE_TESTS_ONLY }}
384384
TARGET_ARCH: ${{ matrix.TARGET_ARCH }}
@@ -403,6 +403,13 @@ jobs:
403403
key: ccache-${{ matrix.name }}-${{ github.sha }}
404404
restore-keys: |
405405
ccache-${{ matrix.name }}-
406+
- name: Enable Conan cache
407+
uses: actions/cache@v2
408+
with:
409+
path: ~/.conan
410+
key: conan-${{ matrix.name }}-${{ github.sha }}
411+
restore-keys: |
412+
conan-${{ matrix.name }}-
406413
- name: Enable test cache
407414
uses: actions/cache@v2
408415
with:
@@ -440,6 +447,8 @@ jobs:
440447
441448
- name: Install dev dependencies
442449
run: |
450+
python3 -m pip install conan==1.50.0
451+
443452
# CMake
444453
mkdir -p ${CMAKE_DIR}
445454
wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR}
@@ -469,7 +478,7 @@ jobs:
469478
fi
470479
471480
# Linux dev packages
472-
if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_MASON}" != "ON" ]; then
481+
if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_CONAN}" != "ON" ]; then
473482
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
474483
sudo apt-get update -y
475484
sudo apt-get install -y libbz2-dev libxml2-dev libzip-dev liblua5.2-dev libtbb-dev libboost-all-dev
@@ -500,7 +509,7 @@ jobs:
500509
echo "Using ${JOBS} jobs"
501510
pushd ${OSRM_BUILD_DIR}
502511
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
503-
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
512+
-DENABLE_CONAN=${ENABLE_CONAN:-OFF} \
504513
-DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF} \
505514
-DENABLE_CLANG_TIDY=${ENABLE_CLANG_TIDY:-OFF} \
506515
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} \

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
- Misc:
66
- FIXED: Fix bug with reading Set values from Lua scripts. [#6285](https://github.com/Project-OSRM/osrm-backend/pull/6285)
77
- Build:
8-
- CHANGED: Migrate to C++17. Update sol2 to 3.3.0. Fix bug with reading Set values from Lua scripts. [#6279](https://github.com/Project-OSRM/osrm-backend/pull/6279)
8+
- CHANGED: Use Conan instead of Mason to install code dependencies. [#6284](https://github.com/Project-OSRM/osrm-backend/pull/6284)
9+
- CHANGED: Migrate to C++17. Update sol2 to 3.3.0. [#6279](https://github.com/Project-OSRM/osrm-backend/pull/6279)
910
- CHANGED: Update macOS CI image to macos-11. [#6286](https://github.com/Project-OSRM/osrm-backend/pull/6286)
1011
- CHANGED: Enable even more clang-tidy checks. [#6273](https://github.com/Project-OSRM/osrm-backend/pull/6273)
1112
- CHANGED: Configure CMake to not build flatbuffers tests and samples. [#6274](https://github.com/Project-OSRM/osrm-backend/pull/6274)

0 commit comments

Comments
 (0)