This repository has been archived by the owner on Jan 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
.gitlab-ci.yml
100 lines (89 loc) · 1.99 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
## 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
.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*/lib/**/*.so # gempython
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
# publish RPMs somewhere?
# package and release RPMs
docs:slc6:
<<: *slc6setup
stage: deploy
only:
- tags
- triggers
- master
dependencies:
script:
- doxygen -s ${BUILD_HOME}/doc/cmsgemos.cfg >& /dev/null
coverage: '/Documentation coverage: \d+\.\d+/'
# deploy:
# dependencies:
# - buildrpm:slc6
# - docs:slc6
# script:
# - push RPMs to packagecloud.io
# - push RPMs to cern hosted repo
# - push docs to readthedocs.io
# - push docs to cern hosted repo