Skip to content

Commit 10afa3c

Browse files
committed
Update CIs and Readme
Added clang-format check Update templates for PRs and issues Added to the CIs the repo R3bFileSource
1 parent 8760ba7 commit 10afa3c

File tree

11 files changed

+300
-154
lines changed

11 files changed

+300
-154
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If applicable, add logs or screenshots to help explain your problem.
2222
**System information (please complete the following information):**
2323
- OS: [e.g. MacOS 12, Fedora 33, Ubuntu 20.04]
2424
- Compiler: [e.g. GCC 9.4, Clang 13]
25-
- Environment: [e.g. FairSoft version, FairRoot version, R3BRoot version]
25+
- Environment: [e.g. FairSoft version, FairRoot version]
2626

2727
**Additional context**
2828
Add any other context about the problem here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ Checklist:
88

99
* [ ] Rebased against `dev` branch
1010
* [ ] My name is in the resp. CONTRIBUTORS/AUTHORS file
11-
* [ ] Followed [the seven rules of great commit messages](https://chris.beams.io/posts/git-commit/#seven-rules)
11+
* [ ] Followed the [pull request guidlines](https://opensource.creativecommons.org/contributing-code/pr-guidelines/) and the [Git workflow](https://github.com/AnarManafov/GitWorkflow/blob/master/GitWorkflow.markdown)
12+
* [ ] Followed the [seven rules of great commit messages](https://chris.beams.io/posts/git-commit/#seven-rules)

.github/actions/cache-save/action.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: cache-save
2+
description: 'steps to cache R3BRoot and ucesb'
3+
4+
inputs:
5+
r3b-dev-key:
6+
description: 'key for r3b dev cache'
7+
required: false
8+
default: ''
9+
cache-name:
10+
description: 'repository name'
11+
required: true
12+
13+
runs:
14+
using: composite
15+
steps:
16+
- name: cache ucesb
17+
id: cache-ucesb
18+
uses: actions/cache/save@v3
19+
with:
20+
path: |
21+
${{ env.UCESB_DIR }}
22+
${{ github.workspace }}/build/_deps
23+
key: build-deps
24+
25+
- name: cache r3b
26+
if: matrix.save != 'false'
27+
id: cache-r3b
28+
uses: actions/cache/save@v3
29+
with:
30+
path: .ccache
31+
key: r3b-build-${{ inputs.cache-name }}-${{ inputs.r3b-dev-key }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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 }} (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+
-V -E "(run_gen_sim|run_digi|run_aladin_digi|califasim2|landreco|elsim)"
35+
shell: bash
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: install-deps
2+
description: 'steps to install deps'
3+
4+
inputs:
5+
r3b-dev-key:
6+
description: 'key for r3b dev cache'
7+
required: false
8+
default: ''
9+
cache-name:
10+
description: 'repository name'
11+
required: false
12+
default: 'false'
13+
14+
runs:
15+
using: composite
16+
steps:
17+
- name: cache ucesb
18+
if: github.event_name == 'pull_request'
19+
id: cache-ucesb
20+
uses: actions/cache/restore@v3
21+
with:
22+
path: |
23+
${{ env.UCESB_DIR }}
24+
${{ github.workspace }}/build/_deps
25+
key: build-deps
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@v3
31+
with:
32+
path: .ccache
33+
key: r3b-build-${{ inputs.cache-name }}-${{ inputs.r3b-dev-key }}
34+
restore-keys: |
35+
r3b-build-${{ inputs.cache-name }}-
36+
r3b-build-
37+
38+
- name: build ucesb
39+
if: steps.cache-ucesb.outputs.cache-hit != 'true'
40+
run: |
41+
echo "ucesb directory is set as ${UCESB_DIR}"
42+
export LD_LIBRARY_PATH="${SIMPATH}/lib/:${LD_LIBRARY_PATH}"
43+
git clone https://git.chalmers.se/expsubphys/ucesb.git ${UCESB_DIR}
44+
cd ${UCESB_DIR} && make -j${NUM_THREADS} empty/empty
45+
shell: bash

.github/actions/pre-build/action.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
export SIMPATH=${CVMDIR}/debian10/fairsoft/nov22p1
12+
echo "SIMPATH=${SIMPATH}" >> $GITHUB_ENV
13+
echo "FAIRROOTPATH=${CVMDIR}/debian10/fairroot/v18.8.0_fs_nov22p1" >> $GITHUB_ENV
14+
echo "${SIMPATH}/bin" >> $GITHUB_PATH
15+
# variables for ccache
16+
echo "CCACHE_BASEDIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
17+
echo "CCACHE_DIR=${GITHUB_WORKSPACE}/.ccache" >> $GITHUB_ENV
18+
echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV
19+
echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV
20+
echo "SOURCEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
21+
echo "BUILDDIR=$GITHUB_WORKSPACE/build" >> $GITHUB_ENV
22+
echo "cacheSHA=$([[ ${{github.event_name}} = "push" ]] && git rev-parse --short HEAD || git rev-parse --short HEAD^)" >> $GITHUB_ENV
23+
shell: bash
24+
25+
26+
- name: mount cvmfs
27+
run: |
28+
apt-get install -y ccache
29+
wget https://cernbox.cern.ch/remote.php/dav/public-files/RmnTeeOZpYjCJQb/masterkey.gsi.de.pub
30+
mv masterkey.gsi.de.pub /etc/cvmfs/keys
31+
cp .githubfiles/fairsoft.gsi.de.conf /etc/cvmfs/config.d
32+
mkdir -p ${CVMDIR}
33+
mount -t cvmfs fairsoft.gsi.de ${CVMDIR}
34+
mkdir -p ${UCESB_DIR}
35+
mkdir -p ${CCACHE_DIR}
36+
echo $PATH
37+
shell: bash

0 commit comments

Comments
 (0)