Skip to content

Fixing bug in TAnalysisWriteLoop (#1498) #133

Fixing bug in TAnalysisWriteLoop (#1498)

Fixing bug in TAnalysisWriteLoop (#1498) #133

# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
# Set up a matrix to run the following 3 configurations:
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
# cc: "gcc" or c_compiler: gcc? cxx: "g++" or cpp_compiler: g++?
matrix:
config:
- {
name: "Ubuntu latest gcc, ROOT 6.30.06", artifact: "UbuntuROOT6.30.06.tar.xz",
os: ubuntu-latest, root: "6.30.06",
build_type: "Release", cc: "gcc", cxx: "g++"
}
- {
name: "MacOS latest gcc, ROOT 6.30.06", artifact: "macOSROOT6.30.06.tar.xz",
os: macos-latest, root: "6.30.06",
build_type: "Release", cc: "clang", cxx: "clang++"
}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{github.workspace}}/build" >> "$GITHUB_OUTPUT"
- name: Linux - Cache ROOT
if: ${{runner.os == 'Linux'}}
uses: actions/cache@v4
id: cache-root
with:
path: root_v${{matrix.config.root}}
key: ${{runner.os}}-root_v${{matrix.config.root}}-${{hashFiles('**/root')}}
restore-keys: ${{runner.os}}-root_v${{matrix.config.root}}-
- name: Linux - Install packages
if: ${{runner.os == 'Linux'}}
run: |
sudo apt-get install binutils cmake dpkg-dev g++ gcc libssl-dev git libx11-dev libxext-dev libxft-dev libxpm-dev python3 gfortran libpcre3-dev xlibmesa-glu-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python3-dev python3-numpy libxml2-dev libkrb5-dev libgsl0-dev nlohmann-json3-dev
- name: Linux - Download ROOT
if: ${{steps.cache-root.outputs.cache-hit != 'true' && runner.os == 'Linux'}}
run: |
wget https://root.cern/download/root_v${{matrix.config.root}}.source.tar.gz
tar -xzf root_v${{matrix.config.root}}.source.tar.gz
mkdir root_v${{matrix.config.root}}
- name: Linux - Configure ROOT
if: ${{steps.cache-root.outputs.cache-hit != 'true' && runner.os == 'Linux'}}
run: >
cmake -S root-${{matrix.config.root}} -B root_v${{matrix.config.root}}-build -DCMAKE_INSTALL_PREFIX=root_v${{matrix.config.root}}
-Dasimage=ON -Dbuiltin_afterimage=ON -Dbuiltin_clang=ON -Dbuiltin_cling=ON -Dbuiltin_cppzmq=ON -Dbuiltin_davix=ON -Dbuiltin_gl2ps=ON -Dbuiltin_llvm=ON -Dbuiltin_openui5=ON -Dbuiltin_tbb=ON -Dbuiltin_unuran=ON -Dbuiltin_vdt=ON -Dbuiltin_veccore=ON -Dbuiltin_xxhash=ON -Dbuiltin_zeromq=ON -Dcefweb=ON -Ddataframe=ON -Ddavix=ON -Dfftw3=ON -Dfitsio=ON -Dfortran=ON -Dgdml=ON -Dgviz=ON -Dhttp=ON -Dimt=ON -Dmathmore=ON -Dmlp=ON -Dmysql=ON -Dodbc=ON -Dopengl=ON -Dpgsql=ON -Dproof=ON -Dpyroot=ON -Dqt5web=ON -Droofit=ON -Droofit_multiprocess=ON -Dwebgui=ON -Drpath=ON -Druntime_cxxmodules=ON -Dshadowpw=ON -Dshared=ON -Dsqlite=ON -Dssl=ON -Dtmva=ON -Dtmva-cpu=ON -Dtmva-pymva=ON -Dspectrum=ON -Dunuran=ON -Dvdt=ON -Dveccore=ON -Dx11=ON -Dxml=ON
-Dbuilin_xrootd=OFF -Dxrootd=OFF -Dclad=OFF
- name: Linux - Compile ROOT
if: ${{steps.cache-root.outputs.cache-hit != 'true' && runner.os == 'Linux'}}
run: |
cmake --build root_v${{matrix.config.root}}-build -- -j4
- name: Install ROOT
if: steps.cache-root.outputs.cache-hit != 'true'
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
cmake --build root_v${{matrix.config.root}}-build -- install -j4
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install libxpm
brew install root
fi
shell: bash
- name: Configure ROOT
#if: ${{hashFiles('root_v${{matrix.config.root}}/bin/thisroot.sh') != ''}}
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
source root_v${{matrix.config.root}}/bin/thisroot.sh
elif [ "$RUNNER_OS" == "macOS" ]; then
source /opt/homebrew/bin/thisroot.sh
fi
whichroot=$(which root)
echo "using $whichroot"
find ${{github.workspace}} -name ROOTConfig.cmake
shell: bash
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{steps.strings.outputs.build-output-dir}}
-DCMAKE_CXX_COMPILER=${{matrix.config.cxx}}
-DCMAKE_C_COMPILER=${{matrix.config.cc}}
-DCMAKE_BUILD_TYPE=${{matrix.config.build_type}}
-DCMAKE_PREFIX_PATH=root_v${{matrix.config.root}}
-S ${{github.workspace}}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{steps.strings.outputs.build-output-dir}} --config ${{matrix.config.build_type}} -j4
- name: Test
working-directory: ${{steps.strings.outputs.build-output-dir}}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{matrix.config.build_type}}