8000 CI: add llvm/clang sanitizer tests · melissawm/numpy@130a046 · GitHub
[go: up one dir, main page]

Skip to content

Commit 130a046

Browse files
committed
CI: add llvm/clang sanitizer tests
1 parent 3c09f16 commit 130a046

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/linux_compiler_sanitizers.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ permissions:
2121
contents: read # to fetch code (actions/checkout)
2222

2323
jobs:
24-
gcc_sanitizers:
24+
clang_sanitizers:
2525
# To enable this workflow on a fork, comment out:
2626
if: github.repository == 'numpy/numpy'
2727
runs-on: ubuntu-latest
@@ -35,6 +35,8 @@ jobs:
3535
python-version: ${{ env.PYTHON_VERSION }}
3636
- name: Install dependencies
3737
run: |
38+
sudo apt update
39+
sudo apt install -y llvm libstdc++-12-dev
3840
pip install -r requirements/build_requirements.txt
3941
pip install -r requirements/ci_requirements.txt
4042
- name: Build
@@ -43,7 +45,7 @@ jobs:
4345
TERM: xterm-256color
4446
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
4547
run:
46-
spin build --with-scipy-openblas=32 -- --werror -Db_sanitize=address,undefined
48+
CC=clang CXX=clang++ spin build --with-scipy-openblas=32 -- -Db_sanitize=address,undefined
4749
- name: Test
4850
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
4951
env:
@@ -52,5 +54,5 @@ jobs:
5254
pip install pytest pytest-xdist hypothesis typing_extensions
5355
ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1:halt_on_error=1 \
5456
UBSAN_OPTIONS=halt_on_error=0 \
55-
LD_PRELOAD=$(gcc --print-file-name=libasan.so) \
57+
LD_PRELOAD=$(clang --print-file-name=libclang_rt.asan-x86_64.so) \
5658
python -m spin test -- -v -s

0 commit comments

Comments
 (0)
0