Use apt-get to install Clang on CI (#6345)

This commit is contained in:
Siarhei Fedartsou 2022-08-30 10:25:53 +02:00 committed by GitHub
parent b4142cf1a2
commit d8b358e810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 29 deletions

View File

@ -138,7 +138,8 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TOOLS: ON BUILD_TOOLS: ON
BUILD_TYPE: Debug BUILD_TYPE: Debug
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
CUCUMBER_TIMEOUT: 60000 CUCUMBER_TIMEOUT: 60000
- name: clang-11.0-debug-clang-tidy - name: clang-11.0-debug-clang-tidy
@ -147,7 +148,8 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TOOLS: ON BUILD_TOOLS: ON
BUILD_TYPE: Debug BUILD_TYPE: Debug
CLANG_VERSION: 11.0.0 CCOMPILER: clang-11
CXXCOMPILER: clang++-11
CUCUMBER_TIMEOUT: 60000 CUCUMBER_TIMEOUT: 60000
ENABLE_CLANG_TIDY: ON ENABLE_CLANG_TIDY: ON
@ -157,7 +159,8 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TOOLS: ON BUILD_TOOLS: ON
BUILD_TYPE: Release BUILD_TYPE: Release
CLANG_VERSION: 11.0.0 CCOMPILER: clang-11
CXXCOMPILER: clang++-11
ENABLE_CONAN: ON ENABLE_CONAN: ON
ENABLE_SANITIZER: ON ENABLE_SANITIZER: ON
@ -167,7 +170,8 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TOOLS: ON BUILD_TOOLS: ON
BUILD_TYPE: Release BUILD_TYPE: Release
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_CONAN: ON ENABLE_CONAN: ON
- name: gcc-11-release - name: gcc-11-release
@ -285,7 +289,8 @@ jobs:
node: 12 node: 12
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Release BUILD_TYPE: Release
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -296,7 +301,8 @@ jobs:
node: 12 node: 12
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Debug BUILD_TYPE: Debug
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -307,7 +313,8 @@ jobs:
node: 14 node: 14
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Release BUILD_TYPE: Release
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -318,7 +325,8 @@ jobs:
node: 14 node: 14
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Debug BUILD_TYPE: Debug
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -330,7 +338,8 @@ jobs:
node: 16 node: 16
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Release BUILD_TYPE: Release
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -341,7 +350,8 @@ jobs:
node: 16 node: 16
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Debug BUILD_TYPE: Debug
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -364,7 +374,8 @@ jobs:
node: latest node: latest
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Release BUILD_TYPE: Release
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -375,7 +386,8 @@ jobs:
node: latest node: latest
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Debug BUILD_TYPE: Debug
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -398,7 +410,8 @@ jobs:
node: "lts/*" node: "lts/*"
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Release BUILD_TYPE: Release
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -409,7 +422,8 @@ jobs:
node: "lts/*" node: "lts/*"
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
BUILD_TYPE: Debug BUILD_TYPE: Debug
CLANG_VERSION: 6.0.0 CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_GLIBC_WORKAROUND: ON ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON NODE_PACKAGE_TESTS_ONLY: ON
@ -423,7 +437,6 @@ jobs:
BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }} BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }}
CCOMPILER: ${{ matrix.CCOMPILER }} CCOMPILER: ${{ matrix.CCOMPILER }}
CFLAGS: ${{ matrix.CFLAGS }} CFLAGS: ${{ matrix.CFLAGS }}
CLANG_VERSION: ${{ matrix.CLANG_VERSION }}
CUCUMBER_TIMEOUT: ${{ matrix.CUCUMBER_TIMEOUT }} CUCUMBER_TIMEOUT: ${{ matrix.CUCUMBER_TIMEOUT }}
CXXCOMPILER: ${{ matrix.CXXCOMPILER }} CXXCOMPILER: ${{ matrix.CXXCOMPILER }}
CXXFLAGS: ${{ matrix.CXXFLAGS }} CXXFLAGS: ${{ matrix.CXXFLAGS }}
@ -515,26 +528,23 @@ jobs:
echo "$(${MASON} prefix ccache ${CCACHE_VERSION})/bin" >> $GITHUB_PATH echo "$(${MASON} prefix ccache ${CCACHE_VERSION})/bin" >> $GITHUB_PATH
# clang # clang
if [[ -n ${CLANG_VERSION} ]]; then if [[ "${CCOMPILER}" == "clang-6.0" ]]; then
echo "CCOMPILER=clang" >> $GITHUB_ENV sudo apt-get update -y && sudo apt-get install clang++-6
echo "CXXCOMPILER=clang++" >> $GITHUB_ENV fi
${MASON} install clang++ ${CLANG_VERSION}
echo "$(${MASON} prefix clang++ ${CLANG_VERSION})/bin" >> $GITHUB_PATH
# we only enable lto for release builds # we only enable lto for release builds
# and therefore don't need to us ld.gold or llvm tools for linking # and therefore don't need to us ld.gold or llvm tools for linking
# for debug builds # for debug builds
if [[ ${BUILD_TYPE} == 'Release' ]]; then if [[ "${CCOMPILER}" == clang-* ]] && [[ ${BUILD_TYPE} == 'Release' ]]; then
${MASON} install binutils 2.27 ${MASON} install binutils 2.27
echo "$(${MASON} prefix binutils 2.27)/bin" >> $GITHUB_PATH echo "$(${MASON} prefix binutils 2.27)/bin" >> $GITHUB_PATH
fi fi
fi
# Linux dev packages # Linux dev packages
if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_CONAN}" != "ON" ]; then if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_CONAN}" != "ON" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y libbz2-dev libxml2-dev libzip-dev liblua5.2-dev libboost-all-dev sudo apt-get install -y libbz2-dev libxml2-dev libzip-dev liblua5.2-dev libboost-all-dev
if [[ -z "${CLANG_VERSION}" ]]; then if [[ "${CCOMPILER}" != clang-* ]]; then
sudo apt-get install -y ${CXXCOMPILER} sudo apt-get install -y ${CXXCOMPILER}
fi fi
if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then

