Skip to content

Commit 51d1ba7

Browse files
authored
Merge branch 'main' into params-to-vars
2 parents c249edb + cc2185b commit 51d1ba7

File tree

109 files changed

+3567
-963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+3567
-963
lines changed

.coin-or/projDesc.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e
287287

288288
<platform>
289289
<operatingSystem>Any</operatingSystem>
290-
<compiler>Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13</compiler>
290+
<compiler>Python 3.9, 3.10, 3.11, 3.12, 3.13</compiler>
291291
</platform>
292292

293293
</testedPlatforms>

.github/workflows/release_wheel_creation.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,11 @@ jobs:
2727
strategy:
2828
fail-fast: true
2929
matrix:
30-
os: [ubuntu-22.04, windows-latest, macos-latest]
30+
os: [ubuntu-latest, windows-latest, macos-latest]
3131
arch: [all]
32-
wheel-version: ['cp38*', 'cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*']
32+
wheel-version: ['cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*']
3333

3434
include:
35-
- wheel-version: 'cp38*'
36-
TARGET: 'py38'
37-
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
3835
- wheel-version: 'cp39*'
3936
TARGET: 'py39'
4037
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
@@ -94,14 +91,11 @@ jobs:
9491
runs-on: ${{ matrix.os }}
9592
strategy:
9693
matrix:
97-
os: [ubuntu-22.04]
94+
os: [ubuntu-latest]
9895
arch: [all]
99-
wheel-version: ['cp38*', 'cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*']
96+
wheel-version: ['cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*']
10097

10198
include:
102-
- wheel-version: 'cp38*'
103-
TARGET: 'py38'
104-
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
10599
- wheel-version: 'cp39*'
106100
TARGET: 'py39'
107101
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
@@ -185,7 +179,7 @@ jobs:
185179
include:
186180
- os: ubuntu-latest
187181
TARGET: generic_tarball
188-
python-version: [3.8]
182+
python-version: [3.9]
189183
steps:
190184
- uses: actions/checkout@v4
191185
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/test_branches.yml

+56-22
Original file line numberDiff line numberDiff line change
@@ -71,35 +71,29 @@ jobs:
7171
fail-fast: false
7272
matrix:
7373
os: [ubuntu-latest]
74-
python: ['3.13']
74+
python: [3.13]
7575
other: [""]
7676
category: [""]
7777

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-
8478
include:
8579
- os: ubuntu-latest
86-
python: '3.13'
80+
python: 3.13
8781
TARGET: linux
8882
PYENV: pip
8983

9084
- os: macos-latest
91-
python: '3.10'
85+
python: 3.12
9286
TARGET: osx
9387
PYENV: pip
9488

9589
- os: windows-latest
96-
python: 3.9
90+
python: 3.11
9791
TARGET: win
9892
PYENV: conda
9993
PACKAGES: glpk pytest-qt filelock
10094

10195
- os: ubuntu-latest
102-
python: '3.11'
96+
python: 3.11
10397
other: /conda
10498
skip_doctest: 1
10599
TARGET: linux
@@ -116,7 +110,7 @@ jobs:
116110
PACKAGES: openmpi mpi4py
117111

118112
- os: ubuntu-latest
119-
python: '3.12'
113+
python: 3.12
120114
other: /cython
121115
setup_options: --with-cython
122116
skip_doctest: 1
@@ -125,7 +119,7 @@ jobs:
125119
PACKAGES: cython
126120

