Skip to content

Commit bc56456

Browse files
Merge pull request #1386 from KrisThielemans/ROOT_changes
update ROOT to v6.28.12 and fix FindCERN_ROOT when root-config is used
2 parents 37f799f + d27a6f1 commit bc56456

File tree

2 files changed

+54
-42
lines changed

2 files changed

+54
-42
lines changed

.github/workflows/build-test.yml

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,10 @@ jobs:
259259
260260
# Install ROOT (warning: currently only valid on Ubuntu)
261261
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
262+
ROOT_file=root_v6.28.12.Linux-ubuntu20-x86_64-gcc9.4.tar.gz
263+
wget https://root.cern/download/"$ROOT_file"
264+
tar -xzvf "$ROOT_file"
265+
rm "$ROOT_file"
264266
source root/bin/thisroot.sh
265267
fi
266268
@@ -330,6 +332,12 @@ jobs:
330332
source ${GITHUB_WORKSPACE}/my-env/bin/activate
331333
cmake --build . -j 2 --config ${BUILD_TYPE}} --target install
332334
335+
# Enable tmate debugging of manually-triggered workflows if the input option was provided
336+
- name: Setup tmate session if triggered
337+
uses: mxschmitt/action-tmate@v3
338+
timeout-minutes: 15
339+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled == 'true' }}
340+
333341
- name: ctest
334342
shell: bash
335343
env:
@@ -354,6 +362,43 @@ jobs:
354362
# execute tests
355363
ctest --output-on-failure -C ${BUILD_TYPE} ${EXCLUDE}
356364
365+
- name: examples
366+
shell: bash
367+
run: |
368+
set -ex;
369+
PATH=${CMAKE_INSTALL_PREFIX}/bin:$PATH
370+
# Run examples to see if they work
371+
cd ${GITHUB_WORKSPACE}/examples/PET_simulation
372+
./run_simulation.sh 1> /dev/null
373+
374+
# Run the Demo executables
375+
EXE_LOC=${GITHUB_WORKSPACE}/build/src/examples/C++/using_STIR_LOCAL
376+
cd ${GITHUB_WORKSPACE}/examples/C++/using_STIR_LOCAL
377+
378+
generate_image generate_image.par
379+
forward_project sino.hs image.hv small.hs
380+
381+
# Cannot test demo1 or demo2 as they require interactivity. Piping does not work.
382+
${EXE_LOC}/demo3 demo.par --display_off
383+
${EXE_LOC}/demo3 demoPM.par --display_off
384+
${EXE_LOC}/demo4_obj_fun demo4_obj_fun.par
385+
${EXE_LOC}/demo5_line_search demo5_line_search.par
386+
387+
# build and run C++/using_installed_STIR
388+
cd ${GITHUB_WORKSPACE}/examples/C++/using_installed_STIR
389+
cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
390+
cmake --build build/ --config Release --target install
391+
# run demo
392+
demo_create_image
393+
# just check if its output makes sense
394+
list_image_info test.hv
395+
396+
- name: remove build
397+
shell: bash
398+
# remove to create some disk space
399+
run:
400+
rm -rf cd ${GITHUB_WORKSPACE}/build
401+
357402
- name: recon_test_pack
358403
shell: bash
359404
env:
@@ -378,7 +423,7 @@ jobs:
378423
./run_SPECT_tests.sh
379424
fi
380425
381-
- name: Upload log files for debugging
426+
- name: Upload recon_test_pack log files for debugging
382427
uses: actions/upload-artifact@v3
383428
if: failure()
384429
with:
@@ -388,43 +433,6 @@ jobs:
388433
${{ github.workspace }}/recon_test_pack/**/my_*s
389434
retention-days: 7
390435

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
398-
shell: bash
399-
run: |
400-
set -ex;
401-
PATH=${CMAKE_INSTALL_PREFIX}/bin:$PATH
402-
# Run examples to see if they work
403-
cd ${GITHUB_WORKSPACE}/examples/PET_simulation
404-
./run_simulation.sh 1> /dev/null
405-
406-
# Run the Demo executables
407-
EXE_LOC=${GITHUB_WORKSPACE}/build/src/examples/C++/using_STIR_LOCAL
408-
cd ${GITHUB_WORKSPACE}/examples/C++/using_STIR_LOCAL
409-
410-
generate_image generate_image.par
411-
forward_project sino.hs image.hv small.hs
412-
413-
# Cannot test demo1 or demo2 as they require interactivity. Piping does not work.
414-
${EXE_LOC}/demo3 demo.par --display_off
415-
${EXE_LOC}/demo3 demoPM.par --display_off
416-
${EXE_LOC}/demo4_obj_fun demo4_obj_fun.par
417-
${EXE_LOC}/demo5_line_search demo5_line_search.par
418-
419-
# build and run C++/using_installed_STIR
420-
cd ${GITHUB_WORKSPACE}/examples/C++/using_installed_STIR
421-
cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
422-
cmake --build build/ --config Release --target install
423-
# run demo
424-
demo_create_image
425-
# just check if its output makes sense
426-
list_image_info test.hv
427-
428436
- name: Python
429437
shell: bash
430438
run: |

src/cmake/FindCERN_ROOT.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# @Author Nikos Efthimiou (nikos.efthimiou AT gmail.com)
44
# @Author Kris Thielemans
55
# @Author the ROOT team
6-
# @Atuhor Rebert Twyman (improved documentation)
6+
# @Author Robert Twyman (improved documentation)
77

88
## CMAKE ARGS
99
#
@@ -37,7 +37,7 @@
3737

3838
# This file contains lines from FindROOT.cmake distributed in ROOT 6.08.
3939
# Therefore, this file is presumably licensed under the LGPL 2.1.
40-
# New parts Copyright 2016, 2020, 2023 University College London
40+
# New parts Copyright 2016, 2020, 2023, 2024 University College London
4141

4242
if (NOT DEFINED ROOTSYS)
4343
set(ROOTSYS "$ENV{ROOTSYS}")
@@ -153,7 +153,11 @@ else()
153153

154154
endif()
155155

156+
# root-config reports version as 6.26/10. This might also happen in other cases. Convert it to 6.26.10
157+
string(REPLACE "/" "." CERN_ROOT_VERSION "${CERN_ROOT_VERSION}")
158+
156159
if (CERN_ROOT_DEBUG)
160+
message(STATUS "CERN_ROOT_VERSION: ${CERN_ROOT_VERSION}")
157161
message(STATUS "CERN_ROOT_INCLUDE_DIRS: ${CERN_ROOT_INCLUDE_DIRS}")
158162
message(STATUS "AVAILABLE ROOT LIBRARIES: ${CERN_ROOT_LIBRARIES}")
159163
if (TARGET ROOT::Tree)

0 commit comments

Comments
 (0)