Skip to content

Commit

Permalink
Use Conan instead of Mason to install code dependencies (Project-OSRM…
Browse files Browse the repository at this point in the history
…#6284)

* Use Conan instead of Mason to install code dependencies
  • Loading branch information
SiarheiFedartsou authored and mattwigway committed Jul 20, 2023
1 parent 1b9cece commit 80dbfce
Show file tree
Hide file tree
Showing 4 changed files with 1,138 additions and 144 deletions.
83 changes: 46 additions & 37 deletions .github/workflows/osrm-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,24 @@ jobs:
CUCUMBER_TIMEOUT: 60000
ENABLE_CLANG_TIDY: ON

- name: mason-linux-debug-asan
- name: conan-linux-debug-asan
continue-on-error: false
node: 12
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
ENABLE_MASON: ON
ENABLE_CONAN: ON
ENABLE_SANITIZER: ON

- name: mason-linux-release
- name: conan-linux-release
continue-on-error: false
node: 12
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
ENABLE_MASON: ON
ENABLE_CONAN: ON

- name: gcc-11-release
continue-on-error: false
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
CCOMPILER: gcc-7
CXXCOMPILER: g++-7

- name: mason-osx-release-node-12
- name: conan-osx-release-node-12
build_node_package: true
continue-on-error: false
node: 12
Expand All @@ -184,9 +184,9 @@ jobs:
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON

- name: mason-osx-release-node-14
- name: conan-osx-release-node-14
build_node_package: true
continue-on-error: false
node: 14
Expand All @@ -197,9 +197,9 @@ jobs:
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON

- name: mason-osx-release-node-16
- name: conan-osx-release-node-16
build_node_package: true
continue-on-error: false
node: 16
Expand All @@ -210,7 +210,7 @@ jobs:
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON

- name: gcc-7-release-shared
continue-on-error: false
Expand All @@ -222,74 +222,74 @@ jobs:
CCOMPILER: gcc-7
CXXCOMPILER: g++-7

- name: node-12-mason-linux-release
- name: node-12-conan-linux-release
build_node_package: true
continue-on-error: false
node: 12
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON

- name: node-12-mason-linux-debug
- name: node-12-conan-linux-debug
build_node_package: true
continue-on-error: false
node: 12
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON

- name: node-14-mason-linux-release
- name: node-14-conan-linux-release
build_node_package: true
continue-on-error: false
node: 14
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON

- name: node-14-mason-linux-debug
- name: node-14-conan-linux-debug
build_node_package: true
continue-on-error: false
node: 14
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON


- name: node-16-mason-linux-release
- name: node-16-conan-linux-release
build_node_package: true
continue-on-error: false
node: 16
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON

- name: node-16-mason-linux-debug
- name: node-16-conan-linux-debug
build_node_package: true
continue-on-error: false
node: 16
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON

- name: mason-osx-release-node-latest
- name: conan-osx-release-node-latest
build_node_package: true
continue-on-error: true
# TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257
Expand All @@ -300,9 +300,9 @@ jobs:
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON

- name: node-latest-mason-linux-release
- name: node-latest-conan-linux-release
build_node_package: true
continue-on-error: true
# TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257
Expand All @@ -311,10 +311,10 @@ jobs:
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON

- name: node-latest-mason-linux-debug
- name: node-latest-conan-linux-debug
build_node_package: true
continue-on-error: true
# TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257
Expand All @@ -323,10 +323,10 @@ jobs:
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON

- name: mason-osx-release-node-lts
- name: conan-osx-release-node-lts
build_node_package: true
continue-on-error: true
node: "lts/*"
Expand All @@ -336,28 +336,28 @@ jobs:
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON

- name: node-lts-mason-linux-release
- name: node-lts-conan-linux-release
build_node_package: true
continue-on-error: true
node: "lts/*"
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON

- name: node-lts-mason-linux-debug
- name: node-lts-conan-linux-debug
build_node_package: true
continue-on-error: true
node: "lts/*"
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_MASON: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON


Expand All @@ -378,7 +378,7 @@ jobs:
ENABLE_CLANG_TIDY: ${{ matrix.ENABLE_CLANG_TIDY }}
ENABLE_COVERAGE: ${{ matrix.ENABLE_COVERAGE }}
ENABLE_GLIBC_WORKAROUND: ${{ matrix.ENABLE_GLIBC_WORKAROUND }}
ENABLE_MASON: ${{ matrix.ENABLE_MASON }}
ENABLE_CONAN: ${{ matrix.ENABLE_CONAN }}
ENABLE_SANITIZER: ${{ matrix.ENABLE_SANITIZER }}
NODE_PACKAGE_TESTS_ONLY: ${{ matrix.NODE_PACKAGE_TESTS_ONLY }}
TARGET_ARCH: ${{ matrix.TARGET_ARCH }}
Expand All @@ -403,6 +403,13 @@ jobs:
key: ccache-${{ matrix.name }}-${{ github.sha }}
restore-keys: |
ccache-${{ matrix.name }}-
- name: Enable Conan cache
uses: actions/cache@v2
with:
path: ~/.conan
key: conan-${{ matrix.name }}-${{ github.sha }}
restore-keys: |
conan-${{ matrix.name }}-
- name: Enable test cache
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -440,6 +447,8 @@ jobs:
- name: Install dev dependencies
run: |
python3 -m pip install conan==1.50.0
# CMake
mkdir -p ${CMAKE_DIR}
wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR}
Expand Down Expand Up @@ -469,7 +478,7 @@ jobs:
fi
# Linux dev packages
if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_MASON}" != "ON" ]; then
if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_CONAN}" != "ON" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install -y libbz2-dev libxml2-dev libzip-dev liblua5.2-dev libtbb-dev libboost-all-dev
Expand Down Expand Up @@ -500,7 +509,7 @@ jobs:
echo "Using ${JOBS} jobs"
pushd ${OSRM_BUILD_DIR}
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
-DENABLE_CONAN=${ENABLE_CONAN:-OFF} \
-DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF} \
-DENABLE_CLANG_TIDY=${ENABLE_CLANG_TIDY:-OFF} \
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} \
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
- Misc:
- FIXED: Fix bug with reading Set values from Lua scripts. [#6285](https://github.com/Project-OSRM/osrm-backend/pull/6285)
- Build:
- 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)
- CHANGED: Use Conan instead of Mason to install code dependencies. [#6284](https://github.com/Project-OSRM/osrm-backend/pull/6284)
- CHANGED: Migrate to C++17. Update sol2 to 3.3.0. [#6279](https://github.com/Project-OSRM/osrm-backend/pull/6279)
- CHANGED: Update macOS CI image to macos-11. [#6286](https://github.com/Project-OSRM/osrm-backend/pull/6286)
- CHANGED: Enable even more clang-tidy checks. [#6273](https://github.com/Project-OSRM/osrm-backend/pull/6273)
- CHANGED: Configure CMake to not build flatbuffers tests and samples. [#6274](https://github.com/Project-OSRM/osrm-backend/pull/6274)
Expand Down
Loading

0 comments on commit 80dbfce

Please sign in to comment.