-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
130 lines (113 loc) · 4.24 KB
/
tox.ini
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
[tox]
# run 'tox -e local' to test the package
# run 'tox -e local check_sage_testsuite.py' to run portions of the Sage testsuite
# run 'tox -p auto' to run all of the following in parallel:
envlist = local-macos-gurobi{801,811,900,912}, docker-gurobi{801,811,900,912}
minversion = 2.0
skipsdist = false
basepython = sage-python23
[testenv:local]
whitelist_externals =
sage
env
sed
cp
deps = -r{toxinidir}/requirements.txt
passenv =
SAGE_ROOT
SAGE_LOCAL
HOME
GRB_LICENSE_FILE
AR
AS
CC
CFLAGS
CPPFLAGS
LD
LDFLAGS
LDFLAGS_LD
CONDA_BUILD_SYSROOT
# environment will be skipped if regular expression does not match against the sys.platform string
platform = linux: linux
macos: darwin
# create virtual environments that also have access to globally installed packages (sage)
sitepackages = true
# We set PYTHONUSERBASE to influence pip install.
# We set PYTHONPATH for the test; this ends up at the front of sys.path.
setenv =
LC_CTYPE = "C.UTF-8"
DOT_SAGE = {envtmpdir}
PYTHONUSERBASE = {envdir}/user-site
PYTHONPATH = {envdir}/user-site
# We install in the user scheme.
install_command = env PATH="{env:ADD_PATH:}:{env:PATH}" {basepython} -m pip install --install-option="--user" {opts} {packages}
# We use 'sage -c' so that the current dir does not get end up at the front of sys.path
commands =
sage -c 'banner(); print(sys.path); load("{posargs:check_testsuite.py}")'
# Unfortunately, we cannot use factors, hence we are forced to copy-paste
# https://github.com/tox-dev/tox/issues/189
[testenv:local-macos-gurobi801]
setenv = ADD_PATH = /Library/gurobi801/mac64/bin
{[testenv:local]setenv}
whitelist_externals = {[testenv:local]whitelist_externals}
deps = {[testenv:local]deps}
passenv = {[testenv:local]passenv}
platform = {[testenv:local]platform}
sitepackages = {[testenv:local]sitepackages}
install_command = {[testenv:local]install_command}
commands = {[testenv:local]commands}
[testenv:local-macos-gurobi811]
setenv = ADD_PATH = /Library/gurobi811/mac64/bin
{[testenv:local]setenv}
whitelist_externals = {[testenv:local]whitelist_externals}
deps = {[testenv:local]deps}
passenv = {[testenv:local]passenv}
platform = {[testenv:local]platform}
sitepackages = {[testenv:local]sitepackages}
install_command = {[testenv:local]install_command}
commands = {[testenv:local]commands}
[testenv:local-macos-gurobi900]
setenv = ADD_PATH = /Library/gurobi900/mac64/bin
{[testenv:local]setenv}
whitelist_externals = {[testenv:local]whitelist_externals}
deps = {[testenv:local]deps}
passenv = {[testenv:local]passenv}
platform = {[testenv:local]platform}
sitepackages = {[testenv:local]sitepackages}
install_command = {[testenv:local]install_command}
commands = {[testenv:local]commands}
[testenv:local-macos-gurobi912]
setenv = ADD_PATH = /Library/gurobi912/mac64/bin
{[testenv:local]setenv}
whitelist_externals = {[testenv:local]whitelist_externals}
deps = {[testenv:local]deps}
passenv = {[testenv:local]passenv}
platform = {[testenv:local]platform}
sitepackages = {[testenv:local]sitepackages}
install_command = {[testenv:local]install_command}
commands = {[testenv:local]commands}
[testenv:docker]
whitelist_externals = docker
skip_install = true
commands =
docker build -t private/sage-gurobi-{env:GUROBI_VERSION} --build-arg GUROBI_VERSION={env:GUROBI_VERSION} .
[testenv:docker-gurobi801]
setenv = GUROBI_VERSION = 8.0.1
whitelist_externals = docker
skip_install = true
commands = {[testenv:docker]commands}
[testenv:docker-gurobi811]
setenv = GUROBI_VERSION = 8.1.1
whitelist_externals = docker
skip_install = true
commands = {[testenv:docker]commands}
[testenv:docker-gurobi900]
setenv = GUROBI_VERSION = 9.0.0
whitelist_externals = docker
skip_install = true
commands = {[testenv:docker]commands}
[testenv:docker-gurobi912]
setenv = GUROBI_VERSION = 9.1.2
whitelist_externals = docker
skip_install = true
commands = {[testenv:docker]commands}