From 809db5b9b9bb9cca04cdeee5857a623d8be7a790 Mon Sep 17 00:00:00 2001 From: Yu Shi Date: Tue, 19 Dec 2023 05:34:25 +0000 Subject: [PATCH] upgrade clang to clang-17 --- .ci/setup.sh | 22 +++++++++++++++------- .ci/test.sh | 4 ++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index f7da21286d7d..3bae826d3ce7 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -49,11 +49,16 @@ else # Linux locales-all \ netcat \ unzip \ - zip || exit -1 + zip \ + wget \ + software-properties-common || exit -1 if [[ $COMPILER == "clang" ]]; then - sudo apt-get install --no-install-recommends -y \ - clang \ - libomp-dev + wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc + sudo apt-get update + sudo apt-add-repository deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main + sudo apt-add-repository deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main + sudo apt-get install clang-17 + sudo apt-get install --no-install-recommends -y libomp-dev fi export LANG="en_US.UTF-8" @@ -114,9 +119,12 @@ else # Linux lsb-release \ software-properties-common if [[ $COMPILER == "clang" ]]; then - apt-get install --no-install-recommends -y \ - clang \ - libomp-dev + wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc + sudo apt-get update + sudo apt-add-repository deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main + sudo apt-add-repository deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main + sudo apt-get install clang-17 + sudo apt-get install --no-install-recommends -y libomp-dev fi curl -sL https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" -y diff --git a/.ci/test.sh b/.ci/test.sh index 9ffd48efe452..3cdfe0c110d0 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -4,8 +4,8 @@ if [[ $OS_NAME == "macos" ]] && [[ $COMPILER == "gcc" ]]; then export CXX=g++-11 export CC=gcc-11 elif [[ $OS_NAME == "linux" ]] && [[ $COMPILER == "clang" ]]; then - export CXX=clang++ - export CC=clang + export CXX=clang-17++ + export CC=clang-17 fi if [[ $IN_UBUNTU_BASE_CONTAINER == "true" ]]; then