source: pyomo/trunk/admin/jenkins.py @ 10891

Last change on this file since 10891 was 10891, checked in by wehart, 6 years ago

Adding a 'nonpysp' configuration.

File size: 3.3 KB
Line 
1#  _________________________________________________________________________
2#
3#  Pyomo: Python Optimization Modeling Objects
4#  Copyright (c) 2014 Sandia Corporation.
5#  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
6#  the U.S. Government retains certain rights in this software.
7#  This software is distributed under the BSD License.
8#  _________________________________________________________________________
9
10import sys
11import os
12
13config = sys.argv[1]
14hname = os.uname()[1]
15hname = hname.split('.')[0]
16
17print("\nStarting jenkins.py")
18print("Configuration=%s" % config)
19
20os.environ['CONFIGFILE'] = os.environ['WORKSPACE']+'/hudson/pyomo-vpy/test_tpls.ini'
21sys.path.append(os.getcwd())
22
23sys.argv = ['dummy', '--trunk', '--source', 'src', '-a', 'pyyaml']
24
25if hname == "carr":
26    os.environ['PATH'] = ':'.join(['/collab/common/bin',
27                              '/collab/common/acro/bin', 
28                              '/collab/gurobi/gurobi501/linux64/bin',
29                              '/usr/lib64/openmpi/bin',
30                              os.environ['PATH']]
31                              )
32
33    if 'LD_LIBRARY_PATH' in os.environ:
34        tmp_ = "%s:" % os.environ['LD_LIBRARY_PATH']
35    else:
36        tmp_ = ""
37    os.environ['LD_LIBRARY_PATH'] = tmp_ + '/collab/gurobi/gurobi501/linux64/lib'
38    os.environ['GUROBI_HOME'] = '/collab/gurobi/gurobi501/linux64'
39    os.environ['GRB_LICENSE_FILE']='/collab/gurobi/gurobi.lic'
40
41    if sys.version_info < (3,):
42        sys.argv.append('-a')
43        sys.argv.append('/collab/packages/ibm/CPLEX_Studio124/cplex/python/x86-64_sles10_4.1/')
44        sys.argv.append('-a')
45        sys.argv.append('/collab/gurobi/gurobi501/linux64')
46
47elif hname == "sleipnir":
48    os.environ['PATH'] = ':'.join(['/collab/common/bin',
49                                '/collab/common/acro/bin',
50                                os.environ['PATH']]
51                                )
52
53    if sys.version_info < (3,):
54        sys.argv.append('-a')
55        sys.argv.append('/usr/ilog/cplex124/cplex/python/x86-64_sles10_4.1/')
56elif hname == "snotra":
57    if sys.version_info < (3,) and sys.version_info[1] >= 7:
58        sys.argv.append('-a')
59        sys.argv.append('/usr/gurobi/gurobi600/linux64')
60        sys.argv.append('-a')
61        sys.argv.append('/opt/ibm/ILOG/CPLEX_Studio126/cplex/python/x86-64_linux')
62
63if 'LD_LIBRARY_PATH' not in os.environ:
64    os.environ['LD_LIBRARY_PATH'] = ""
65
66print("\nPython version: %s" % sys.version)
67print("\nSystem PATH:\n\t%s" % os.environ['PATH'])
68print("\nPython path:\n\t%s" % sys.path)
69
70if config == "default":
71    import hudson.pyomo_cov
72
73elif config == "core":
74    os.environ['TEST_PACKAGES'] = 'checker core environ opt repn scripting solvers util version'
75    import hudson.pyomo_cov
76
77elif config == "nonpysp":
78    os.environ['TEST_PACKAGES'] = '-e pysp'
79    import hudson.pyomo_cov
80
81elif config == "parallel":
82    import hudson.pyomo_parallel
83
84elif config == "expensive":
85    pyutilib=os.sep.join([os.environ['WORKSPACE'], 'src', 'pyutilib.*'])+',pyutilib.*'
86
87    from hudson.driver import perform_build
88    perform_build('pyomo', 
89        cat='all', coverage=True, omit=pyutilib,
90        virtualenv_args=sys.argv[1:])
91
92elif config == "booktests":
93    import hudson.pyomo_book
94
95elif config == "perf":
96    os.environ['NOSE_PROCESS_TIMEOUT'] = '1800'
97    import hudson.pyomo_perf
98
Note: See TracBrowser for help on using the repository browser.