Skip to content

Commit

Permalink
CI: build tests with -g compile option
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Nov 6, 2024
1 parent c803d34 commit 03ec749
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,19 @@ jobs:
# display disk space usage
df -h
# configure
export AMReX_CMAKE_FLAGS="-DAMReX_ASSERTIONS=ON -DAMReX_TESTING=ON"
cmake -S . -B build \
${AMReX_CMAKE_FLAGS} \
${WARPX_CMAKE_FLAGS} \
-DWarpX_TEST_CLEANUP=ON \
-DWarpX_TEST_FPETRAP=ON
export AMReX_CMAKE_FLAGS=(
"-DAMReX_ASSERTIONS=ON"
"-DAMReX_TESTING=ON"
)
export WARPX_TEST_FLAGS=(
"-DWarpX_TEST_CLEANUP=ON"
"-DWarpX_TEST_FPETRAP=ON"
"-DWarpX_TEST_DEBUG=ON"
)
cmake -S . -B build \
${AMReX_CMAKE_FLAGS} \
${WARPX_CMAKE_FLAGS} \
${WARPX_TEST_FLAGS}
# build
cmake --build build -j 2
# display disk space usage
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ mark_as_advanced(WarpX_TEST_CLEANUP)
option(WarpX_TEST_FPETRAP "Run CI tests with FPE-trapping runtime parameters" OFF)
mark_as_advanced(WarpX_TEST_FPETRAP)

# Advanced option to run CI tests with the -g compile option
option(WarpX_TEST_DEBUG "Run CI tests with the -g compile option" OFF)
mark_as_advanced(WarpX_TEST_DEBUG)
if(WarpX_TEST_DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
endif()

set(WarpX_DIMS_VALUES 1 2 3 RZ)
set(WarpX_DIMS 3 CACHE STRING "Simulation dimensionality <1;2;3;RZ>")
list(REMOVE_DUPLICATES WarpX_DIMS)
Expand Down

0 comments on commit 03ec749

Please sign in to comment.