127121
- os: windows-latest
128-
python: 3.8
122+
python: 3.9
129123
other: /pip
130124
skip_doctest: 1
131125
TARGET: win
@@ -240,7 +234,7 @@ jobs:
240234
# have support for OSX.
241235
- name: Set up UI testing infrastructure
242236
if: ${{ matrix.TARGET != 'osx' }}
243-
uses: pyvista/setup-headless-display-action@v2
237+
uses: pyvista/setup-headless-display-action@v3
244238
with:
245239
qt: true
246240
pyvista: false
@@ -371,11 +365,23 @@ jobs:
371365
# possibly if it outputs messages to stderr)
372366
conda install --update-deps -q -y $CONDA_DEPENDENCIES
373367
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
374379
PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g')
375380
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
377382
echo ""
378383
echo "*** Install $PKG ***"
384+
echo ""
379385
# conda can literally take an hour to determine that a
380386
# package is not available. Perform a quick search to see
381387
# if the package is available for this interpreter before
@@ -397,6 +403,7 @@ jobs:
397403
conda install -y "$PKG" || _BUILDS=""
398404
fi
399405
fi
406+
echo ""
400407
if test -z "$_BUILDS"; then
401408
echo "WARNING: $PKG is not available"
402409
fi
@@ -434,13 +441,18 @@ jobs:
434441
mkdir -p "$DOWNLOAD_DIR"
435442
echo "TPL_DIR=$TPL_DIR" >> $GITHUB_ENV
436443
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
437447
438448
- name: Install Ipopt
439449
if: ${{ ! matrix.slim }}
440450
run: |
441451
IPOPT_DIR=$TPL_DIR/ipopt
442452
echo "$IPOPT_DIR" >> $GITHUB_PATH
443453
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
444456
mkdir -p $IPOPT_DIR
445457
IPOPT_TAR=${DOWNLOAD_DIR}/ipopt.tar.gz
446458
if test ! -e $IPOPT_TAR; then
@@ -517,7 +529,9 @@ jobs:
517529
- name: Install GAMS Python bindings
518530
if: ${{ ! matrix.slim }}
519531
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
521535
py_ver=$($PYTHON_EXE -c 'import sys;v="_%s%s" % sys.version_info[:2] \
522536
;print(v if v != "_27" else "")')
523537
if test -e $GAMS_DIR/apifiles/Python/api$py_ver; then
@@ -534,6 +548,17 @@ jobs:
534548
$BARON_DIR = "${env:TPL_DIR}/baron"
535549
echo "$BARON_DIR" | `
536550
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
537562
$URL = "https://minlp-downloads.nyc3.cdn.digitaloceanspaces.com/xecs/baron/current/"
538563
if ( "${{matrix.TARGET}}" -eq "win" ) {
539564
$INSTALLER = "${env:DOWNLOAD_DIR}/baron_install.exe"
@@ -568,6 +593,8 @@ jobs:
568593
run: |
569594
GJH_DIR="$TPL_DIR/gjh"
570595
echo "${GJH_DIR}" >> $GITHUB_PATH
596+
NEW_PYOMO_PATH="$GJH_DIR:$PYOMO_PATH"
597+
echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
571598
INSTALL_DIR="${DOWNLOAD_DIR}/gjh"
572599
if test ! -e "$INSTALL_DIR/bin"; then
573600
mkdir -p "$INSTALL_DIR"
@@ -643,6 +670,11 @@ jobs:
643670
644671
- name: Report pyomo plugin information
645672
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
646678
echo "$PATH"
647679
pyomo help --solvers || exit 1
648680
pyomo help --transformations || exit 1
@@ -651,6 +683,7 @@ jobs:
651683
- name: Run Pyomo tests
652684
if: matrix.mpi == 0
653685
run: |
686+
export PATH=$PYOMO_PATH
654687
$PYTHON_EXE -m pytest -v \
655688
-W ignore::Warning ${{matrix.category}} \
656689
pyomo `pwd`/pyomo-model-libraries \
@@ -684,6 +717,7 @@ jobs:
684717
uses: actions/upload-artifact@v4
685718
with:
686719
name: ${{github.job}}_${{env.GHA_JOBGROUP}}-${{env.GHA_JOBNAME}}
720+
include-hidden-files: true
687721
path: |
688722
.coverage
689723
coverage.xml
@@ -693,17 +727,17 @@ jobs:
693727
694728
695729
bare-python-env:
696-
name: linux/3.8/bare-env
730+
name: linux/3.9/bare-env
697731
runs-on: ubuntu-latest
698732
timeout-minutes: 10
699733
steps:
700734
- name: Checkout Pyomo source
701735
uses: actions/checkout@v4
702736

703-
- name: Set up Python 3.8
737+
- name: Set up Python 3.9
704738
uses: actions/setup-python@v5
705739
with:
706-
python-version: 3.8
740+
python-version: 3.9
707741

708742
- name: Install Pyomo
709743
run: |
@@ -761,17 +795,17 @@ jobs:
761795
# id: pip-cache
762796
# with:
763797
# 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
765799

766800
- name: Download build artifacts
767801
uses: actions/download-artifact@v4
768802
with:
769803
path: artifacts
770804

771-
- name: Set up Python 3.8
805+
- name: Set up Python 3.9
772806
uses: actions/setup-python@v5
773807
with:
774-
python-version: 3.8
808+
python-version: 3.9
775809

776810
- name: Install Python Packages (pip)
777811
shell: bash # DO NOT REMOVE: see note above

0 commit comments

Comments
 (0)