forked from numba/numba
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcondatestall.py
51 lines (39 loc) · 1.09 KB
/
condatestall.py
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
"""
Uses conda to run and test all supported python + numpy versions.
"""
from __future__ import print_function
import itertools
import subprocess
import os
import sys
if '-q' in sys.argv[1:]:
NPY = '18',
else:
NPY = '16', '17', '18'
PY = '26', '27', '33'
RECIPE_DIR = "./buildscripts/condarecipe.local"
def main():
failfast = '-v' in sys.argv[1:]
args = "conda build %s --no-binstar-upload" % RECIPE_DIR
failures = []
for py, npy in itertools.product(PY, NPY):
if py == '33' and npy == '16':
# Skip python3 + numpy16
continue
os.environ['CONDA_PY'] = py
os.environ['CONDA_NPY'] = npy
try:
subprocess.check_call(args.split())
except subprocess.CalledProcessError as e:
failures.append((py, npy, e))
if failfast:
break
print("=" * 80)
if failures:
for py, npy, err in failures:
print("Test failed for python %s numpy %s" % (py, npy))
print(err)
else:
print("All Passed")
if __name__ == '__main__':
main()