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
31 changes: 31 additions & 0 deletions .github/actions/fsr/cache-save/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: cache-save
description: 'steps to cache R3BRoot and ucesb'

inputs:
r3b-dev-key:
description: 'key for r3b dev cache'
required: false
default: ''
cache-name:
description: 'repository name'
required: true

runs:
using: composite
steps:
- name: cache ucesb
id: cache-ucesb
uses: actions/cache/save@v5
with:
path: |
${{ env.UCESB_DIR }}
${{ github.workspace }}/build/_deps
key: build-deps

- name: cache r3b
if: matrix.save != 'false'
id: cache-r3b
uses: actions/cache/save@v5
with:
path: .ccache
key: r3b-build-${{ inputs.cache-name }}-${{ inputs.r3b-dev-key }}
37 changes: 37 additions & 0 deletions .github/actions/fsr/ctest-cdash/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ctest-cdash
description: 'steps to perform ctest and submit the report to cdash'

inputs:
repo:
description: 'repository name'
required: true

runs:
using: composite
steps:
- name: set env variables for push
if: github.event_name == 'push'
run: |
echo "TEST_MODEL=Continuous" >> $GITHUB_ENV
echo "TEST_NAME=\"${{ inputs.repo }} (commit ${cacheSHA})\"" >> $GITHUB_ENV
shell: bash

- name: set env variables for pull request
if: github.event_name != 'push'
run: |
echo "TEST_MODEL=Experimental" >> $GITHUB_ENV
export PULL_NR=${{ github.event.number }}
echo "TEST_NAME=\"${{ inputs.repo }}_${{ matrix.sys }} (pull request No.${PULL_NR})\"" >> $GITHUB_ENV
shell: bash

- name: running ctest
run: |
source $GITHUB_WORKSPACE/util/generate_geo_test.sh
echo "Running ctest on ${{ matrix.sys }} "
ctest -S cmake/CI_CD/CDash.cmake -DBUILD_J=${NUM_THREADS}\
-DTEST_MODEL=${TEST_MODEL}\
-DTEST_NAME=${{ env.TEST_NAME }}\
-DSITE_NAME="Github hosted (${{ github.repository }})"\
--force-new-ctest-process \
-V -E "(run_gen_sim|run_digi|run_aladin_digi|califasim2|landreco|elsim)"
shell: bash
44 changes: 44 additions & 0 deletions .github/actions/fsr/install-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: install-deps
description: 'steps to install deps'

inputs:
r3b-dev-key:
description: 'key for r3b dev cache'
required: false
default: ''
cache-name:
description: 'repository name'
required: false
default: 'false'

runs:
using: composite
steps:
- name: cache ucesb
if: github.event_name == 'pull_request'
id: cache-ucesb
uses: actions/cache/restore@v5
with:
path: |
${{ env.UCESB_DIR }}
${{ github.workspace }}/build/_deps
key: build-deps

- name: cache r3b
if: inputs.cache-name != 'false' && github.event_name == 'pull_request'
id: cache-r3b
uses: actions/cache/restore@v5
with:
path: .ccache
key: r3b-build-${{ inputs.cache-name }}-${{ inputs.r3b-dev-key }}
restore-keys: |
r3b-build-${{ inputs.cache-name }}-
r3b-build-

- name: build ucesb
if: steps.cache-ucesb.outputs.cache-hit != 'true'
run: |
export LD_LIBRARY_PATH="${SIMPATH}/lib/:${LD_LIBRARY_PATH}"
git clone https://git.chalmers.se/expsubphys/ucesb.git
cd ucesb && make -j${NUM_THREADS} empty/empty
shell: bash
31 changes: 31 additions & 0 deletions .github/actions/fsr/pre-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: pre build
description: 'steps before building R3BRoot with Sofia'

runs:
using: composite
steps:
- name: set env variables
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
echo "UCESB_DIR=$GITHUB_WORKSPACE/ucesb/" >> $GITHUB_ENV
export SIMPATH=$FAIRSOFTPATH
echo "SIMPATH=${SIMPATH}" >> $GITHUB_ENV
echo "FAIRROOTPATH=$FAIRROOTPATH" >> $GITHUB_ENV
echo "${SIMPATH}/bin" >> $GITHUB_PATH
# variables for ccache
echo "CCACHE_BASEDIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
echo "CCACHE_DIR=${GITHUB_WORKSPACE}/.ccache" >> $GITHUB_ENV
echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV
echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV
echo "SOURCEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "BUILDDIR=$GITHUB_WORKSPACE/build" >> $GITHUB_ENV
echo "cacheSHA=$([[ ${{github.event_name}} = "push" ]] && git rev-parse --short HEAD || git rev-parse --short HEAD^)" >> $GITHUB_ENV
shell: bash

- name: update system
run: |
apt-get update
apt-get install --fix-missing -y sudo wget gnupg lsb-release
mkdir -p ${UCESB_DIR}
mkdir -p ${CCACHE_DIR}
shell: bash
48 changes: 48 additions & 0 deletions .github/actions/fsr/r3bbuild-steps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: build-steps
description: 'steps to build R3BRoot and ucesb'


inputs:
build-needed:
description: 'build process is needed'
required: false
default: 'true'

runs:
using: composite
steps:
- if: ${{ matrix.url }}
name: add other repos
run: |
cd $GITHUB_WORKSPACE
for url in ${{ matrix.url }};
do
git clone -b dev ${url}
done
shell: bash

