Skip to content

Commit e62653d

Browse files
authored
Fix ASan/TSan errors by using LLVM 18 (#6396)
Github actions CI started to fail for no obvious reason. It seems some VM change happened, and very recent LLVM/clang is needed to keep running sanitizers. LLVM 18 is the first version that works.
1 parent 7bd37d4 commit e62653d

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,27 +144,28 @@ jobs:
144144
env:
145145
ASAN_OPTIONS: "symbolize=1"
146146
COMPILER_FLAGS: "-fsanitize=address"
147+
CC: "clang-18"
148+
CXX: "clang++-18"
147149
steps:
148150
- uses: actions/setup-python@v1
149151
with:
150152
python-version: '3.x'
151153
- uses: actions/checkout@v1
152154
with:
153155
submodules: true
154-
- name: install clang
155-
uses: egor-tensin/setup-clang@v1
156-
with:
157-
# Clang 15 seems to avoid asan flakes that 14 has (#6116).
158-
version: 15
159-
platform: x64
156+
- name: install clang 18
157+
run: |
158+
wget https://apt.llvm.org/llvm.sh
159+
chmod +x llvm.sh
160+
sudo ./llvm.sh 18
160161
- name: install ninja
161162
run: sudo apt-get install ninja-build
162163
- name: install Python dev dependencies
163164
run: pip3 install -r requirements-dev.txt
164165
- name: cmake
165166
run: |
166167
mkdir -p out
167-
cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang-15 -DCMAKE_CXX_COMPILER=clang++-15 -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS"
168+
cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS"
168169
- name: build
169170
run: cmake --build out
170171
- name: test
@@ -243,21 +244,28 @@ jobs:
243244
env:
244245
COMPILER_FLAGS: "-fsanitize=thread"
245246
LINKER_FLAGS: "-fsanitize=thread"
247+
CC: "clang-18"
248+
CXX: "clang++-18"
246249
steps:
247250
- uses: actions/setup-python@v1
248251
with:
249252
python-version: '3.x'
250253
- uses: actions/checkout@v1
251254
with:
252255
submodules: true
256+
- name: install clang 18
257+
run: |
258+
wget https://apt.llvm.org/llvm.sh
259+
chmod +x llvm.sh
260+
sudo ./llvm.sh 18
253261
- name: install ninja
254262
run: sudo apt-get install ninja-build
255263
- name: install Python dev dependencies
256264
run: pip3 install -r requirements-dev.txt
257265
- name: cmake
258266
run: |
259267
mkdir -p out
260-
cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS" -DCMAKE_EXE_LINKER_FLAGS="$LINKER_FLAGS"
268+
cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS" -DCMAKE_EXE_LINKER_FLAGS="$LINKER_FLAGS"
261269
- name: build
262270
run: cmake --build out
263271
- name: test

0 commit comments

Comments
 (0)