Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ROOT to v6.28.12 and fix FindCERN_ROOT when root-config is used #1386

Merged
merged 4 commits into from
Feb 15, 2024
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
88 changes: 48 additions & 40 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,10 @@ jobs:

# Install ROOT (warning: currently only valid on Ubuntu)
if test "${{matrix.ROOT}}XX" == "ONXX"; then
wget https://root.cern/download/root_v6.24.02.Linux-ubuntu20-x86_64-gcc9.3.tar.gz
tar -xzvf root_v6.24.02.Linux-ubuntu20-x86_64-gcc9.3.tar.gz
ROOT_file=root_v6.28.12.Linux-ubuntu20-x86_64-gcc9.4.tar.gz
wget https://root.cern/download/"$ROOT_file"
tar -xzvf "$ROOT_file"
rm "$ROOT_file"
source root/bin/thisroot.sh
fi

Expand Down Expand Up @@ -330,6 +332,12 @@ jobs:
source ${GITHUB_WORKSPACE}/my-env/bin/activate
cmake --build . -j 2 --config ${BUILD_TYPE}} --target install

# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session if triggered
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled == 'true' }}

- name: ctest
shell: bash
env:
Expand All @@ -354,6 +362,43 @@ jobs:
# execute tests
ctest --output-on-failure -C ${BUILD_TYPE} ${EXCLUDE}

- name: examples
shell: bash
run: |
set -ex;
PATH=${CMAKE_INSTALL_PREFIX}/bin:$PATH
# Run examples to see if they work
cd ${GITHUB_WORKSPACE}/examples/PET_simulation
./run_simulation.sh 1> /dev/null

# Run the Demo executables
EXE_LOC=${GITHUB_WORKSPACE}/build/src/examples/C++/using_STIR_LOCAL
cd ${GITHUB_WORKSPACE}/examples/C++/using_STIR_LOCAL

generate_image generate_image.par
forward_project sino.hs image.hv small.hs

# Cannot test demo1 or demo2 as they require interactivity. Piping does not work.
${EXE_LOC}/demo3 demo.par --display_off
${EXE_LOC}/demo3 demoPM.par --display_off
${EXE_LOC}/demo4_obj_fun demo4_obj_fun.par
${EXE_LOC}/demo5_line_search demo5_line_search.par

# build and run C++/using_installed_STIR
cd ${GITHUB_WORKSPACE}/examples/C++/using_installed_STIR
cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
cmake --build build/ --config Release --target install
# run demo
demo_create_image
# just check if its output makes sense
list_image_info test.hv

- name: remove build
shell: bash
# remove to create some disk space
run:
rm -rf cd ${GITHUB_WORKSPACE}/build

- name: recon_test_pack
shell: bash
env:
Expand All @@ -378,7 +423,7 @@ jobs:
./run_SPECT_tests.sh
fi

- name: Upload log files for debugging
- name: Upload recon_test_pack log files for debugging
uses: actions/upload-artifact@v3
if: failure()
with:
Expand All @@ -388,43 +433,6 @@ jobs:
${{ github.workspace }}/recon_test_pack/**/my_*s
retention-days: 7

# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session if triggered
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled == 'true' }}

- name: examples
shell: bash
run: |
set -ex;
PATH=${CMAKE_INSTALL_PREFIX}/bin:$PATH
# Run examples to see if they work
cd ${GITHUB_WORKSPACE}/examples/PET_simulation
./run_simulation.sh 1> /dev/null

# Run the Demo executables
EXE_LOC=${GITHUB_WORKSPACE}/build/src/examples/C++/using_STIR_LOCAL
cd ${GITHUB_WORKSPACE}/examples/C++/using_STIR_LOCAL

generate_image generate_image.par
forward_project sino.hs image.hv small.hs

# Cannot test demo1 or demo2 as they require interactivity. Piping does not work.
${EXE_LOC}/demo3 demo.par --display_off
${EXE_LOC}/demo3 demoPM.par --display_off
${EXE_LOC}/demo4_obj_fun demo4_obj_fun.par
${EXE_LOC}/demo5_line_search demo5_line_search.par

# build and run C++/using_installed_STIR
cd ${GITHUB_WORKSPACE}/examples/C++/using_installed_STIR
cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
cmake --build build/ --config Release --target install
# run demo
demo_create_image
# just check if its output makes sense
list_image_info test.hv

- name: Python
shell: bash
run: |
Expand Down
8 changes: 6 additions & 2 deletions src/cmake/FindCERN_ROOT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# @Author Nikos Efthimiou (nikos.efthimiou AT gmail.com)
# @Author Kris Thielemans
# @Author the ROOT team
# @Atuhor Rebert Twyman (improved documentation)
# @Author Robert Twyman (improved documentation)

## CMAKE ARGS
#
Expand Down Expand Up @@ -37,7 +37,7 @@

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

if (NOT DEFINED ROOTSYS)
set(ROOTSYS "$ENV{ROOTSYS}")
Expand Down Expand Up @@ -153,7 +153,11 @@ else()

endif()

# root-config reports version as 6.26/10. This might also happen in other cases. Convert it to 6.26.10
string(REPLACE "/" "." CERN_ROOT_VERSION "${CERN_ROOT_VERSION}")

if (CERN_ROOT_DEBUG)
message(STATUS "CERN_ROOT_VERSION: ${CERN_ROOT_VERSION}")
message(STATUS "CERN_ROOT_INCLUDE_DIRS: ${CERN_ROOT_INCLUDE_DIRS}")
message(STATUS "AVAILABLE ROOT LIBRARIES: ${CERN_ROOT_LIBRARIES}")
if (TARGET ROOT::Tree)
Expand Down
Loading