File tree 1 file changed +55
-0
lines changed 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test with compiler sanitizers (Linux)
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - main
7
+ - maintenance/**
8
+
9
+ defaults :
10
+ run :
11
+ shell : bash
12
+
13
+ env :
14
+ PYTHON_VERSION : 3.11
15
+
16
+ concurrency :
17
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18
+ cancel-in-progress : true
19
+
20
+ permissions :
21
+ contents : read # to fetch code (actions/checkout)
22
+
23
+ jobs :
24
+ gcc_sanitizers :
25
+ if : " github.repository == 'numpy/numpy'"
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
29
+ with :
30
+ submodules : recursive
31
+ fetch-depth : 0
32
+ - uses : actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
33
+ with :
34
+ python-version : ${{ env.PYTHON_VERSION }}
35
+ - name : Install dependencies
36
+ run : |
37
+ pip install -r build_requirements.txt
38
+ sudo apt-get install -y libopenblas-serial-dev
39
+ - name : Build
40
+ shell : ' script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
41
+ env :
42
+ TERM : xterm-256color
43
+ run :
44
+ spin build -- --werror -Db_sanitize=address,undefined
45
+ - name : Test
46
+ shell : ' script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
47
+ env :
48
+ TERM : xterm-256color
49
+ run : |
50
+ pip install pytest pytest-xdist hypothesis typing_extensions
51
+ ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1:halt_on_error=1 \
52
+ LD_PRELOAD=$(gcc --print-file-name=libasan.so) \
53
+ python -m spin test -- -v -s
54
+
55
+
You can’t perform that action at this time.
0 commit comments