View File

@ -20,6 +20,7 @@
- FIXED: Bug in bicycle profile that caused exceptions if there is a highway=bicycle in the data. [#6296](https://github.com/Project-OSRM/osrm-backend/pull/6296) - FIXED: Bug in bicycle profile that caused exceptions if there is a highway=bicycle in the data. [#6296](https://github.com/Project-OSRM/osrm-backend/pull/6296)
- FIXED: Internal refactoring of identifier types used in data facade [#6044](https://github.com/Project-OSRM/osrm-backend/pull/6044) - FIXED: Internal refactoring of identifier types used in data facade [#6044](https://github.com/Project-OSRM/osrm-backend/pull/6044)
- Build: - Build:
- CHANGED: Use apt-get to install Clang on CI. [#6345](https://github.com/Project-OSRM/osrm-backend/pull/6345)
- CHANGED: Fix TBB in case of Conan + NodeJS build. [#6333](https://github.com/Project-OSRM/osrm-backend/pull/6333) - CHANGED: Fix TBB in case of Conan + NodeJS build. [#6333](https://github.com/Project-OSRM/osrm-backend/pull/6333)
- CHANGED: Migrate to modern TBB version. [#6300](https://github.com/Project-OSRM/osrm-backend/pull/6300) - CHANGED: Migrate to modern TBB version. [#6300](https://github.com/Project-OSRM/osrm-backend/pull/6300)
- CHANGED: Enable performance-move-const-arg clang-tidy check. [#6319](https://github.com/Project-OSRM/osrm-backend/pull/6319) - CHANGED: Enable performance-move-const-arg clang-tidy check. [#6319](https://github.com/Project-OSRM/osrm-backend/pull/6319)