Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
mkdir build
cd build
cmake -DRMG_BUILD_EXAMPLES=1 -DBUILD_TESTING=ON -DRMG_BUILD_DOCS=OFF .. | tee -a build.log
make | tee -a build.log
make -j$(nproc) | tee -a build.log
make install | tee -a build.log

- name: check version equality
Expand Down Expand Up @@ -87,7 +87,8 @@ jobs:
DISPLAY: :99
run: |
cd build
ctest --output-on-failure
ctest --label-exclude mt -j$(nproc) --output-on-failure
ctest --label-regex mt -j1 --output-on-failure

- name: Upload test suite outputs to GitHub
if: ${{ always() && matrix.container_version != 'slim' }}
Expand All @@ -103,7 +104,8 @@ jobs:
DISPLAY: :99
run: |
cd build
ctest --output-on-failure --label-exclude 'extra|vis'
ctest --label-exclude 'extra|vis|mt' -j$(nproc) --output-on-failure
ctest --label-regex mt --label-exclude 'extra|vis' -j --output-on-failure

- name: Test docs building
if: ${{ matrix.container_version != 'slim' }}
Expand Down Expand Up @@ -165,13 +167,14 @@ jobs:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=../local -DRMG_BUILD_EXAMPLES=1 -DBUILD_TESTING=ON -DRMG_BUILD_DOCS=OFF ..
make
make -j$(nproc)
make install

- name: Run full test suite
run: |
cd build
ctest --output-on-failure
ctest --label-exclude mt -j$(nproc) --output-on-failure
ctest --label-regex mt -j1 --output-on-failure

- name: Minimally test installed executable
run: |
Expand Down
9 changes: 6 additions & 3 deletions tests/confinement/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
include(ProcessorCount)
ProcessorCount(NUM_CORES)

# collect auxiliary files
file(
GLOB _aux
Expand All @@ -22,9 +25,9 @@ foreach(_mac ${_macros})
add_test(NAME confinement/${_mac} COMMAND ${REMAGE_PYEXE} -g gdml/geometry.gdml -o test-out.root
-- macros/${_mac})

add_test(NAME confinement-mt/${_mac} COMMAND ${REMAGE_PYEXE} -g gdml/geometry.gdml -t 2 -o
test-out.root -- macros/${_mac})
set_tests_properties(confinement-mt/${_mac} PROPERTIES LABELS mt)
add_test(NAME confinement-mt/${_mac} COMMAND ${REMAGE_PYEXE} -g gdml/geometry.gdml -t
${NUM_CORES} -o test-out.root -- macros/${_mac})
set_tests_properties(confinement-mt/${_mac} PROPERTIES LABELS mt PROCESSORS ${NUM_CORES})

add_test(NAME confinement-vis/${_mac}
COMMAND ${REMAGE_PYEXE} -g gdml/geometry.gdml -o test-out.root -- macros/_vis.mac
Expand Down
13 changes: 9 additions & 4 deletions tests/hades/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
include(ProcessorCount)
ProcessorCount(NUM_CORES)

# collect auxiliary files
file(
GLOB _aux
Expand All @@ -18,8 +21,9 @@ foreach(_mac ${_macros} ${_macros_extra} ${_macros_vis})
endforeach()

foreach(_mac ${_macros})
add_test(NAME hades-mt/${_mac} COMMAND ${REMAGE_PYEXE} -g gdml/main.gdml -t 2 macros/${_mac})
set_tests_properties(hades-mt/${_mac} PROPERTIES LABELS mt)
add_test(NAME hades-mt/${_mac} COMMAND ${REMAGE_PYEXE} -g gdml/main.gdml -t ${NUM_CORES}
macros/${_mac})
set_tests_properties(hades-mt/${_mac} PROPERTIES LABELS mt PROCESSORS ${NUM_CORES})
endforeach()

if(NOT BxDecay0_FOUND)
Expand All @@ -29,8 +33,9 @@ endif()

if(BxDecay0_THREADSAFE)
foreach(_mac ${_macros_extra})
add_test(NAME hades-mt/${_mac} COMMAND ${REMAGE_PYEXE} -g gdml/main.gdml -t 2 macros/${_mac})
set_tests_properties(hades-mt/${_mac} PROPERTIES LABELS "mt;extra")
add_test(NAME hades-mt/${_mac} COMMAND ${REMAGE_PYEXE} -g gdml/main.gdml -t ${NUM_CORES}
macros/${_mac})
set_tests_properties(hades-mt/${_mac} PROPERTIES LABELS "mt;extra" PROCESSORS ${NUM_CORES})
endforeach()
endif()

Expand Down
7 changes: 5 additions & 2 deletions tests/vertex/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
include(ProcessorCount)
ProcessorCount(NUM_CORES)

# collect auxiliary files
file(
GLOB _aux
Expand Down Expand Up @@ -25,7 +28,7 @@ foreach(_mac ${_macros})
vertex-input-fixture)

# note: only 4 threads available on GitHub actions.
add_test(NAME vertex-mt/${_mac} COMMAND ${PYTHONPATH} run-vtx.py ${_mac} 4)
add_test(NAME vertex-mt/${_mac} COMMAND ${PYTHONPATH} run-vtx.py ${_mac} ${NUM_CORES})
set_tests_properties(vertex-mt/${_mac} PROPERTIES LABELS "mt;extra" FIXTURES_REQUIRED
vertex-input-fixture)
vertex-input-fixture PROCESSORS ${NUM_CORES})
endforeach()
Loading