Skip to content

Commit

Permalink
Merge branch 'main' into dsda_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
emma58 authored Jan 15, 2025
2 parents 201aed4 + b2cb3ae commit e2a3345
Show file tree
Hide file tree
Showing 28 changed files with 521 additions and 214 deletions.
2 changes: 1 addition & 1 deletion .coin-or/projDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e

<platform>
<operatingSystem>Any</operatingSystem>
<compiler>Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13</compiler>
<compiler>Python 3.9, 3.10, 3.11, 3.12, 3.13</compiler>
</platform>

</testedPlatforms>
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/release_wheel_creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-22.04, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [all]
wheel-version: ['cp38*', 'cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*']
wheel-version: ['cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*']

include:
- wheel-version: 'cp38*'
TARGET: 'py38'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
- wheel-version: 'cp39*'
TARGET: 'py39'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
Expand Down Expand Up @@ -94,14 +91,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
os: [ubuntu-latest]
arch: [all]
wheel-version: ['cp38*', 'cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*']
wheel-version: ['cp39*', 'cp310*', 'cp311*', 'cp312*', 'cp313*']

include:
- wheel-version: 'cp38*'
TARGET: 'py38'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
- wheel-version: 'cp39*'
TARGET: 'py39'
GLOBAL_OPTIONS: "--with-cython --with-distributable-extensions"
Expand Down Expand Up @@ -185,7 +179,7 @@ jobs:
include:
- os: ubuntu-latest
TARGET: generic_tarball
python-version: [3.8]
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
52 changes: 36 additions & 16 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,14 @@ jobs:
other: [""]
category: [""]

# win/3.8 conda builds no longer work due to environment not being able
# to resolve. We are skipping it now.
exclude:
- os: windows-latest
python: 3.8

include:
- os: ubuntu-latest
python: '3.13'
TARGET: linux
PYENV: pip

- os: macos-latest
python: '3.10'
python: '3.11'
TARGET: osx
PYENV: pip

Expand Down Expand Up @@ -125,7 +119,7 @@ jobs:
PACKAGES: cython

