Skip to content

Commit 81f53f2

Browse files
committed
feat(github):Update github workflows
Minor change Remove debian13 Right includes for atima Minor change Changed the way to run CI tests for other systems Minor change Changed gtest conditions Changed gtest conditions Minor change Change conan installation Change conan installation Commented conan installation Update ctest script Update other CIs restore cache Minor change Fix problem with R3BUcesbSource.cxx Define const for twim geo fix running problems fix running problems Update ext_h101_unpack.h Adeed debian14_cpp17_feb26p1_v19.0.1 Changed conditions for gtest Update CI for debian Delete old CI tests Minor change Minor change cmakelist Added missing include and clang-format Added missing include Added missing include
1 parent 73af343 commit 81f53f2

19 files changed

Lines changed: 267 additions & 390 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: ctest-cdash
2+
description: 'steps to perform ctest and submit the report to cdash'
3+
4+
inputs:
5+
repo:
6+
description: 'repository name'
7+
required: true
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: set env variables for push
13+
if: github.event_name == 'push'
14+
run: |
15+
echo "TEST_MODEL=Continuous" >> $GITHUB_ENV
16+
echo "TEST_NAME=\"${{ inputs.repo }} (commit ${cacheSHA})\"" >> $GITHUB_ENV
17+
shell: bash
18+
19+
- name: set env variables for pull request
20+
if: github.event_name != 'push'
21+
run: |
22+
echo "TEST_MODEL=Experimental" >> $GITHUB_ENV
23+
export PULL_NR=${{ github.event.number }}
24+
echo "TEST_NAME=\"${{ inputs.repo }}_${{ matrix.sys }} (pull request No.${PULL_NR})\"" >> $GITHUB_ENV
25+
shell: bash
26+
27+
- name: running ctest
28+
run: |
29+
source $GITHUB_WORKSPACE/util/generate_geo_test.sh
30+
ctest -S cmake/CI_CD/CDash.cmake -DBUILD_J=${NUM_THREADS}\
31+
-DTEST_MODEL=${TEST_MODEL}\
32+
-DTEST_NAME=${{ env.TEST_NAME }}\
33+
-DSITE_NAME="Github hosted (${{ github.repository }})"\
34+
--force-new-ctest-process \
35+
-V -E "(run_gen_sim|run_digi|run_aladin_digi|califasim2|landreco|elsim)"
36+
shell: bash
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: install-deps
2+
description: 'steps to install deps'
3+
4+
inputs:
5+
cache-name:
6+
description: 'repository name'
7+
required: false
8+
default: 'false'
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: cache deps
14+
if: github.event_name == 'pull_request'
15+
id: cache-ucesb
16+
uses: actions/cache/restore@v5
17+
with:
18+
path: |
19+
${{ env.UCESB_DIR }}
20+
${{ github.workspace }}/build/_deps
21+
${{ env.ATIMA_DIR }}
22+
${{ env.ATIMAPATH }}
23+
key: build-deps-${{ matrix.sys }}
24+
restore-keys: |
25+
build-deps-${{ matrix.sys }}
26+
27+
- name: cache r3b
28+
if: inputs.cache-name != 'false' && github.event_name == 'pull_request'
29+
id: cache-r3b
30+
uses: actions/cache/restore@v5
31+
with:
32+
path: .ccache
33+
key: r3b-build-${{ inputs.cache-name }}-${{ matrix.sys }}
34+
restore-keys: |
35+
r3b-build-${{ inputs.cache-name }}-${{ matrix.sys }}
36+
r3b-build-
37+
r3b-build-
38+
39+
- name: build ucesb
40+
if: steps.cache-ucesb.outputs.cache-hit == ''
41+
run: |
42+
echo "UCESB directory is set as ${UCESB_DIR}"
43+
export LD_LIBRARY_PATH="${SIMPATH}/lib/:${LD_LIBRARY_PATH}"
44+
git clone https://git.chalmers.se/expsubphys/ucesb.git ${UCESB_DIR}
45+
cd ${UCESB_DIR} && make -j${NUM_THREADS} empty/empty
46+
echo "ATIMA directory is set as ${ATIMAPATH}"
47+
git clone https://github.com/hrosiak/catima.git ${ATIMA_DIR}
48+
cd ${ATIMA_DIR} && mkdir build && mkdir install && cd build
49+
cmake ../ -DCMAKE_INSTALL_PREFIX=../install/ && make -j${NUM_THREADS} && make install
50+
shell: bash
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: pre build
2+
description: 'steps before building R3BRoot'
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: set env variables
8+
run: |
9+
git config --global --add safe.directory $GITHUB_WORKSPACE
10+
echo "UCESB_DIR=$GITHUB_WORKSPACE/ucesb/" >> $GITHUB_ENV
11+
echo "ATIMA_DIR=$GITHUB_WORKSPACE/catima/" >> $GITHUB_ENV
12+
echo "ATIMAPATH=$GITHUB_WORKSPACE/catima/install/" >> $GITHUB_ENV
13+
export SIMPATH=$FAIRSOFTPATH
14+
echo "SIMPATH=${SIMPATH}" >> $GITHUB_ENV
15+
echo "FAIRROOTPATH=$FAIRROOTPATH" >> $GITHUB_ENV
16+
echo "${SIMPATH}/bin" >> $GITHUB_PATH
17+
# variables for ccache
18+
echo "CCACHE_BASEDIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
19+
echo "CCACHE_DIR=${GITHUB_WORKSPACE}/.ccache" >> $GITHUB_ENV
20+
echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV
21+
echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV
22+
echo "SOURCEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
23+
echo "BUILDDIR=$GITHUB_WORKSPACE/build" >> $GITHUB_ENV
24+
echo "cacheSHA=$([[ ${{github.event_name}} = "push" ]] && git rev-parse --short HEAD || git rev-parse --short HEAD^)" >> $GITHUB_ENV
25+
shell: bash
26+
27+
- name: mount cvmfs
28+
run: |
29+
apt-get update
30+
apt-get install --fix-missing -y sudo gnupg lsb-release
31+
lsb_release -a
32+
# apt-get install --fix-missing -y sudo python3-venv
33+
# python3 -m venv /tmp/conan-venv
34+
# /tmp/conan-venv/bin/python -m pip install --no-cache-dir --upgrade pip conan
35+
# echo "/tmp/conan-venv/bin" >> $GITHUB_PATH
36+
# conan --version
37+
mkdir -p ${UCESB_DIR}
38+
mkdir -p ${ATIMA_DIR}
39+
mkdir -p ${CCACHE_DIR}
40+
shell: bash

