-
Notifications
You must be signed in to change notification settings - Fork 19
68 lines (60 loc) · 2.55 KB
/
tooling.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
59
60
61
62
63
64
65
66
67
68
name: 🐧 Tooling
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-tooling
cancel-in-progress: true
jobs:
clangsanitizer:
name: Clang ASAN UBSAN
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/clang-san-openmpi.sh
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-clangsan-${{ hashFiles('.github/workflows/tooling.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-openmp-clangsan-${{ hashFiles('.github/workflows/tooling.yml') }}-
ccache-openmp-clangsan-
- name: build ImpactX
env:
CC: mpicc
CXX: mpic++
OMPI_CC: clang
OMPI_CXX: clang++
MPICH_CC: clang
MPICH_CXX: clang++
CXXFLAGS: "-Werror -Wno-error=pass-failed -fsanitize=address,undefined -shared-libsan"
LDFLAGS: "-fsanitize=address,undefined -shared-libsan -fno-omit-frame-pointer"
run: |
cmake -S . -B build \
-DpyAMReX_IPO=OFF \
-DImpactX_FFT=ON \
-DImpactX_PYTHON=ON \
-DImpactX_PYTHON_IPO=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DMPIEXEC_POSTFLAGS="--use-hwthread-cpus"
cmake --build build --parallel 4
- name: run tests
env:
ASAN_OPTIONS: detect_stack_use_after_return=1:detect_leaks=1:check_initialization_order=true:strict_init_order=true:detect_stack_use_after_scope=1:fast_unwind_on_malloc=0
LD_LIBRARY_PATH: /usr/lib/clang/14/lib/linux/
LD_PRELOAD: /usr/lib/clang/14/lib/linux/libclang_rt.asan-x86_64.so
run: |
export LSAN_OPTIONS=suppressions="$(pwd)/.github/ci/sanitizer/clang/Leak.supp:use_tls=0"
ctest --test-dir build -E AMReX --output-on-failure --label-exclude slow
# notes:
# * -shared-libsan because we build shared libs
# * use_tls=0 because of glibc 3.23 on GitHub actions
# https://github.com/google/sanitizers/issues/1342
# * LD_PRELOAD because we run also components (e.g., Python code) that we did not compile with sanitizers