Skip to content

Commit

Permalink
Add LLVM 17 support to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
laurynas-biveinis committed Sep 19, 2023
1 parent b211bed commit f6c8bb3
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 33 deletions.
28 changes: 14 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'

Expand Down
58 changes: 56 additions & 2 deletions .github/workflows/old-compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 -
Expand All @@ -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
Expand Down

0 comments on commit f6c8bb3

Please sign in to comment.