.github/actions/r3bbuild-steps-wfr/action.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,9 @@ runs:
2121
- name: Configure CMake
2222
run: |
2323
git config --global --add safe.directory $GITHUB_WORKSPACE
24-
export UCESB_DIR=/opt/ucesb/
25-
echo "UCESB_DIR=/opt/ucesb/" >> $GITHUB_ENV
26-
export SIMPATH=/opt/FairSoft
27-
echo "SIMPATH=${SIMPATH}" >> $GITHUB_ENV
28-
export FAIRROOTPATH=/opt/FairRoot
29-
echo "FAIRROOTPATH=${FAIRROOTPATH}" >> $GITHUB_ENV
30-
echo "${SIMPATH}/bin" >> $GITHUB_PATH
31-
echo "CCACHE_BASEDIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
32-
echo "CCACHE_DIR=${GITHUB_WORKSPACE}/.ccache" >> $GITHUB_ENV
33-
echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV
34-
echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV
35-
echo "SOURCEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
36-
echo "BUILDDIR=$GITHUB_WORKSPACE/build" >> $GITHUB_ENV
3724
echo "cacheSHA=$([[ ${{github.event_name}} = 'push' ]] && git rev-parse --short HEAD || git rev-parse --short HEAD^)" >> $GITHUB_ENV
3825
git submodule update --init --recursive
39-
git clone https://github.com/R3BRootGroup/macros.git
40-
if [[ "${{ matrix.os }}" == "fedora42" || "${{ matrix.os }}" == "ubuntu2504" || "${{ matrix.os }}" == "ubuntu2604" ]]; then
41-
unset UCESB_DIR
42-
echo "UCESB_DIR=" >> $GITHUB_ENV
43-
fi
44-
45-
if [[ "${{ matrix.os }}" == "ubuntu2404" || "${{ matrix.os }}" == "ubuntu2504" ]]; then
46-
cmake --preset ${{ matrix.preset }} . -C "$GITHUB_WORKSPACE/cmake/CI_CD/configure_options.cmake" -DCMAKE_CXX_STANDARD=${{ matrix.cpp }} -DFETCH_GTEST=OFF
47-
else
48-
cmake --preset ${{ matrix.preset }} . -C "$GITHUB_WORKSPACE/cmake/CI_CD/configure_options.cmake" -DCMAKE_CXX_STANDARD=${{ matrix.cpp }} -DFETCH_GTEST=ON
49-
fi
26+
cmake --preset ${{ matrix.preset }} . -C "$GITHUB_WORKSPACE/cmake/CI_CD/configure_options.cmake"
5027
shell: bash
5128

5229
- name: Build

