-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
119 lines (113 loc) · 2.61 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
image: gitlab-registry.cern.ch/ci-tools/ci-worker:cc7
stages:
- build
- test
- deploy
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
before_script: &default_env
- source /cvmfs/sft.cern.ch/lcg/views/LCG_97python3/x86_64-centos7-gcc9-opt/setup.sh
build_setup:
tags: [cvmfs]
stage: build
before_script:
- yum install -y libgfortran make atlas
- *default_env
script:
- python setup.py build
artifacts:
paths: [build]
expire_in: 30min
test_setup:
tags: [cvmfs]
stage: test
needs: [build_setup]
script:
- python setup.py test
build_pip:
tags: [cvmfs]
stage: build
before_script:
- yum install -y libgfortran make atlas
- *default_env
- python -m venv venv
- source venv/bin/activate
artifacts:
paths: [venv]
expire_in: 30min
script:
- pip install .
test_pip:
tags: [cvmfs]
stage: test
needs: [build_pip]
before_script:
- *default_env
- source venv/bin/activate
script:
- cd tests
- pytest --junitxml=report.xml
artifacts:
paths: [tests/report.xml]
reports:
junit: tests/report.xml
builddoc:
tags: [cvmfs]
stage: test
needs: [build_pip]
before_script:
- *default_env
- source venv/bin/activate
- pip install sphinx
script:
- python setup.py build_sphinx
artifacts:
paths: [doc/build/html]
expose_as: "documentation"
deploydoc:
stage: deploy
needs: [builddoc, test_pip]
only:
refs:
- master
- schedules
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- rsync -r "doc/build/html/" "[email protected]:~/public_html/bamboo"
build_pip_622:
tags: [cvmfs]
stage: build
before_script:
- yum install -y libgfortran make atlas
- source /cvmfs/sft.cern.ch/lcg/views/LCG_98python3/x86_64-centos7-gcc9-opt/setup.sh
- python -m venv venv622
- source venv622/bin/activate
artifacts:
paths: [venv622]
expire_in: 30min
script:
- pip install .
test_pip_622:
tags: [cvmfs]
stage: test
needs: [build_pip_622]
before_script:
- source /cvmfs/sft.cern.ch/lcg/views/LCG_98python3/x86_64-centos7-gcc9-opt/setup.sh
- source venv622/bin/activate
script:
- cd tests
- pytest --junitxml=report_622.xml
artifacts:
paths: [tests/report_622.xml]
reports:
junit: tests/report_622.xml