-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
82 lines (75 loc) · 2.33 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
stages:
- pre-build
- build
- loadRESTLibs
- process
before_script:
- export USER="detector"
- pwd
- echo $CI_SERVER_HOST
- echo $CRONJOB
- export HOME=${CI_PROJECT_DIR}/install/
- if [ -d $HOME/.rest ]; then rm -Rf $HOME/.rest; fi
- if [ -f "/opt/root/install/bin/thisroot.sh" ]; then source /opt/root/install/bin/thisroot.sh; fi
- root-config --version
- if [ -f "/opt/geant4/install/bin/geant4.sh" ]; then source /opt/geant4/install/bin/geant4.sh; fi
- geant4-config --version
- if [ -d "/opt/garfieldpp/install" ]; then export GARFIELD_HOME=/opt/garfieldpp/install; fi
- if [ -d "/opt/garfieldpp/install" ]; then export HEED_DATABASE=$GARFIELD_HOME/Heed/heed++/database; fi
- if [ -d "/opt/garfieldpp/install" ]; then export LD_LIBRARY_PATH=$GARFIELD_HOME/lib:$LD_LIBRARY_PATH; fi
- ls $GARFIELD_HOME
- python3 --version
- apt update && apt install -y wget
clang-format:
stage: pre-build
script:
- echo "**$CRONJOB**"
- echo "**$CI_SERVER_HOST**"
- cd ${CI_PROJECT_DIR}/pipeline/clang-format/
- ./clangformattest.sh
# We execute only at a scheduled pipeline that defines CRONJOB variable
only:
variables:
- $CRONJOB
Validate Library:
stage: pre-build
script:
- python3 pipeline/validateLibrary.py .
except:
variables:
- $CRONJOB == "YES"
Build:
stage: build
script:
- echo "**${CI_PROJECT_DIR}**"
- rm -rf ${CI_PROJECT_DIR}/install
- git clone https://github.com/rest-for-physics/framework.git framework
- cd framework
- ./scripts/checkoutRemoteBranch.sh ${CI_COMMIT_BRANCH}
- git submodule init source/libraries/detector
- git submodule update source/libraries/detector
- cd source/libraries/detector/
- git checkout ${CI_COMMIT_BRANCH}
- cd ../../../
- mkdir build
- cd build
- cmake ../ -DREST_WELCOME=ON -DRESTLIB_DETECTOR=ON -DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR}/install
- make install -j2
except:
variables:
- $CRONJOB
artifacts:
paths:
- ${CI_PROJECT_DIR}/install
- ${CI_PROJECT_DIR}/framework
- ${CI_PROJECT_DIR}/framework/build
expire_in: 1 day
Load REST Libraries:
stage: loadRESTLibs
script:
- . ${CI_PROJECT_DIR}/install/thisREST.sh
- restRoot -b -q
except:
variables:
- $CRONJOB