.github/workflows/main-nightly-sim.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ jobs:
6565
# Here are the groups of repositories that need to be downloaded inside
6666
# r3broot. Each group is used by only one job.
6767
repos: [ r3broot, glad-tpc, sofia-frs-asy ]
68-
os: [ debian11, debian12 ] # ubuntu24.04 ]
69-
fsv: [ jan24p1, jan24p5 ]
70-
cpp: [ 17 ]
68+
sys: [ debian13_cpp17_feb26p1_v19.0.1 ]
7169

7270
# The list under "include" defines some properties for each group:
7371
#
@@ -119,18 +117,13 @@ jobs:
119117
# tool-kits for the building, such as clang-tidy and cvmfs. For more
120118
# information, please visit the Docker repository at Dockerhub.
121119
container:
122-
image: r3bdockers/${{ matrix.os }}
123-
volumes:
124-
- /tmp:/cvmfs
120+
image: r3bdockers/${{ matrix.sys }}
125121
env:
126-
CVMDIR: /cvmfs/fairsoft.gsi.de
127122
# Specifying the number of threads available for the building and
128123
# testing. Github hosted runners can have at most 4 cores. The number
129124
# of the cores can be increased with a larger runner, thus increasing
130125
# the speed of the run.
131126
NUM_THREADS: 4
132-
# Options for the Docker container to be run with cvmfs.
133-
options: --user root --privileged --ulimit nofile=10000:10000 --cap-add SYS_ADMIN --device /dev/fuse
134127

135128
# Each job contains different steps that are executed sequentially. Each
136129
# step could be multiple shell commands or a composite action either from
@@ -142,14 +135,20 @@ jobs:
142135
# This allows all commits of all branches to be fetched.
143136
fetch-depth: 0
144137

138+
# Restore ccache
139+
- name: Restore cache
140+
uses: actions/cache@v5
141+
with:
142+
path: ~/.ccache
143+
key: ccache-${{ matrix.cache }}-${{ matrix.sys }}
144+
restore-keys: |
145+
ccache-${{ matrix.cache }}-${{ matrix.sys }}
146+
145147
# A self-defined composite action. It sets multiple necessary environment
146148
# variables and mounts the cmvfs folder of fairroot and fairsoft.
147149
- name: pre-build
148-
uses: './.github/actions/pre-build'
150+
uses: './.github/actions/pre-build-wfr'
149151

150-
- name: set custom CMake path
151-
run: echo "/usr/local/bin" >> $GITHUB_PATH && cmake --version && export PATH=/usr/local/bin:$PATH && cmake --version
152-
153152
# A self-defined composite action, which restores the caches of
154153
# dependencies and builds and install them if the cache doesn't exist.
155154
# The two inputs for this action, r3b-dev-key and cache-name, determine
@@ -180,7 +179,7 @@ jobs:
180179
# are rerun after 'make clean'.
181180
- name: ctest-cdash
182181
if: always()
183-
uses: './.github/actions/ctest-cdash'
182+
uses: './.github/actions/ctest-cdash-wfr'
184183
with:
185184
repo: ${{ matrix.repos }}
186185

.github/workflows/main-nightly.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ jobs:
6565
# Here are the groups of repositories that need to be downloaded inside
6666
# r3broot. Each group is used by only one job.
6767
repos: [ r3broot, glad-tpc, sofia-frs-asy ]
68-
os: [ debian11, debian12 ] # ubuntu24.04 ]
69-
fsv: [ jan24p1, jan24p5 ]
70-
cpp: [ 17 ]
68+
sys: [ debian13_cpp17_feb26p1_v19.0.1 ]
7169

7270
# The list under "include" defines some properties for each group:
7371
#
@@ -121,18 +119,13 @@ jobs:
121119
# tool-kits for the building, such as clang-tidy and cvmfs. For more
122120
# information, please visit the Docker repository at Dockerhub.
123121
container:
124-
image: r3bdockers/${{ matrix.os }}
125-
volumes:
126-
- /tmp:/cvmfs
122+
image: r3bdockers/${{ matrix.sys }}
127123
env:
128-
CVMDIR: /cvmfs/fairsoft.gsi.de
129124
# Specifying the number of threads available for the building and
130125
# testing. Github hosted runners can have at most 4 cores. The number
131126
# of the cores can be increased with a larger runner, thus increasing
132127
# the speed of the run.
133128
NUM_THREADS: 4
134-
# Options for the Docker container to be run with cvmfs.
135-
options: --user root --privileged --ulimit nofile=10000:10000 --cap-add SYS_ADMIN --device /dev/fuse
136129

