@@ -71,35 +71,29 @@ jobs:
71
71
fail-fast : false
72
72
matrix :
73
73
os : [ubuntu-latest]
74
- python : [' 3.13' ]
74
+ python : [3.13]
75
75
other : [""]
76
76
category : [""]
77
77
78
- # win/3.8 conda builds no longer work due to environment not being able
79
- # to resolve. We are skipping it now.
80
- exclude :
81
- - os : windows-latest
82
- python : 3.8
83
-
84
78
include :
85
79
- os : ubuntu-latest
86
- python : ' 3.13'
80
+ python : 3.13
87
81
TARGET : linux
88
82
PYENV : pip
89
83
90
84
- os : macos-latest
91
- python : ' 3.10 '
85
+ python : 3.12
92
86
TARGET : osx
93
87
PYENV : pip
94
88
95
89
- os : windows-latest
96
- python : 3.9
90
+ python : 3.11
97
91
TARGET : win
98
92
PYENV : conda
99
93
PACKAGES : glpk pytest-qt filelock
100
94
101
95
- os : ubuntu-latest
102
- python : ' 3.11'
96
+ python : 3.11
103
97
other : /conda
104
98
skip_doctest : 1
105
99
TARGET : linux
@@ -116,7 +110,7 @@ jobs:
116
110
PACKAGES : openmpi mpi4py
117
111
118
112
- os : ubuntu-latest
119
- python : ' 3.12'
113
+ python : 3.12
120
114
other : /cython
121
115
setup_options : --with-cython
122
116
skip_doctest : 1
@@ -125,7 +119,7 @@ jobs:
125
119
PACKAGES : cython
126
120
127
121
- os : windows-latest
128
- python : 3.8
122
+ python : 3.9
129
123
other : /pip
130
124
skip_doctest : 1
131
125
TARGET : win
@@ -240,7 +234,7 @@ jobs:
240
234
# have support for OSX.
241
235
- name : Set up UI testing infrastructure
242
236
if : ${{ matrix.TARGET != 'osx' }}
243
- uses : pyvista/setup-headless-display-action@v2
237
+ uses : pyvista/setup-headless-display-action@v3
244
238
with :
245
239
qt : true
246
240
pyvista : false
@@ -371,11 +365,23 @@ jobs:
371
365
# possibly if it outputs messages to stderr)
372
366
conda install --update-deps -q -y $CONDA_DEPENDENCIES
373
367
if test -z "${{matrix.slim}}"; then
368
+ # xpress.init() (from conda) hangs indefinitely on GHA/Windows under
369
+ # Python 3.10 and 3.11. Exclude that release on that platform.
370
+ if [[ ${{matrix.TARGET}} == win && ${{matrix.python}} =~ 3.1[01] ]]; then
371
+ # We would like to just use something like:
372
+ # - "!=9.5.1" (conda errors)
373
+ # - "<9.5.1|>9.5.1" (conda installs 9.1.2, which also hangs)
374
+ # - "<=9.5.0|>9.5.1" (conda seg faults)
375
+ XPRESS='xpress=9.5.0'
376
+ else
377
+ XPRESS='xpress'
378
+ fi
374
379
PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g')
375
380
echo "Installing for $PYVER"
376
- for PKG in 'cplex>=12.10' docplex gurobi xpress cyipopt pymumps scip; do
381
+ for PKG in 'cplex>=12.10' docplex gurobi "$XPRESS" cyipopt pymumps scip; do
377
382
echo ""
378
383
echo "*** Install $PKG ***"
384
+ echo ""
379
385
# conda can literally take an hour to determine that a
380
386
# package is not available. Perform a quick search to see
381
387
# if the package is available for this interpreter before
@@ -397,6 +403,7 @@ jobs:
397
403
conda install -y "$PKG" || _BUILDS=""
398
404
fi
399
405
fi
406
+ echo ""
400
407
if test -z "$_BUILDS"; then
401
408
echo "WARNING: $PKG is not available"
402
409
fi
@@ -434,13 +441,18 @@ jobs:
434
441
mkdir -p "$DOWNLOAD_DIR"
435
442
echo "TPL_DIR=$TPL_DIR" >> $GITHUB_ENV
436
443
echo "DOWNLOAD_DIR=$DOWNLOAD_DIR" >> $GITHUB_ENV
444
+ # Create a new PYOMO_PATH variable so we can ensure that we are actually
445
+ # getting the right PATH at the end
446
+ echo "PYOMO_PATH=$PATH" >> $GITHUB_ENV
437
447
438
448
- name : Install Ipopt
439
449
if : ${{ ! matrix.slim }}
440
450
run : |
441
451
IPOPT_DIR=$TPL_DIR/ipopt
442
452
echo "$IPOPT_DIR" >> $GITHUB_PATH
443
453
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$IPOPT_DIR" >> $GITHUB_ENV
454
+ NEW_PYOMO_PATH="$IPOPT_DIR:$PYOMO_PATH"
455
+ echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
444
456
mkdir -p $IPOPT_DIR
445
457
IPOPT_TAR=${DOWNLOAD_DIR}/ipopt.tar.gz
446
458
if test ! -e $IPOPT_TAR; then
@@ -517,7 +529,9 @@ jobs:
517
529
- name : Install GAMS Python bindings
518
530
if : ${{ ! matrix.slim }}
519
531
run : |
520
- GAMS_DIR="${env:TPL_DIR}/gams"
532
+ GAMS_DIR="$TPL_DIR/gams"
533
+ NEW_PYOMO_PATH="$GAMS_DIR:$PYOMO_PATH"
534
+ echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
521
535
py_ver=$($PYTHON_EXE -c 'import sys;v="_%s%s" % sys.version_info[:2] \
522
536
;print(v if v != "_27" else "")')
523
537
if test -e $GAMS_DIR/apifiles/Python/api$py_ver; then
@@ -534,6 +548,17 @@ jobs:
534
548
$BARON_DIR = "${env:TPL_DIR}/baron"
535
549
echo "$BARON_DIR" | `
536
550
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
551
+ $CURRENT_PYOMO_PATH="${env:PYOMO_PATH}"
552
+ # Prepend BARON_DIR with appropriate path separator
553
+ if ( "${{matrix.TARGET}}" -eq "win" ) {
554
+ $PATH_SEPARATOR = ";"
555
+ } else {
556
+ $PATH_SEPARATOR = ":"
557
+ }
558
+ $NEW_PYOMO_PATH = "$BARON_DIR$PATH_SEPARATOR$CURRENT_PYOMO_PATH"
559
+ echo "New PYOMO_PATH: $NEW_PYOMO_PATH"
560
+ echo "PYOMO_PATH=$NEW_PYOMO_PATH" | `
561
+ Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
537
562
$URL = "https://minlp-downloads.nyc3.cdn.digitaloceanspaces.com/xecs/baron/current/"
538
563
if ( "${{matrix.TARGET}}" -eq "win" ) {
539
564
$INSTALLER = "${env:DOWNLOAD_DIR}/baron_install.exe"
@@ -568,6 +593,8 @@ jobs:
568
593
run : |
569
594
GJH_DIR="$TPL_DIR/gjh"
570
595
echo "${GJH_DIR}" >> $GITHUB_PATH
596
+ NEW_PYOMO_PATH="$GJH_DIR:$PYOMO_PATH"
597
+ echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
571
598
INSTALL_DIR="${DOWNLOAD_DIR}/gjh"
572
599
if test ! -e "$INSTALL_DIR/bin"; then
573
600
mkdir -p "$INSTALL_DIR"
@@ -643,6 +670,11 @@ jobs:
643
670
644
671
- name : Report pyomo plugin information
645
672
run : |
673
+ # MRM / Jan 9, 2025: We update the PATH manually to make sure we
674
+ # capture all of our changes. This is necessary because of an
675
+ # issue with how the PATH rearranges on Windows.
676
+ # Issue: https://github.com/actions/runner-images/issues/11328
677
+ export PATH=$PYOMO_PATH
646
678
echo "$PATH"
647
679
pyomo help --solvers || exit 1
648
680
pyomo help --transformations || exit 1
@@ -651,6 +683,7 @@ jobs:
651
683
- name : Run Pyomo tests
652
684
if : matrix.mpi == 0
653
685
run : |
686
+ export PATH=$PYOMO_PATH
654
687
$PYTHON_EXE -m pytest -v \
655
688
-W ignore::Warning ${{matrix.category}} \
656
689
pyomo `pwd`/pyomo-model-libraries \
@@ -684,6 +717,7 @@ jobs:
684
717
uses : actions/upload-artifact@v4
685
718
with :
686
719
name : ${{github.job}}_${{env.GHA_JOBGROUP}}-${{env.GHA_JOBNAME}}
720
+ include-hidden-files : true
687
721
path : |
688
722
.coverage
689
723
coverage.xml
@@ -693,17 +727,17 @@ jobs:
693
727
694
728
695
729
bare-python-env :
696
- name : linux/3.8 /bare-env
730
+ name : linux/3.9 /bare-env
697
731
runs-on : ubuntu-latest
698
732
timeout-minutes : 10
699
733
steps :
700
734
- name : Checkout Pyomo source
701
735
uses : actions/checkout@v4
702
736
703
- - name : Set up Python 3.8
737
+ - name : Set up Python 3.9
704
738
uses : actions/setup-python@v5
705
739
with :
706
- python-version : 3.8
740
+ python-version : 3.9
707
741
708
742
- name : Install Pyomo
709
743
run : |
@@ -761,17 +795,17 @@ jobs:
761
795
# id: pip-cache
762
796
# with:
763
797
# path: cache/pip
764
- # key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.8
798
+ # key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.9
765
799
766
800
- name : Download build artifacts
767
801
uses : actions/download-artifact@v4
768
802
with :
769
803
path : artifacts
770
804
771
- - name : Set up Python 3.8
805
+ - name : Set up Python 3.9
772
806
uses : actions/setup-python@v5
773
807
with :
774
- python-version : 3.8
808
+ python-version : 3.9
775
809
776
810
- name : Install Python Packages (pip)
777
811
shell : bash # DO NOT REMOVE: see note above
0 commit comments