- os: windows-latest
python: 3.8
python: '3.10'
other: /pip
skip_doctest: 1
TARGET: win
Expand Down Expand Up @@ -240,7 +234,7 @@ jobs:
# have support for OSX.
- name: Set up UI testing infrastructure
if: ${{ matrix.TARGET != 'osx' }}
uses: pyvista/setup-headless-display-action@v2
uses: pyvista/setup-headless-display-action@v3
with:
qt: true
pyvista: false
Expand Down Expand Up @@ -434,13 +428,18 @@ jobs:
mkdir -p "$DOWNLOAD_DIR"
echo "TPL_DIR=$TPL_DIR" >> $GITHUB_ENV
echo "DOWNLOAD_DIR=$DOWNLOAD_DIR" >> $GITHUB_ENV
# Create a new PYOMO_PATH variable so we can ensure that we are actually
# getting the right PATH at the end
echo "PYOMO_PATH=$PATH" >> $GITHUB_ENV
- name: Install Ipopt
if: ${{ ! matrix.slim }}
run: |
IPOPT_DIR=$TPL_DIR/ipopt
echo "$IPOPT_DIR" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$IPOPT_DIR" >> $GITHUB_ENV
NEW_PYOMO_PATH="$IPOPT_DIR:$PYOMO_PATH"
echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
mkdir -p $IPOPT_DIR
IPOPT_TAR=${DOWNLOAD_DIR}/ipopt.tar.gz
if test ! -e $IPOPT_TAR; then
Expand Down Expand Up @@ -517,7 +516,9 @@ jobs:
- name: Install GAMS Python bindings
if: ${{ ! matrix.slim }}
run: |
GAMS_DIR="${env:TPL_DIR}/gams"
GAMS_DIR="$TPL_DIR/gams"
NEW_PYOMO_PATH="$GAMS_DIR:$PYOMO_PATH"
echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
py_ver=$($PYTHON_EXE -c 'import sys;v="_%s%s" % sys.version_info[:2] \
;print(v if v != "_27" else "")')
if test -e $GAMS_DIR/apifiles/Python/api$py_ver; then
Expand All @@ -534,6 +535,17 @@ jobs:
$BARON_DIR = "${env:TPL_DIR}/baron"
echo "$BARON_DIR" | `
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$CURRENT_PYOMO_PATH="${env:PYOMO_PATH}"
# Prepend BARON_DIR with appropriate path separator
if ( "${{matrix.TARGET}}" -eq "win" ) {
$PATH_SEPARATOR = ";"
} else {
$PATH_SEPARATOR = ":"
}
$NEW_PYOMO_PATH = "$BARON_DIR$PATH_SEPARATOR$CURRENT_PYOMO_PATH"
echo "New PYOMO_PATH: $NEW_PYOMO_PATH"
echo "PYOMO_PATH=$NEW_PYOMO_PATH" | `
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
$URL = "https://minlp-downloads.nyc3.cdn.digitaloceanspaces.com/xecs/baron/current/"
if ( "${{matrix.TARGET}}" -eq "win" ) {
$INSTALLER = "${env:DOWNLOAD_DIR}/baron_install.exe"
Expand Down Expand Up @@ -568,6 +580,8 @@ jobs:
run: |
GJH_DIR="$TPL_DIR/gjh"
echo "${GJH_DIR}" >> $GITHUB_PATH
NEW_PYOMO_PATH="$GJH_DIR:$PYOMO_PATH"
echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
INSTALL_DIR="${DOWNLOAD_DIR}/gjh"
if test ! -e "$INSTALL_DIR/bin"; then
mkdir -p "$INSTALL_DIR"
Expand Down Expand Up @@ -643,6 +657,11 @@ jobs:
- name: Report pyomo plugin information
run: |
# MRM / Jan 9, 2025: We update the PATH manually to make sure we
# capture all of our changes. This is necessary because of an
# issue with how the PATH rearranges on Windows.
# Issue: https://github.com/actions/runner-images/issues/11328
export PATH=$PYOMO_PATH
echo "$PATH"
pyomo help --solvers || exit 1
pyomo help --transformations || exit 1
Expand All @@ -651,6 +670,7 @@ jobs:
- name: Run Pyomo tests
if: matrix.mpi == 0
run: |
export PATH=$PYOMO_PATH
$PYTHON_EXE -m pytest -v \
-W ignore::Warning ${{matrix.category}} \
pyomo `pwd`/pyomo-model-libraries \
Expand Down Expand Up @@ -693,17 +713,17 @@ jobs:
bare-python-env:
name: linux/3.8/bare-env
name: linux/3.9/bare-env
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Pyomo source
uses: actions/checkout@v4

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install Pyomo
run: |
Expand Down Expand Up @@ -761,17 +781,17 @@ jobs:
# id: pip-cache
# with:
# path: cache/pip
# key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.8
# key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.9

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install Python Packages (pip)
shell: bash # DO NOT REMOVE: see note above
Expand Down
58 changes: 39 additions & 19 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: [ 3.8, 3.9, '3.10', '3.11', '3.12', '3.13' ]
python: [ 3.9, '3.10', '3.11', '3.12', '3.13' ]
other: [""]
category: [""]

# win/3.8 conda builds no longer work due to environment not being able
# to resolve. We are skipping it now.
exclude:
- os: windows-latest
python: 3.8

include:
- os: ubuntu-latest
TARGET: linux
Expand Down Expand Up @@ -119,7 +113,7 @@ jobs:
PACKAGES: cython

- os: windows-latest
python: 3.8
python: 3.9
other: /pip
skip_doctest: 1
TARGET: win
Expand All @@ -134,7 +128,7 @@ jobs:
PYENV: pip

- os: ubuntu-latest
python: 3.8
python: 3.9
other: /slim
slim: 1
skip_doctest: 1
Expand All @@ -151,14 +145,14 @@ jobs:
PACKAGES: "gurobipy dill numpy>2.0 scipy networkx"

- os: ubuntu-latest
python: 3.9
python: '3.10'
other: /pyutilib
TARGET: linux
PYENV: pip
PACKAGES: pyutilib

- os: ubuntu-latest
python: pypy-3.9
python: 'pypy-3.10'
skip_doctest: 1
TARGET: linux
PYENV: pip
Expand Down Expand Up @@ -272,7 +266,7 @@ jobs:
# have support for OSX.
- name: Set up UI testing infrastructure
if: ${{ matrix.TARGET != 'osx' }}
uses: pyvista/setup-headless-display-action@v2
uses: pyvista/setup-headless-display-action@v3
with:
qt: true
pyvista: false
Expand Down Expand Up @@ -466,13 +460,18 @@ jobs:
mkdir -p "$DOWNLOAD_DIR"
echo "TPL_DIR=$TPL_DIR" >> $GITHUB_ENV
echo "DOWNLOAD_DIR=$DOWNLOAD_DIR" >> $GITHUB_ENV
# Create a new PYOMO_PATH variable so we can ensure that we are actually
# getting the right PATH at the end
echo "PYOMO_PATH=$PATH" >> $GITHUB_ENV
- name: Install Ipopt
if: ${{ ! matrix.slim }}
run: |
IPOPT_DIR=$TPL_DIR/ipopt
echo "$IPOPT_DIR" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$IPOPT_DIR" >> $GITHUB_ENV
NEW_PYOMO_PATH="$IPOPT_DIR:$PYOMO_PATH"
echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
mkdir -p $IPOPT_DIR
IPOPT_TAR=${DOWNLOAD_DIR}/ipopt.tar.gz
if test ! -e $IPOPT_TAR; then
Expand Down Expand Up @@ -549,7 +548,9 @@ jobs:
- name: Install GAMS Python bindings
if: ${{ ! matrix.slim }}
run: |
GAMS_DIR="${env:TPL_DIR}/gams"
GAMS_DIR="$TPL_DIR/gams"
NEW_PYOMO_PATH="$GAMS_DIR:$PYOMO_PATH"
echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
py_ver=$($PYTHON_EXE -c 'import sys;v="_%s%s" % sys.version_info[:2] \
;print(v if v != "_27" else "")')
if test -e $GAMS_DIR/apifiles/Python/api$py_ver; then
Expand All @@ -566,6 +567,17 @@ jobs:
$BARON_DIR = "${env:TPL_DIR}/baron"
echo "$BARON_DIR" | `
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$CURRENT_PYOMO_PATH="${env:PYOMO_PATH}"
# Prepend BARON_DIR with appropriate path separator
if ( "${{matrix.TARGET}}" -eq "win" ) {
$PATH_SEPARATOR = ";"
} else {
$PATH_SEPARATOR = ":"
}
$NEW_PYOMO_PATH = "$BARON_DIR$PATH_SEPARATOR$CURRENT_PYOMO_PATH"
echo "New PYOMO_PATH: $NEW_PYOMO_PATH"
echo "PYOMO_PATH=$NEW_PYOMO_PATH" | `
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
$URL = "https://minlp-downloads.nyc3.cdn.digitaloceanspaces.com/xecs/baron/current/"
if ( "${{matrix.TARGET}}" -eq "win" ) {
$INSTALLER = "${env:DOWNLOAD_DIR}/baron_install.exe"
Expand Down Expand Up @@ -600,6 +612,8 @@ jobs:
run: |
GJH_DIR="$TPL_DIR/gjh"
echo "${GJH_DIR}" >> $GITHUB_PATH
NEW_PYOMO_PATH="$GJH_DIR:$PYOMO_PATH"
echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
INSTALL_DIR="${DOWNLOAD_DIR}/gjh"
if test ! -e "$INSTALL_DIR/bin"; then
mkdir -p "$INSTALL_DIR"
Expand Down Expand Up @@ -676,6 +690,11 @@ jobs:
- name: Report pyomo plugin information
run: |
# MRM / Jan 9, 2025: We update the PATH manually to make sure we
# capture all of our changes. This is necessary because of an
# issue with how the PATH rearranges on Windows.
# Issue: https://github.com/actions/runner-images/issues/11328
export PATH=$PYOMO_PATH
echo "$PATH"
pyomo help --solvers || exit 1
pyomo help --transformations || exit 1
Expand All @@ -684,6 +703,7 @@ jobs:
- name: Run Pyomo tests
if: matrix.mpi == 0
run: |
export PATH=$PYOMO_PATH
$PYTHON_EXE -m pytest -v \
-W ignore::Warning ${{matrix.category}} \
pyomo `pwd`/pyomo-model-libraries \
Expand Down Expand Up @@ -727,18 +747,18 @@ jobs:
bare-python-env:
name: linux/3.8/bare-env
name: linux/3.9/bare-env
needs: lint # the linter job is a prerequisite for PRs
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Pyomo source
uses: actions/checkout@v4

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install Pyomo
run: |
Expand Down Expand Up @@ -796,17 +816,17 @@ jobs:
# id: pip-cache
# with:
# path: cache/pip
# key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.8
# key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.9

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install Python Packages (pip)
shell: bash # DO NOT REMOVE: see note above
Expand Down
Loading

0 comments on commit e2a3345

Please sign in to comment.