-
Notifications
You must be signed in to change notification settings - Fork 51
76 lines (71 loc) · 3.1 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
69
70
71
72
73
74
75
76
name: 🐧 Tooling
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-tooling
cancel-in-progress: true
jobs:
clangtidy10_nopy_ompi_h5_ad2:
name: clang-tidy w/o py
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Spack Cache
uses: actions/cache@v3
with: {path: /opt/spack, key: clangtidy10_nopy_ompi_h5_ad2 }
- name: Install
run: |
sudo apt-get update
sudo apt-get install clang clang-tidy gfortran libopenmpi-dev python
sudo .github/workflows/dependencies/install_spack
- name: Build
env: {CC: clang, CXX: clang++}
run: |
eval $(spack env activate --sh .github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/)
spack install
share/openPMD/download_samples.sh build
cmake -S . -B build \
-DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);-system-headers=0" \
-DopenPMD_USE_INVASIVE_TESTS=ON
cmake --build build --parallel 2 2> build/clang-tidy.log
cat build/clang-tidy.log
if [[ $(wc -m <build/clang-tidy.log) -gt 1 ]]; then exit 1; fi
clangsanitizer10_py38_ompi_h5_ad2:
name: Clang ASAN UBSAN
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Spack Cache
uses: actions/cache@v3
with: {path: /opt/spack, key: clang10_nopy_ompi_h5_ad2 }
- name: Install
run: |
sudo apt-get update
sudo apt-get install clang-10 libc++-dev libc++abi-dev python3 gfortran libopenmpi-dev
python3 -m pip install -U pip
python3 -m pip install -U numpy
sudo .github/workflows/dependencies/install_spack
- name: Build
env: {CC: mpicc, CXX: mpic++, OMPI_CC: clang-10, OMPI_CXX: clang++-10, CXXFLAGS: -Werror, OPENPMD_HDF5_CHUNKS: none, OPENPMD_TEST_NFILES_MAX: 100}
run: |
eval $(spack env activate --sh .github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/)
spack install
SOURCEPATH="$(pwd)"
share/openPMD/download_samples.sh build
export LDFLAGS="${LDFLAGS} -fsanitize=address,undefined -shared-libsan"
export CXXFLAGS="${CXXFLAGS} -fsanitize=address,undefined -shared-libsan"
cmake -S . -B build \
-DopenPMD_USE_MPI=ON \
-DopenPMD_USE_PYTHON=ON \
-DopenPMD_USE_HDF5=ON \
-DopenPMD_USE_ADIOS2=ON \
-DopenPMD_USE_INVASIVE_TESTS=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build build --parallel 2
export 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
export LSAN_OPTIONS=suppressions="$SOURCEPATH/.github/ci/sanitizer/clang/Leak.supp"
export LD_PRELOAD=/usr/lib/clang/10/lib/linux/libclang_rt.asan-x86_64.so
ctest --test-dir build -E 3b --output-on-failure
export OPENPMD_HDF5_CHUNKS="auto"
ctest --test-dir build -R 3b --output-on-failure