From f6c8bb387cdf51705d2b5144bb16a6c5fbfaab32 Mon Sep 17 00:00:00 2001 From: Laurynas Biveinis Date: Tue, 19 Sep 2023 21:34:46 +0300 Subject: [PATCH] Add LLVM 17 support to CI --- .circleci/config.yml | 28 +++++++------- .github/workflows/build.yml | 34 ++++++++--------- .github/workflows/old-compilers.yml | 58 ++++++++++++++++++++++++++++- 3 files changed, 87 insertions(+), 33 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 560ca036..84eb60cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,11 +49,11 @@ jobs: curl 'https://apt.llvm.org/llvm-snapshot.gpg.key' \ | sudo apt-key add - echo \ - 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main' \ + 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' \ | sudo tee -a /etc/apt/sources.list sudo apt-get update - sudo NEEDRESTART_MODE=a apt-get install -y clang-15 \ - clang-tidy-15 iwyu + sudo NEEDRESTART_MODE=a apt-get install -y clang-17 \ + clang-tidy-17 iwyu - when: condition: and: @@ -63,8 +63,8 @@ jobs: - run: name: Installing dependencies (LLVM Release) command: | - sudo NEEDRESTART_MODE=a apt-get install -y libomp5-15 \ - llvm-15 lld-15 + sudo NEEDRESTART_MODE=a apt-get install -y libomp5-17 \ + llvm-17 lld-17 - run: name: Create build environment command: mkdir build @@ -83,7 +83,7 @@ jobs: export CXX=g++-$V EXTRA_CMAKE_ARGS=() elif [[ $COMPILER == "clang" ]]; then - V=15 + V=17 export CC=clang-$V export CXX=clang++-$V if [[ $BUILD_TYPE == "Release" ]]; then @@ -177,40 +177,40 @@ workflows: compiler: gcc ubsan: true - build: - name: clang 15 Debug + name: clang 17 Debug build_type: Debug compiler: clang - build: - name: clang 15 Debug with ASan + name: clang 17 Debug with ASan build_type: Debug compiler: clang asan: true - build: - name: clang 15 Debug with TSan + name: clang 17 Debug with TSan build_type: Debug compiler: clang tsan: true - build: - name: clang 15 Debug with UBSan + name: clang 17 Debug with UBSan build_type: Debug compiler: clang ubsan: true - build: - name: clang 15 Release + name: clang 17 Release build_type: Release compiler: clang - build: - name: clang 15 Release with ASan + name: clang 17 Release with ASan build_type: Release compiler: clang asan: true - build: - name: clang 15 Release with TSan + name: clang 17 Release with TSan build_type: Release compiler: clang tsan: true - build: - name: clang 15 Release with UBSan + name: clang 17 Release with UBSan build_type: Release compiler: clang ubsan: true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99ad53d4..7983ab58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -95,59 +95,59 @@ jobs: os: ubuntu-22.04 COMPILER: gcc - - name: clang 16 Release + - name: clang 17 Release os: ubuntu-22.04 BUILD_TYPE: Release COMPILER: clang - - name: clang 16 Release with ASan + - name: clang 17 Release with ASan os: ubuntu-22.04 BUILD_TYPE: Release SANITIZE_ADDRESS: ON COMPILER: clang - - name: clang 16 Release with TSan + - name: clang 17 Release with TSan os: ubuntu-22.04 BUILD_TYPE: Release SANITIZE_THREAD: ON COMPILER: clang - - name: clang 16 Release with UBSan + - name: clang 17 Release with UBSan os: ubuntu-22.04 BUILD_TYPE: Release SANITIZE_UB: ON COMPILER: clang - - name: clang 16 Debug + - name: clang 17 Debug os: ubuntu-22.04 BUILD_TYPE: Debug COMPILER: clang - - name: clang 16 Debug with ASan + - name: clang 17 Debug with ASan os: ubuntu-22.04 BUILD_TYPE: Debug SANITIZE_ADDRESS: ON COMPILER: clang - - name: clang 16 Debug with TSan + - name: clang 17 Debug with TSan os: ubuntu-22.04 BUILD_TYPE: Debug SANITIZE_THREAD: ON COMPILER: clang - - name: clang 16 Debug with UBSan + - name: clang 17 Debug with UBSan os: ubuntu-22.04 BUILD_TYPE: Debug SANITIZE_UB: ON COMPILER: clang - - name: clang 16 Release static analysis + - name: clang 17 Release static analysis os: ubuntu-22.04 BUILD_TYPE: Release COMPILER: clang STATIC_ANALYSIS: ON - - name: clang 16 Debug static analysis + - name: clang 17 Debug static analysis os: ubuntu-22.04 BUILD_TYPE: Debug COMPILER: clang @@ -247,26 +247,26 @@ jobs: run: | curl 'https://apt.llvm.org/llvm-snapshot.gpg.key' \ | sudo apt-key add - - echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' \ + echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' \ | sudo tee -a /etc/apt/sources.list sudo apt-get update - sudo apt-get install -y clang-16 iwyu + sudo apt-get install -y clang-17 iwyu if: runner.os == 'Linux' && env.COMPILER == 'clang' - name: Setup dependencies for Linux LLVM (Release) - run: sudo apt-get install -y libomp5-16 llvm-16 lld-16 + run: sudo apt-get install -y libomp5-17 llvm-17 lld-17 if: > runner.os == 'Linux' && env.COMPILER == 'clang' && env.BUILD_TYPE == 'Release' - name: Setup dependencies for Linux LLVM (static analysis) - run: sudo apt-get install -y clang-tools-16 + run: sudo apt-get install -y clang-tools-17 if: > runner.os == 'Linux' && env.COMPILER == 'clang' && env.STATIC_ANALYSIS == 'ON' - name: Setup dependencies for Linux LLVM (not static analysis) - run: sudo apt-get install -y clang-tidy-16 + run: sudo apt-get install -y clang-tidy-17 if: > runner.os == 'Linux' && env.COMPILER == 'clang' && env.STATIC_ANALYSIS != 'ON' @@ -318,7 +318,7 @@ jobs: export CC=gcc-$V export CXX=g++-$V elif [[ $COMPILER == "clang" ]]; then - V=16 + V=17 export CC=clang-$V export CXX=clang++-$V if [[ $BUILD_TYPE == "Release" ]]; then @@ -359,7 +359,7 @@ jobs: - name: clang static analysis working-directory: ${{github.workspace}}/build run: | - /usr/bin/scan-build-16 --status-bugs -stats -analyze-headers \ + /usr/bin/scan-build-17 --status-bugs -stats -analyze-headers \ --force-analyze-debug-code make -j3; if: env.STATIC_ANALYSIS == 'ON' && env.COMPILER == 'clang' diff --git a/.github/workflows/old-compilers.yml b/.github/workflows/old-compilers.yml index 21443f33..f054eaa5 100644 --- a/.github/workflows/old-compilers.yml +++ b/.github/workflows/old-compilers.yml @@ -294,6 +294,60 @@ jobs: COMPILER: clang VERSION: 15 + - name: clang 16 Release + os: ubuntu-22.04 + BUILD_TYPE: Release + COMPILER: clang + VERSION: 16 + + - name: clang 16 Release with ASan + os: ubuntu-22.04 + BUILD_TYPE: Release + SANITIZE_ADDRESS: ON + COMPILER: clang + VERSION: 16 + + - name: clang 16 Release with TSan + os: ubuntu-22.04 + BUILD_TYPE: Release + SANITIZE_THREAD: ON + COMPILER: clang + VERSION: 16 + + - name: clang 16 Release with UBSan + os: ubuntu-22.04 + BUILD_TYPE: Release + SANITIZE_UB: ON + COMPILER: clang + VERSION: 16 + + - name: clang 16 Debug + os: ubuntu-22.04 + BUILD_TYPE: Debug + COMPILER: clang + VERSION: 16 + + - name: clang 16 Debug with ASan + os: ubuntu-22.04 + BUILD_TYPE: Debug + SANITIZE_ADDRESS: ON + COMPILER: clang + VERSION: 16 + + - name: clang 16 Debug with TSan + os: ubuntu-22.04 + BUILD_TYPE: Debug + SANITIZE_THREAD: ON + COMPILER: clang + VERSION: 16 + + - name: clang 16 Debug with UBSan + os: ubuntu-22.04 + BUILD_TYPE: Debug + SANITIZE_UB: ON + COMPILER: clang + VERSION: 16 + - name: GCC 10 Release os: ubuntu-22.04 BUILD_TYPE: Release @@ -425,7 +479,7 @@ jobs: "clang-${VERSION}" "clang-tidy-${VERSION}" if: runner.os == 'Linux' && env.COMPILER == 'clang' && env.VERSION < 13 - - name: Setup dependencies for Linux LLVM 13 & 15 + - name: Setup dependencies for Linux LLVM 13, 15, & 16 run: | curl 'https://apt.llvm.org/llvm-snapshot.gpg.key' \ | sudo apt-key add - @@ -437,7 +491,7 @@ jobs: "clang-${VERSION}" "clang-tidy-${VERSION}" if: > runner.os == 'Linux' && env.COMPILER == 'clang' - && (env.VERSION == 13 || env.VERSION == 15) + && (env.VERSION == 13 || env.VERSION == 15 || env.VERSION == 16) - name: Setup dependencies for Linux LLVM 13+ run: sudo apt-get install -y iwyu