forked from cms-gem-daq-project/cmsgemos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
114 lines (103 loc) · 2.9 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
## GitLab Continuous Integration YAML file
before_script:
after_script:
.common_variables: &common_variables
BUILD_HOME: /builds/$CI_PROJECT_NAMESPACE
XDAQ_OS: linux
XDAQ_ROOT: /opt/xdaq
LD_LIBRARY_PATH: /opt/xdaq/lib
EOS_BASE_WEB_DIR: /eos/project/c/cmsgemdaq/www
EOS_COMMON_WEB_DIR: cmsgemdaq
EOS_SITE_WEB_DIR: ${PACKAGE_NAME}
.slc6setup: &slc6setup
image: gitlab-registry.cern.ch/cms-gem-daq-project/gemdaq_ci_worker:slc6
variables: *common_variables
.cc7setup: &cc7setup
image: gitlab-registry.cern.ch/cms-gem-daq-project/custom_ci_worker:cc7
variables: *common_variables
stages:
- build
- test
- deploy
- cleanup
build:slc6:
<<: *slc6setup
only:
- /^issue-.*$/
- /^.*.hotfix.*$/
- /^release.*$/
- master
- tags
tags:
stage: build
before_script:
# - ${BUILD_HOME}/config/build/setupMachine.sh
# - . /etc/profile/xdaq.sh
- . ${BUILD_HOME}/cmsgemos/setup/etc/profile.d/gemdaqenv.sh
- . ${BUILD_HOME}/cmsgemos/setup/paths.sh
script:
- make all -j8
- make rpm -j8
environment:
variables:
cache:
artifacts:
paths:
- gem*/lib/**/*.so
- gem*/rpm/**/*.rpm
- gem*/rpm/**/*.tar.gz
- gem*/rpm/**/*.zip
- gem*/rpm/**/*.tgz
- gem*/rpm/**/*.tbz2
coverage: '/Code coverage: \d+\.\d+/'
# run tests using the binary built before
test:slc6:
<<: *slc6setup
stage: test
dependencies:
- build:slc6
script:
- ${BUILD_HOME}/runmytests.sh
coverage: '/Testing coverage: \d+\.\d+/'
# generate RPMs
buildrpm:slc6:
<<: *slc6setup
stage: deploy
only:
- tags
- triggers
dependencies:
- build:slc6
script:
- make rpm
- glob gem*/rpm/**/*.rpm
# package and release RPMs
docs:
<<: *slc6setup
stage: deploy
only:
- tags
- triggers
- master
dependencies:
script:
- doxygen -s ${BUILD_HOME}/doc/cmsgemos.cfg >& /dev/null
coverage: '/Documentation coverage: \d+\.\d+/'
# deploy:
# only:
# - tags
# dependencies:
# - buildrpm:slc6
# - buildrpm:cc7
# - docs # only build docs once, don't need arch versioned docs...
# script:
# - push python packages to pypi/conda
# - push RPMs to packagecloud.io
# - push RPMs to $EOS_WEB_DIR/release/${shorttag}/${OS_VER}/{base,updates,test,devel}, trigger createrepo --update?
# - if $EOS_WEB_DIR/release/${shorttag}/${OS_VER}/base doesn't exist, create and run createrepo to generate structure
# - if tag is x.y.0, push RPMs to $EOS_WEB_DIR/release/${shorttag}/${OS_VER}/base
# - if tag is x.y.z, z > 0 push RPMs to $EOS_WEB_DIR/release/${shorttag}/${OS_VER}/updates
# - if tag is x.y.z-anything, push RPMs to $EOS_WEB_DIR/release/${shorttag}/${OS_VER}/{test,devel}
# - push sphinx/rst/md/rtd docs to readthedocs.io
# - push sphinx/rst/md/rtd docs to $EOS_WEB_DIR/docs/${fulltag}, update doc main page index
# - push doxygen to $EOS_WEB_DIR/release/${shorttag}/api/html