7070 compiler : gcc
7171 compiler_version : 12
7272 cuda_version : " 0"
73- BUILD_FLAGS : " -DSTIR_OPENMP=ON -DCMAKE_CXX_STANDARD=14 "
73+ BUILD_FLAGS : " -DSTIR_OPENMP=ON -DCMAKE_CXX_STANDARD=20 "
7474 BUILD_TYPE : " RelWithDebInfo"
7575 parallelproj : " ON"
7676 ROOT : " OFF"
@@ -79,14 +79,14 @@ jobs:
7979 compiler : gcc
8080 compiler_version : 12
8181 cuda_version : " 12.1.0"
82- BUILD_FLAGS : " -DSTIR_OPENMP=ON -DCMAKE_CXX_STANDARD=14 "
82+ BUILD_FLAGS : " -DSTIR_OPENMP=ON -DCMAKE_CXX_STANDARD=17 "
8383 BUILD_TYPE : " Release"
8484 parallelproj : " ON"
8585 ROOT : " OFF"
8686 ITK : " ON"
8787 - os : macOS-latest
8888 compiler : gcc
89- compiler_version : 11
89+ # compiler_version: 11
9090 cuda_version : " 0"
9191 BUILD_FLAGS : " -DSTIR_OPENMP=OFF"
9292 parallelproj : " OFF"
@@ -162,9 +162,6 @@ jobs:
162162 CXX=${CXX}-${{ matrix.compiler_version }}
163163 fi
164164 if test 'XX${{ matrix.os }}' = 'XXmacOS-latest'; then
165- # need to force XCode version for the moment due to a linker bug
166- # see https://github.com/UCL/STIR/issues/1103
167- echo DEVELOPER_DIR="/Applications/Xcode_14.1.app/Contents/Developer" >> $GITHUB_ENV
168165 if test 'XX${{ matrix.compiler }}' = 'XXclang'; then
169166 brew install llvm@${{ matrix.compiler_version }}
170167 if test XX${HOMEBREW_PREFIX} = XX; then
@@ -211,7 +208,7 @@ jobs:
211208 sudo apt install libinsighttoolkit5-dev
212209 fi
213210 # free up some disk space
214- sudo apt clean
211+ apt autoremove --purge && sudo apt clean
215212 PYTHON_EXECUTABLE=$(which python3)
216213 ;;
217214 (macOS*)
@@ -255,12 +252,15 @@ jobs:
255252 cmake .. -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} ${extra_args}
256253 cmake --build . --target install --config Release
257254 cd ../..
255+ rm -rf parallelproj
258256 fi
259257
260258 # Install ROOT (warning: currently only valid on Ubuntu)
261259 if test "${{matrix.ROOT}}XX" == "ONXX"; then
262- wget https://root.cern/download/root_v6.24.02.Linux-ubuntu20-x86_64-gcc9.3.tar.gz
263- tar -xzvf root_v6.24.02.Linux-ubuntu20-x86_64-gcc9.3.tar.gz
260+ ROOT_file=root_v6.28.12.Linux-ubuntu20-x86_64-gcc9.4.tar.gz
261+ wget https://root.cern/download/"$ROOT_file"
262+ tar -xzvf "$ROOT_file"
263+ rm "$ROOT_file"
264264 source root/bin/thisroot.sh
265265 fi
266266
@@ -330,6 +330,12 @@ jobs:
330330 source ${GITHUB_WORKSPACE}/my-env/bin/activate
331331 cmake --build . -j 2 --config ${BUILD_TYPE}} --target install
332332
333+ # Enable tmate debugging of manually-triggered workflows if the input option was provided
334+ - name : Setup tmate session if triggered
335+ uses : mxschmitt/action-tmate@v3
336+ timeout-minutes : 15
337+ if : ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled == 'true' }}
338+
333339 - name : ctest
334340 shell : bash
335341 env :
@@ -344,7 +350,10 @@ jobs:
344350 fi
345351 # don't run all of them in Debug mode as it takes too long
346352 if test ${BUILD_TYPE} = Debug; then
347- EXCLUDE_Debug="test_data_processor_projectors|test_export_array|test_ArcCorrection"
353+ # Also excluding test_PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBin
354+ # as it is a bit slow. Moreover it fails on MacOS (Debug)
355+ # https://github.com/UCL/STIR/pull/1418#issuecomment-2109518132
356+ EXCLUDE_Debug="test_data_processor_projectors|test_export_array|test_ArcCorrection|test_PoissonLogLikelihoodWithLinearModelForMeanAndListModeWithProjMatrixByBin"
348357 EXCLUDE="${EXCLUDE_Debug}${EXCLUDE:+"|"}${EXCLUDE}"
349358 fi
350359 # prepend -E
@@ -354,47 +363,20 @@ jobs:
354363 # execute tests
355364 ctest --output-on-failure -C ${BUILD_TYPE} ${EXCLUDE}
356365
357- - name : recon_test_pack
358- shell : bash
359- env :
360- BUILD_FLAGS : ${{ matrix.BUILD_FLAGS }}
361- BUILD_TYPE : ${{ matrix.BUILD_TYPE }}
362- run : |
363- set -ex;
364- PATH=${CMAKE_INSTALL_PREFIX}/bin:$PATH
365- cd ${GITHUB_WORKSPACE}/recon_test_pack
366- ./run_tests.sh --nointbp
367- # don't run all of them in Debug mode as it takes too long
368- if test ${BUILD_TYPE} != Debug; then
369- ./run_test_simulate_and_recon.sh
370- ./run_test_listmode_recon.sh
371- ./run_test_simulate_and_recon_with_motion.sh
372- ./run_scatter_tests.sh
373- ./run_test_zoom_image.sh
374- ./run_ML_norm_tests.sh
375- if test "${{matrix.ROOT}}XX" == "ONXX"; then ./run_root_GATE.sh; fi
376- ./run_tests_modelling.sh
377- cd ${GITHUB_WORKSPACE}/recon_test_pack/SPECT
378- ./run_SPECT_tests.sh
379- fi
380-
381- - name : Upload log files for debugging
382- uses : actions/upload-artifact@v3
366+ - name : Upload ctest log files for debugging
367+ uses : actions/upload-artifact@v4
383368 if : failure()
384369 with :
385- name : recon_test_pack_log_files-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.compiler_version }}-cuda${{ matrix.cuda_version }}-${{ matrix.BUILD_TYPE }}-pp=${{ matrix.parallelproj }}-ROOT=${{ matrix.ROOT }}
386- path : ${{ github.workspace }}/recon_test_pack/**/*.log
387- ${{ github.workspace }}/recon_test_pack/**/my_*v
388- ${{ github.workspace }}/recon_test_pack/**/my_*s
370+ name : ctest_log_files-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.compiler_version }}-cuda${{ matrix.cuda_version }}-${{ matrix.BUILD_TYPE }}-pp=${{ matrix.parallelproj }}-ROOT=${{ matrix.ROOT }}
371+ path : |
372+ ${{ github.workspace }}/build/**/*.log
373+ ${{ github.workspace }}/build/**/*.hv
374+ ${{ github.workspace }}/build/**/*.v
375+ ${{ github.workspace }}/build/**/*.hs
376+ ${{ github.workspace }}/build/**/*.s
389377 retention-days : 7
390378
391- # Enable tmate debugging of manually-triggered workflows if the input option was provided
392- - name : Setup tmate session if triggered
393- uses : mxschmitt/action-tmate@v3
394- timeout-minutes : 15
395- if : ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled == 'true' }}
396-
397- - name : examples
379+ - name : C++ examples with STIR_LOCAL
398380 shell : bash
399381 run : |
400382 set -ex;
@@ -416,14 +398,70 @@ jobs:
416398 ${EXE_LOC}/demo4_obj_fun demo4_obj_fun.par
417399 ${EXE_LOC}/demo5_line_search demo5_line_search.par
418400
401+ - name : remove build
402+ shell : bash
403+ # remove to create some disk space
404+ run : |
405+ set -x
406+ cd ${GITHUB_WORKSPACE}
407+ df -h .
408+ rm -rf ./build
409+ df -h .
410+
411+ - name : C++ examples with installed STIR
412+ shell : bash
413+ run : |
414+ set -ex;
419415 # build and run C++/using_installed_STIR
416+ PATH=${CMAKE_INSTALL_PREFIX}/bin:$PATH
420417 cd ${GITHUB_WORKSPACE}/examples/C++/using_installed_STIR
421418 cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
422419 cmake --build build/ --config Release --target install
423420 # run demo
424421 demo_create_image
425422 # just check if its output makes sense
426423 list_image_info test.hv
424+ rm -rf build
425+
426+ - name : recon_test_pack
427+ shell : bash
428+ env :
429+ BUILD_FLAGS : ${{ matrix.BUILD_FLAGS }}
430+ BUILD_TYPE : ${{ matrix.BUILD_TYPE }}
431+ run : |
432+ set -ex;
433+ PATH=${CMAKE_INSTALL_PREFIX}/bin:$PATH
434+ cd ${GITHUB_WORKSPACE}/recon_test_pack
435+ ./run_tests.sh --nointbp
436+ # don't run all of them in Debug mode as it takes too long
437+ if test ${BUILD_TYPE} != Debug; then
438+ ./run_test_simulate_and_recon.sh
439+ ./run_test_listmode_recon.sh
440+ ./run_test_simulate_and_recon_with_motion.sh
441+ ./run_scatter_tests.sh
442+ ./run_test_zoom_image.sh
443+ ./run_ML_norm_tests.sh
444+ if test "${{matrix.ROOT}}XX" == "ONXX"; then ./run_root_GATE.sh; fi
445+ ./run_tests_modelling.sh
446+ cd ${GITHUB_WORKSPACE}/recon_test_pack/SPECT
447+ ./run_SPECT_tests.sh
448+ fi
449+
450+ - name : Upload recon_test_pack log files for debugging
451+ uses : actions/upload-artifact@v4
452+ if : failure()
453+ with :
454+ name : recon_test_pack_log_files-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.compiler_version }}-cuda${{ matrix.cuda_version }}-${{ matrix.BUILD_TYPE }}-pp=${{ matrix.parallelproj }}-ROOT=${{ matrix.ROOT }}
455+ path : |
456+ ${{ github.workspace }}/recon_test_pack/**/*.log
457+ ${{ github.workspace }}/recon_test_pack/**/my_*v
458+ ${{ github.workspace }}/recon_test_pack/**/my_*s
459+ retention-days : 7
460+
461+ - name : remove recon_test_pack
462+ shell : bash
463+ run : |
464+ rm -rf ${GITHUB_WORKSPACE}/recon_test_pack
427465
428466 - name : Python
429467 shell : bash
0 commit comments