forked from rsmith54/FactoryTools
/
.gitlab-ci.yml
127 lines (112 loc) · 3.47 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
image: lukasheinrich/recast_cvmfs_assisted
before_script:
# Install ssh-agent if not already installed, it is required by Docker.
# (change apt-get to yum if you use a CentOS-based image)
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$SSH_PRIVATE_KEY")
#- echo "${SSH_PRIVATE_KEY}" > test.key; chmod 600 test.key
# For Docker builds disable host key checking. Be aware that by adding that
# you are suspectible to man-in-the-middle attacks.
# WARNING: Use this only with the Docker executor, if you use it with shell
# you will overwrite your user's SSH config.
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
stages:
- setup
- build
- test
setup:
stage: setup
tags:
- cvmfs
script:
- bash
- pwd;ls
- rm -rf testArea || echo ignore; mkdir testArea; cd testArea;
- ln -s ../../FactoryTools FactoryTools;
- pwd; ls;
- source FactoryTools/util/setup_CI.sh
- more ~/.ssh/config
- grep "#!!" FactoryTools/README.md > INSTALL
- more INSTALL
- source INSTALL
# - rc find_packages
# - rc compile
artifacts:
paths:
- testArea/
compile:
stage: build
tags:
- cvmfs
script:
- bash
- pwd;ls
- cd testArea/
- source FactoryTools/util/setup_CI.sh
- rc find_packages
- rc compile
artifacts:
paths:
- testArea/
test:
stage: test
tags:
- cvmfs
script:
- bash
- pwd;ls
- cd testArea/
- source FactoryTools/util/setup_CI.sh
- rc find_packages
- rc compile
- scp -r atlzerol@lxplus.cern.ch:/afs/cern.ch/work/r/rsmith/public/factoryToolsSample/ factoryToolsSample
- python FactoryTools/util/run_zl.py --doOverwrite --nevents 10 --verbosity debug --inputDS factoryToolsSample/
artifacts:
paths:
- testArea/submit_dir/data-trees/*root
testSystematics:
stage: test
tags:
- cvmfs
script:
- bash
- pwd;ls
- cd testArea/
- source FactoryTools/util/setup_CI.sh
- rc find_packages
- rc compile
- scp -r atlzerol@lxplus.cern.ch:/afs/cern.ch/work/r/rsmith/public/factoryToolsSample/ factoryToolsSample
- python FactoryTools/util/run_zl.py --doOverwrite --doSystematics --nevents 10 --submitDir systematicsTest --verbosity debug --inputDS factoryToolsSample/
artifacts:
paths:
- testArea/systematicsTest/data-trees/*root
testValgrind:
stage: test
tags:
- cvmfs
script:
- bash
- pwd;ls
- cd testArea/
- source FactoryTools/util/setup_CI.sh
- rc find_packages
- rc compile
- wget http://valgrind.org/downloads/valgrind-3.9.0.tar.bz2
- tar xvjf valgrind-3.9.0.tar.bz2
- cd valgrind-3.9.0
- ./configure --prefix=$HOME/valgrind
- make
- make install
- cd ..
- scp -r atlzerol@lxplus.cern.ch:/afs/cern.ch/work/r/rsmith/public/factoryToolsSample/ factoryToolsSample
- wget http://svn.python.org/projects/python/trunk/Misc/valgrind-python.supp
- ~/valgrind/bin/valgrind -q --leak-check=full --error-exitcode=0 --suppressions=valgrind-python.supp python FactoryTools/util/run_zl.py --doOverwrite --nevents 10 --inputDS factoryToolsSample/ &> valgrind.log
- grep "possibly lost" valgrind.log
- grep "definitely lost" valgrind.log
artifacts:
paths:
- testArea/valgrind.log