-
Notifications
You must be signed in to change notification settings - Fork 632
58 lines (54 loc) · 1.71 KB
/
build-san.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Sanitizers
on:
schedule:
- cron: "24 10 * * *"
workflow_dispatch:
jobs:
build:
name: "Test C++ with ${{ matrix.name-suffix }}"
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- name-suffix: "ASAN"
sanitizer: "address"
configure-options: ""
debug-options: "-g1"
- name-suffix: "MSAN"
sanitizer: "memory"
configure-options: "CC=clang CXX=clang++ LD=clang++"
debug-options: "-gmlt"
- name-suffix: "UBSAN"
sanitizer: "undefined"
configure-options: "CC=clang CXX=clang++ LD=clang++"
debug-options: "-gmlt"
steps:
- name: Install Dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y autoconf automake clang libaec-dev libctl-dev \
libfftw3-dev libgdsii-dev libgsl-dev libharminv-dev libhdf5-dev \
libtool mpb mpb-dev
- name: Check out repository
uses: actions/checkout@v4
- name: Autoreconf
run: autoreconf -if
- name: configure
run: |
./configure \
--with-hdf5 --without-mpi --without-python --without-scheme \
--enable-shared --enable-maintainer-mode \
CXXFLAGS="-fsanitize=${{ matrix.sanitizer }} ${{ matrix.debug-options }}" \
LDFLAGS="-fsanitize=${{ matrix.sanitizer }}" \
${{ matrix.configure-options }}
- name: make
run: make -j$(nproc)
- name: Run sanitizer
run: make -j$(nproc) check
- name: Archive test logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.name-suffix }}-log
path: tests/test-suite.log