-
Notifications
You must be signed in to change notification settings - Fork 55
88 lines (81 loc) · 3.74 KB
/
tooling.yml
File metadata and controls
88 lines (81 loc) · 3.74 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
name: 🐧 Tooling
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-tooling
cancel-in-progress: true
jobs:
clangtidy19_nopy_ompi_h5_ad2:
name: clang-tidy w/o py
runs-on: ubuntu-24.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v6
- name: Spack Cache
uses: actions/cache@v5
with: {path: /opt/spack, key: clangtidy19_nopy_ompi_h5_ad2 }
- name: Install
run: |
sudo apt-get update
sudo apt-get install clang clang-tidy gfortran libopenmpi-dev python-is-python3
SPACK_VER=1.0.1 sudo -E .github/workflows/dependencies/install_spack
echo "SPACK VERSION: $(spack --version)"
# Use this to make the HDF5 plugins available from the C/C++ API.
export HDF5_PLUGIN_PATH="$(sudo -E .github/workflows/dependencies/install_hdf5_plugins)"
echo "$HDF5_PLUGIN_PATH"
ls "$HDF5_PLUGIN_PATH"
- name: Build
env: {CC: clang, CXX: clang++}
run: |
sudo ln -s "$(which cmake)" /usr/bin/cmake
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
clangsanitizer19_py38_ompi_h5_ad2:
name: Clang ASAN UBSAN
runs-on: ubuntu-24.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v6
- name: Spack Cache
uses: actions/cache@v5
with: {path: /opt/spack, key: clang19_nopy_ompi_h5_ad2 }
- name: Install
run: |
sudo apt-get update
sudo apt-get install clang-19 libc++-dev libc++abi-dev python3 gfortran libopenmpi-dev python3-numpy
SPACK_VER=1.0.1 sudo -E .github/workflows/dependencies/install_spack
echo "SPACK VERSION: $(spack --version)"
# Use this to make the HDF5 plugins available from the C/C++ API.
export HDF5_PLUGIN_PATH="$(sudo -E .github/workflows/dependencies/install_hdf5_plugins)"
echo "$HDF5_PLUGIN_PATH"
ls "$HDF5_PLUGIN_PATH"
- name: Build
env: {CC: mpicc, CXX: mpic++, OMPI_CC: clang-19, OMPI_CXX: clang++-19, CXXFLAGS: -Werror, OPENPMD_HDF5_CHUNKS: none, OPENPMD_TEST_NFILES_MAX: 100}
run: |
sudo ln -s "$(which cmake)" /usr/bin/cmake
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/19/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