-
Notifications
You must be signed in to change notification settings - Fork 37
/
config.yml
188 lines (173 loc) · 4.96 KB
/
config.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
version: 2
checkout:
post:
- ./ci-support/checkout_merge_commit.sh
aliases:
- &setup_miniconda
name: setup_miniconda
command: |
mkdir -p workspace
git clone -b validateNightly [email protected]:CDAT/cdat workspace/cdat --depth=1
python workspace/cdat/scripts/install_miniconda.py -w $WORKDIR -p 'py3.6'
- &create_conda_env
name: create_conda_env
environment:
PKGS: "vcs vcsaddons mesalib matplotlib scipy cia testsrunner 'proj4<5' 'vtk-cdat>8.1' libnetcdf=4.6.2"
CHANNELS: "-c cdat/label/v81 -c conda-forge -c pcmdi"
command: |
export PATH=$WORKDIR/miniconda/bin:$PATH
conda config --set always_yes yes --set changeps1 no
conda update -y -q conda
conda config --set anaconda_upload no
if [[ $PY_VER = "py2" ]]; then
conda create -q -n $PY_VER $CHANNELS "python<3" $PKGS $FFMPEG
else
conda create -q -n $PY_VER $CHANNELS "python=3.6" $PKGS $FFMPEG $COVERAGE_PKGS
fi
- &setup_pmp
name: setup_pmp
command: |
export PATH=$WORKDIR/miniconda/bin:$PATH
source activate $PY_VER
python setup.py install
- &run_pmp_tests
name: run_pmp_tests
command: |
export PATH=$WORKDIR/miniconda/bin:$PATH
export CDAT_ANONYMOUS_LOG=False
export CDAT_SETUP_PATH=${HOME}
source activate $PY_VER
python run_tests.py -H -v2 $COVERAGE
RESULT=$?
echo "*** $PY_VER test result: "${RESULT}
- &run_coveralls
name: run_coveralls
command: |
export PATH=$WORKDIR/miniconda/bin:$PATH
source activate $PY_VER
coveralls
source deactivate
- &conda_upload
name: conda_upload
environment:
CHANNELS: "-c cdat-forge -c conda-forge -c cdat -c pcmdi"
PKG_NAME: "pcmdi_metrics"
LABEL: "nightly"
command: |
if [[ $CIRCLE_BRANCH != 'master' ]]; then
exit 0
fi
export PATH=${HOME}/project/$WORKDIR/miniconda/bin:$PATH
mkdir conda-bld
cd conda-bld
conda install conda-build anaconda-client
conda config --set anaconda_upload no
export CONDA_BLD_PATH=`pwd`/build_conda
mkdir build_conda
git clone git:https://github.com/cdat/conda-recipes
cd conda-recipes
rm -rf cdp
cp -r ../../recipes/pcmdi_metrics .
python ./prep_for_build.py -l 1.2
conda build $PKG_NAME $CHANNELS
anaconda -t $CONDA_UPLOAD_TOKEN upload -u pcmdi -l $LABEL $CONDA_BLD_PATH/noarch/$PKG_NAME-*tar.bz2 --force
jobs:
macos_pmp_py2:
macos:
xcode: "9.2.0"
environment:
WORKDIR: "test_macos_pmp_py2"
OS: "osx-64"
PY_VER: "py2"
FFMPEG: "'ffmpeg>4' 'libpng>1.6.34'"
steps:
- checkout
- run: *setup_miniconda
- run: *create_conda_env
- run: *setup_pmp
- run: *run_pmp_tests
- store_artifacts:
path: tests_html
destination: tests_html
- store_artifacts:
path: tests_png
destination: tests_png
macos_pmp_py3:
macos:
xcode: "9.2.0"
environment:
WORKDIR: "test_macos_pmp_py3"
OS: "osx-64"
PY_VER: "py3"
FFMPEG: "'ffmpeg>4' 'libpng>1.6.34'"
COVERAGE: "-c tests/coverage.json --coverage-from-egg"
COVERAGE_PKGS: "coverage coveralls"
steps:
- checkout
- run: *setup_miniconda
- run: *create_conda_env
- run: *setup_pmp
- run: *run_pmp_tests
- run: *run_coveralls
- store_artifacts:
path: tests_html
destination: tests_html
- store_artifacts:
path: tests_png
destination: tests_png
linux_pmp_py2:
machine:
image: circleci/classic:latest
environment:
WORKDIR: "test_linux_pmp_py2"
OS: "linux-64"
PY_VER: "py2"
FFMPEG: "ffmpeg"
steps:
- checkout
- run: *setup_miniconda
- run: *create_conda_env
- run: *setup_pmp
- run: *run_pmp_tests
- store_artifacts:
path: tests_html
destination: tests_html
- store_artifacts:
path: tests_png
destination: tests_png
linux_pmp_py3:
machine:
image: circleci/classic:latest
environment:
WORKDIR: "test_linux_pmp_py3"
OS: "linux-64"
PY_VER: "py3"
FFMPEG: "ffmpeg"
COVERAGE: "-c tests/coverage.json --coverage-from-egg"
COVERAGE_PKGS: "coverage coveralls"
steps:
- checkout
- run: *setup_miniconda
- run: *create_conda_env
- run: *setup_pmp
- run: *run_pmp_tests
- run: *conda_upload
- run: *run_coveralls
- store_artifacts:
path: tests_html
destination: tests_html
- store_artifacts:
path: tests_png
destination: tests_png
workflows:
version: 2
pcmdi_metrics:
jobs:
- macos_pmp_py2
- macos_pmp_py3:
requires:
- macos_pmp_py2
- linux_pmp_py2
- linux_pmp_py3:
requires:
- linux_pmp_py2