[WIP] Unit Test for dashboard #2457
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |