forked from sherpa/sherpa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
191 lines (168 loc) · 6.17 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
stages:
- build and package
- deploy
- test deploy
.template-conda-build: &template_conda_build
stage: build and package
script:
- export SHERPA_FULL_VERSION=$(git describe --tags --always)
- export SHERPA_VERSION=`echo $SHERPA_FULL_VERSION | awk '{split($0,a,"-"); print a[1]}'`
- export SHERPA_BUILD_NUMBER=`echo $SHERPA_FULL_VERSION | awk '{split($0,a,"-"); print a[2]}'`
- conda build --output-folder /tmp/packages recipes/conda
- cp -r /tmp/packages .
artifacts:
expire_in: "2 weeks"
paths:
- packages/
.template-linux-conda-build: &template_linux_conda_build
<<: *template_conda_build
image: registry.gitlab.com/olaurino/sherpa-docker-build:master
tags:
- sherpa
.template-macos-conda-build: &template_macos_conda_build
<<: *template_conda_build
tags:
- sherpa-macos-build
macos-python2.7-conda-build:
<<: *template_macos_conda_build
variables:
SHERPA_PYTHON_VERSION: "2.7.*"
macos-python3.5-conda-build:
<<: *template_macos_conda_build
variables:
SHERPA_PYTHON_VERSION: "3.5.*"
macos-python3.6-conda-build:
<<: *template_macos_conda_build
variables:
SHERPA_PYTHON_VERSION: "3.6.*"
macos-python3.7-conda-build:
<<: *template_macos_conda_build
variables:
SHERPA_PYTHON_VERSION: "3.7.*"
linux-python2.7-conda-build:
<<: *template_linux_conda_build
variables:
SHERPA_PYTHON_VERSION: '2.7.*'
linux-python3.5-conda-build:
<<: *template_linux_conda_build
variables:
SHERPA_PYTHON_VERSION: '3.5.*'
linux-python3.6-conda-build:
<<: *template_linux_conda_build
variables:
SHERPA_PYTHON_VERSION: '3.6.*'
linux-python3.7-conda-build:
<<: *template_linux_conda_build
variables:
SHERPA_PYTHON_VERSION: '3.7.*'
conda:
stage: deploy
tags:
- sherpa
image: registry.gitlab.com/olaurino/sherpa-docker-build:master
dependencies:
- linux-python2.7-conda-build
- linux-python3.5-conda-build
- linux-python3.6-conda-build
- linux-python3.7-conda-build
- macos-python2.7-conda-build
- macos-python3.5-conda-build
- macos-python3.6-conda-build
- macos-python3.7-conda-build
script:
- echo $CONDA_UPLOAD_TOKEN
- anaconda -t $CONDA_UPLOAD_TOKEN upload -u sherpa -c dev packages/linux-64/sherpa* --force
- anaconda -t $CONDA_UPLOAD_TOKEN upload -u sherpa -c dev packages/osx-64/sherpa* --force
.template-linux-test: &template-linux-test
stage: test deploy
image: centos:6
variables:
PAGER: 'less'
before_script:
- yum install -y -q bzip2 libXext libSM libXrender curl less
script:
- cd /
- curl -LO -k http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
- curl -LO -k https://github.com/sherpa/sherpa-test-data/archive/master.zip # Hack, gitlab can't checkout the submodule from github
- bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda
- export PATH=~/miniconda/bin:$PATH
# Numpy 1.16 emits a deprecation warning that trips the pytest package pinned by astropy 2.
# By installing numpy 1.15 we work around the issue, which is the only failure recorded with numpy 1.16
# Python 2.7 won't be supported for long anyway.
- conda update -qq -y --all
- conda create -n test --yes -q -c sherpa/label/dev python=2 astropy sherpa matplotlib numpy=1.15 # How to make sure it's the correct version?
- source activate test
- pip install /master.zip
- sherpa_smoke -f astropy
- sherpa_test
- conda create -n test35 --yes -q -c sherpa/label/dev python=3.5 astropy sherpa matplotlib # How to make sure it's the correct version?
- source activate test35
- pip install /master.zip
- sherpa_smoke -f astropy
- sherpa_test
- conda create -n test36 --yes -q -c sherpa/label/dev python=3.6 astropy sherpa matplotlib # How to make sure it's the correct version?
- source activate test36
- pip install /master.zip
- sherpa_smoke -f astropy
- sherpa_test
- conda create -n test37 --yes -q -c sherpa/label/dev python=3.7 astropy sherpa matplotlib # How to make sure it's the correct version?
- source activate test37
- pip install /master.zip
- sherpa_smoke -f astropy
- sherpa_test
.template-macos-test: &template-macos-test
tags:
- sherpa-macos-build
stage: test deploy
script:
- cd /tmp
- curl -LO -k https://github.com/sherpa/sherpa-test-data/archive/master.zip
- conda update -qq -y --all
- conda create -n test --yes -q -c sherpa/label/dev python=2 astropy sherpa matplotlib numpy=1.15 # How to make sure it's the correct version?
- conda activate test
- pip install master.zip
- sherpa_smoke -f astropy
- sherpa_test
- conda create -n test35 --yes -q -c sherpa/label/dev python=3.5 astropy sherpa matplotlib # How to make sure it's the correct version?
- conda activate test35
- pip install master.zip
- sherpa_smoke -f astropy
- sherpa_test
- conda create -n test36 --yes -q -c sherpa/label/dev python=3.6 astropy sherpa matplotlib # How to make sure it's the correct version?
- conda activate test36
- pip install master.zip
- sherpa_smoke -f astropy
- sherpa_test
- conda create -n test37 --yes -q -c sherpa/label/dev python=3.7 astropy sherpa matplotlib # How to make sure it's the correct version?
- conda activate test37
- pip install master.zip
- sherpa_smoke -f astropy
- sherpa_test
centos6-test:
<<: *template-linux-test
centos7-test:
<<: *template-linux-test
image: centos:7
ubuntu14-test:
<<: *template-linux-test
image: ubuntu:14.04
before_script:
- apt-get update && apt-get install -y -q bzip2 curl libxext6 libsm6 libxrender1 less
ubuntu16-test:
<<: *template-linux-test
image: ubuntu:16.04
before_script:
- apt-get update && apt-get install -y -q bzip2 curl libxext6 libsm6 libxrender1 less
ubuntu18-test:
<<: *template-linux-test
image: ubuntu:18.04
before_script:
- apt-get update && apt-get install -y -q bzip2 curl libxext6 libsm6 libxrender1 less
fedora29-test:
<<: *template-linux-test
image: fedora:29
fedora30-test:
<<: *template-linux-test
image: fedora:30
macos-10.13-test:
<<: *template-macos-test