Skip to content

ENH: add support for nan-like null strings in string replace #3380

ENH: add support for nan-like null strings in string replace

ENH: add support for nan-like null strings in string replace #3380

name: Test with compiler sanitizers (Linux)
on:
pull_request:
branches:
- main
- maintenance/**
defaults:
run:
shell: bash
env:
PYTHON_VERSION: 3.11
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
clang_sanitizers:
# To enable this workflow on a fork, comment out:
if: github.repository == 'numpy/numpy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-tags: true
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y llvm libstdc++-12-dev
pip install -r requirements/build_requirements.txt
pip install -r requirements/ci_requirements.txt
- name: Build
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
env:
TERM: xterm-256color
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
run:
CC=clang CXX=clang++ spin build --with-scipy-openblas=32 -- -Db_sanitize=address,undefined
- name: Test
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
env:
TERM: xterm-256color
run: |
pip install pytest pytest-xdist hypothesis typing_extensions
ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1:halt_on_error=1 \
UBSAN_OPTIONS=halt_on_error=0 \
LD_PRELOAD=$(clang --print-file-name=libclang_rt.asan-x86_64.so) \
python -m spin test -- -v -s