137130
# Each job contains different steps that are executed sequentially. Each
138131
# step could be multiple shell commands or a composite action either from
@@ -143,14 +136,23 @@ jobs:
143136
with:
144137
# This allows all commits of all branches to be fetched.
145138
fetch-depth: 0
139+
140+
# Restore ccache
141+
- name: Restore cache
142+
uses: actions/cache@v5
143+
with:
144+
path: ~/.ccache
145+
key: ccache-${{ matrix.cache }}-${{ matrix.sys }}
146+
restore-keys: |
147+
ccache-${{ matrix.cache }}-${{ matrix.sys }}
146148
147149
# A self-defined composite action. It sets multiple necessary environment
148150
# variables and mounts the cmvfs folder of fairroot and fairsoft.
149151
- name: pre-build
150-
uses: './.github/actions/pre-build'
152+
uses: './.github/actions/pre-build-wfr'
151153

152-
- name: set custom CMake path
153-
run: echo "/usr/local/bin" >> $GITHUB_PATH && cmake --version && export PATH=/usr/local/bin:$PATH && cmake --version
154+
# - name: set custom CMake path
155+
# run: echo "/usr/local/bin" >> $GITHUB_PATH && cmake --version && export PATH=/usr/local/bin:$PATH && cmake --version
154156

155157
# A self-defined composite action, which restores the caches of
156158
# dependencies and builds and install them if the cache doesn't exist.
@@ -164,7 +166,7 @@ jobs:
164166
# "pull_request" and disabled for the merge event.
165167
- name: install dependencies
166168
id: restore-cache
167-
uses: './.github/actions/install-deps'
169+
uses: './.github/actions/install-deps-wfr'
168170
with:
169171
cache-name: ${{ matrix.cache }}
170172

@@ -179,7 +181,7 @@ jobs:
179181
# are rerun after 'make clean'.
180182
- name: ctest-cdash
181183
if: always()
182-
uses: './.github/actions/ctest-cdash'
184+
uses: './.github/actions/ctest-cdash-wfr'
183185
with:
184186
repo: ${{ matrix.repos }}
185187

.github/workflows/main.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#
4545
# SPDX-License-Identifier: LGPL-3.0-or-later
4646

47-
name: CI-CD-C++17
47+
name: CI-CD-GSI
4848

4949
# Controls when the action will run.
5050
on:
@@ -91,23 +91,14 @@ jobs:
9191
matrix:
9292
# Here are the groups of repositories that need to be downloaded inside
9393
# r3broot. Each group is used by only one job.
94-
repos: [ r3broot, glad-tpc, sofia-frs-asy, r3broot-conan ]
95-
os: [ debian11, debian12 , debian13]
96-
fsv: [ jan24p5 , jan24p6]
94+
repos: [ r3broot, sofia-frs-asy-glad-tpc, r3broot-conan ]
95+
os: [ debian11, debian12 ]
96+
fsv: [ jan24p5 ]
9797
cpp: [ 17 ]
9898
exclude:
9999
- os: debian11
100-
fsv: jan24p6
101-
- os: debian11
102-
fsv: jan24p5
103-
repos: r3broot-conan
104-
- os: debian12
105100
fsv: jan24p5
106101
repos: r3broot-conan
107-
- os: debian12
108-
fsv: jan24p6
109-
- os: debian13
110-
fsv: jan24p5
111102

112103
# The list under "include" defines some properties for each group:
113104
#
@@ -137,14 +128,9 @@ jobs:
137128
# This job is only for testing R3BRoot without downloading any
138129
# dependencies.
139130
- repos: r3broot
140-
# The job for testing with glad-tpc
141-
- repos: glad-tpc
142-
url: https://github.com/R3BRootGroup/glad-tpc.git
143-
cache: glad-tpc
144-
# skip-save: true
145-
# The job for testing with sofia, frs and asyeos dependencies. All three
131+
# The job for testing with sofia, frs, asyeos and glad-tpc dependencies. All four
146132
# repositories are downloaded and run together in the job.
147-
- repos: sofia-frs-asy
133+
- repos: sofia-frs-asy-glad-tpc
148134
# If more than one repos needs to be downloaded in a job. "url" needs
149135
# to be a space separated list of urls using the operator ">-". Append
150136
# more urls to this list if more repos need to be added.
@@ -153,6 +139,7 @@ jobs:
153139
https://github.com/R3BRootGroup/sofia.git
154140
https://github.com/R3BRootGroup/frs.git
155141
https://github.com/R3BRootGroup/asyeos.git
142+
https://github.com/R3BRootGroup/glad-tpc.git
156143
https://github.com/R3BRootGroup/R3BFileSource.git
157144
# Using own cache file
158145
cache: other-repos

0 commit comments

Comments
 (0)