- name: cmake config ${{ matrix.repos }}
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git submodule update --init --recursive
git clone https://github.com/R3BRootGroup/R3BRoot.git
cd ..
mv sofia/R3BRoot .
mv sofia R3BRoot
mv R3BRoot sofia
cd sofia
git clone https://github.com/R3BRootGroup/R3BFileSource.git
mv sofia/ucesb .
export UCESB_DIR=$GITHUB_WORKSPACE/ucesb/
echo "UCESB_DIR=$GITHUB_WORKSPACE/ucesb/" >> $GITHUB_ENV
echo ""
echo "path environment variable: $PATH\n"
echo ""
cmake --preset ${{ matrix.preset }} . -C "$GITHUB_WORKSPACE/cmake/CI_CD/configure_options.cmake"
shell: bash

- name: build ${{ matrix.repos }}
if: inputs.build-needed == 'true'
run: |
cmake --build ./build -- -j ${NUM_THREADS}
shell: bash
6 changes: 6 additions & 0 deletions .github/actions/pre-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ runs:
- name: set env variables
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
echo "UCESB_DIR=$GITHUB_WORKSPACE/ucesb/" >> $GITHUB_ENV
echo "ATIMA_DIR=$GITHUB_WORKSPACE/catima/" >> $GITHUB_ENV
echo "ATIMAPATH=$GITHUB_WORKSPACE/catima/install/" >> $GITHUB_ENV
if [ "${{ matrix.cpp }}" == "20" ]; then
export SIMPATH=${CVMDIR}/${{ matrix.os }}/fairsoft/cpp20/${{ matrix.fsv }}
echo "SIMPATH=${SIMPATH}" >> $GITHUB_ENV
Expand Down Expand Up @@ -39,12 +42,15 @@ runs:
run: |
apt-get update
apt-get install --fix-missing -y sudo wget gnupg lsb-release
sudo -H pip3 install --ignore-installed -U conan
wget https://cernbox.cern.ch/remote.php/dav/public-files/RmnTeeOZpYjCJQb/masterkey.gsi.de.pub
mkdir -p /etc/cvmfs/keys
mv masterkey.gsi.de.pub /etc/cvmfs/keys
cp .github/config/fairsoft.gsi.de.conf /etc/cvmfs/config.d
echo "CVMFS_USER=$(whoami)" >> /etc/cvmfs/config.d/fairsoft.gsi.de.conf
mkdir -p ${CVMDIR}
mount -t cvmfs fairsoft.gsi.de ${CVMDIR}
mkdir -p ${UCESB_DIR}
mkdir -p ${ATIMA_DIR}
mkdir -p ${CCACHE_DIR}
shell: bash
48 changes: 48 additions & 0 deletions .github/actions/r3bbuild-steps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: build-steps
description: 'steps to build R3BRoot and ucesb'


inputs:
build-needed:
description: 'build process is needed'
required: false
default: 'true'

runs:
using: composite
steps:
- if: ${{ matrix.url }}
name: add other repos
run: |
cd $GITHUB_WORKSPACE
for url in ${{ matrix.url }};
do
git clone -b dev ${url}
done
shell: bash

- name: cmake config ${{ matrix.repos }}
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git submodule update --init --recursive
git clone https://github.com/R3BRootGroup/R3BRoot.git
cd ..
mv sofia/R3BRoot .
mv sofia R3BRoot
mv R3BRoot sofia
cd sofia
git clone https://github.com/R3BRootGroup/R3BFileSource.git
mv sofia/ucesb .
export UCESB_DIR=$GITHUB_WORKSPACE/ucesb/
echo "UCESB_DIR=$GITHUB_WORKSPACE/ucesb/" >> $GITHUB_ENV
echo ""
echo "path environment variable: $PATH\n"
echo ""
cmake --preset ${{ matrix.preset }} . -C "$GITHUB_WORKSPACE/cmake/CI_CD/configure_options.cmake"
shell: bash

- name: build ${{ matrix.repos }}
if: inputs.build-needed == 'true'
run: |
cmake --build ./build -- -j ${NUM_THREADS}
shell: bash
18 changes: 2 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (C) 2019 University of Santiago de Compostela #
# Copyright (C) 2019 CEA-DAM-DIF, Université Paris-Saclay #
# Copyright (C) 2023 University of Coruña #
# Copyright (C) 2019-2025 Members of R3B Collaboration #
# Copyright (C) 2019-2026 Members of R3B Collaboration #
# #
# This software is distributed under the terms of the #
# GNU General Public Licence (GPL) version 3, #
Expand Down Expand Up @@ -113,21 +113,7 @@ jobs:
# A self-defined composite action for the cmake configuration and build
# of r3broot (along with necessary dep repos).
- name: Configure-build-sofia
run: |
git clone https://github.com/R3BRootGroup/R3BRoot.git
cd ..
mv sofia/R3BRoot .
mv sofia R3BRoot
mv R3BRoot sofia
cd sofia
git clone https://github.com/R3BRootGroup/macros.git
git clone https://github.com/R3BRootGroup/R3BFileSource.git
mv sofia/ucesb .
export UCESB_DIR=$GITHUB_WORKSPACE/ucesb/
echo "UCESB_DIR=$GITHUB_WORKSPACE/ucesb/" >> $GITHUB_ENV
cmake --preset ${{ matrix.preset }} . -B build -C cmake/CI_CD/configure_options.cmake -DCMAKE_CXX_STANDARD=${{ matrix.cpp }}
cd build
make -j${NUM_THREADS}
uses: './.github/actions/r3bbuild-steps'

# A self-defined composite action to perform the ctest and push the
# results to the cdash (cmake-dashborad). To fully show the errors and
Expand Down
Loading
Loading