From 3095387fdeb3a3b39fd610778a4c9da63f67d042 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Wed, 22 Oct 2025 14:57:29 -0600 Subject: [PATCH 01/20] 301st attempt --- .github/workflows/test_pr_and_main.yml | 84 ++------------------------ 1 file changed, 6 insertions(+), 78 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 906d802ce4b..25fcabb0bac 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -92,21 +92,12 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [windows-latest] python: [ '3.10', 3.11, 3.12, 3.13, 3.14 ] other: [""] category: [""] include: - - os: ubuntu-latest - test_docs: 1 - TARGET: linux - PYENV: pip - - - os: macos-latest - test_docs: 1 - TARGET: osx - PYENV: pip - os: windows-latest test_docs: 1 @@ -114,79 +105,12 @@ jobs: PYENV: conda PACKAGES: glpk pytest-qt filelock - # Note: verify that pymumps is available when changing conda python version - - os: ubuntu-latest - python: 3.12 - other: /conda - TARGET: linux - PYENV: conda - PACKAGES: pytest-qt - - - os: ubuntu-latest - python: 3.11 - other: /mpi - mpi: 3 - TARGET: linux - PYENV: conda - PACKAGES: openmpi mpi4py - - - os: ubuntu-latest - python: 3.12 - other: /cython - setup_options: --with-cython - TARGET: linux - PYENV: pip - PACKAGES: cython - - os: windows-latest python: '3.10' other: /pip TARGET: win PYENV: pip - - os: ubuntu-latest - python: 3.11 - other: /singletest - category: "-m 'neos or importtest'" - TARGET: linux - PYENV: pip - - - os: ubuntu-latest - python: '3.10' - other: /slim - slim: 1 - TARGET: linux - PYENV: pip - - - os: ubuntu-latest - python: 3.12 - other: /numpy2 - slim: 1 - TARGET: linux - PYENV: pip - PACKAGES: "gurobipy dill numpy>2.0 scipy networkx" - - - os: ubuntu-latest - python: '3.10' - other: /pyutilib - TARGET: linux - PYENV: pip - PACKAGES: pyutilib - - - os: ubuntu-latest - python: 'pypy-3.11' - TARGET: linux - PYENV: pip - - - os: ubuntu-latest - python: 3.11 - other: /rtd - category: notests - build_docs: 1 - TARGET: linux - PYENV: pip - - steps: - name: Checkout Pyomo source uses: actions/checkout@v4 @@ -432,7 +356,9 @@ jobs: fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) - conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES + conda install -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES + echo "Current conda environment:" + conda list | sed 's/^/ /' if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that @@ -499,6 +425,8 @@ jobs: fi done fi + echo "Current conda environment:" + conda list | sed 's/^/ /' # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" From 5b2f0fbf99a57585d83224da8f2d3104c75fba93 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Wed, 22 Oct 2025 15:20:02 -0600 Subject: [PATCH 02/20] Just install one random thing --- .github/workflows/test_pr_and_main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 25fcabb0bac..4e6407e8a15 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -354,11 +354,13 @@ jobs: if test "${{matrix.TARGET}}" == 'win'; then CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0" fi + # RUNS + pip debug # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) - conda install -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES - echo "Current conda environment:" - conda list | sed 's/^/ /' + conda install -q -y pytest + # FAILS + pip debug if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that @@ -425,8 +427,6 @@ jobs: fi done fi - echo "Current conda environment:" - conda list | sed 's/^/ /' # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" From 6e36254efae20c2460f3100022630a12fc01c3d3 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Wed, 22 Oct 2025 15:26:53 -0600 Subject: [PATCH 03/20] reset statements --- .github/workflows/test_pr_and_main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 4e6407e8a15..7e420905c87 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -354,12 +354,12 @@ jobs: if test "${{matrix.TARGET}}" == 'win'; then CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0" fi - # RUNS + # PASSES pip debug # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) - conda install -q -y pytest - # FAILS + conda install --update-deps -q -y python="${{matrix.python}}" pytest + # PANICS pip debug if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely From aea69e8df296084de1027f99a0009eaf312920c4 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Wed, 22 Oct 2025 15:34:15 -0600 Subject: [PATCH 04/20] Remove setuptools --- .github/workflows/test_pr_and_main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 7e420905c87..c0a185b162a 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -322,8 +322,6 @@ jobs: conda list --show-channel-urls which python python --version - # We need setuptools so we can run Pyomo's setup.py - conda install setuptools # Note: some pypi packages are not available through conda PYOMO_DEPENDENCIES=`python setup.py dependencies \ --extras "$EXTRAS" | tail -1` @@ -358,7 +356,7 @@ jobs: pip debug # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) - conda install --update-deps -q -y python="${{matrix.python}}" pytest + conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES # PANICS pip debug if test -z "${{matrix.slim}}"; then From f06fd4d202d25ac3610ba9f5903c5b54d86f6d80 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Wed, 22 Oct 2025 15:45:38 -0600 Subject: [PATCH 05/20] Remove some more things --- .github/workflows/test_pr_and_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index c0a185b162a..0a90e026cb2 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -356,7 +356,7 @@ jobs: pip debug # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) - conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES + conda install -q -y $CONDA_DEPENDENCIES # PANICS pip debug if test -z "${{matrix.slim}}"; then From e8be275ee94574fcaa09da6b0d57f40685df62a3 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Wed, 22 Oct 2025 16:11:53 -0600 Subject: [PATCH 06/20] Okay after which one does it wig --- .github/workflows/test_pr_and_main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 0a90e026cb2..b9427170604 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -357,8 +357,6 @@ jobs: # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) conda install -q -y $CONDA_DEPENDENCIES - # PANICS - pip debug if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that @@ -423,6 +421,8 @@ jobs: if test -z "$_BUILDS"; then echo "WARNING: $PKG is not available" fi + # PANICS + pip debug done fi # Re-try Pyomo (optional) dependencies with pip From 60acbcb8e745f212eec5d70b3d1969a998ab2ead Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Wed, 22 Oct 2025 16:39:14 -0600 Subject: [PATCH 07/20] What happens if we don't install scip --- .github/workflows/test_pr_and_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index b9427170604..cf689242239 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -373,7 +373,7 @@ jobs: TIMEOUT_MSG="TIMEOUT: killing conda install process" PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') echo "Installing for $PYVER" - for PKG in 'cplex>=12.10' docplex gurobi "$XPRESS" cyipopt pymumps scip; do + for PKG in 'cplex>=12.10' docplex gurobi "$XPRESS" cyipopt pymumps; do echo "" echo "*** Install $PKG ***" echo "" From 9e61d68242f326cbfe71c17c5d6ff75b771b45c3 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Wed, 22 Oct 2025 17:02:15 -0600 Subject: [PATCH 08/20] Try scip for everyything but win, add back in setuptools --- .github/workflows/test_pr_and_main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index cf689242239..c36ade306ea 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -322,6 +322,8 @@ jobs: conda list --show-channel-urls which python python --version + # On 3.14, we need setuptools so we can run Pyomo's setup.py + conda install setuptools # Note: some pypi packages are not available through conda PYOMO_DEPENDENCIES=`python setup.py dependencies \ --extras "$EXTRAS" | tail -1` @@ -373,7 +375,11 @@ jobs: TIMEOUT_MSG="TIMEOUT: killing conda install process" PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') echo "Installing for $PYVER" - for PKG in 'cplex>=12.10' docplex gurobi "$XPRESS" cyipopt pymumps; do + SOLVER_LIST="'cplex>=12.10' docplex gurobi $XPRESS cyipopt pymumps" + if [[ ${{matrix.TARGET}} != win ]]; then + SOLVER_LIST="$SOLVER_LIST scip" + fi + for PKG in $SOLVER_LIST; do echo "" echo "*** Install $PKG ***" echo "" From 9c48d33e74268531419cc84cc4186b6961da55ab Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 11:40:26 -0600 Subject: [PATCH 09/20] Pin to lower setuptools; add back in update-deps; simplify later pip call --- .github/workflows/test_pr_and_main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index c36ade306ea..2b43bd0d5fd 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -323,7 +323,7 @@ jobs: which python python --version # On 3.14, we need setuptools so we can run Pyomo's setup.py - conda install setuptools + conda install setuptools 'pip<24.3' # Note: some pypi packages are not available through conda PYOMO_DEPENDENCIES=`python setup.py dependencies \ --extras "$EXTRAS" | tail -1` @@ -358,7 +358,7 @@ jobs: pip debug # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) - conda install -q -y $CONDA_DEPENDENCIES + conda install --update-deps -q -y $CONDA_DEPENDENCIES if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that @@ -435,7 +435,7 @@ jobs: echo "" echo "Installing packages only available on PyPI" if test -n "$PYPI_DEPENDENCIES"; then - python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES + pip install --cache-dir cache/pip $PYPI_DEPENDENCIES fi # remember this python interpreter python -c 'import sys; print("PYTHON_EXE=%s" \ From aaf2f7eba2dcb06b1e2731776d65b76bc4ffdfb5 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 11:51:09 -0600 Subject: [PATCH 10/20] Older pip --- .github/workflows/test_pr_and_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 2b43bd0d5fd..7064e5d78a0 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -323,7 +323,7 @@ jobs: which python python --version # On 3.14, we need setuptools so we can run Pyomo's setup.py - conda install setuptools 'pip<24.3' + conda install setuptools 'pip<24' # Note: some pypi packages are not available through conda PYOMO_DEPENDENCIES=`python setup.py dependencies \ --extras "$EXTRAS" | tail -1` From fa030016229c2b37a9f0d6010c0c4c6e75810a32 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 12:01:05 -0600 Subject: [PATCH 11/20] It upgrades pip against later because of course it does --- .github/workflows/test_pr_and_main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 7064e5d78a0..b375ec9f5cd 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -323,7 +323,7 @@ jobs: which python python --version # On 3.14, we need setuptools so we can run Pyomo's setup.py - conda install setuptools 'pip<24' + conda install setuptools # Note: some pypi packages are not available through conda PYOMO_DEPENDENCIES=`python setup.py dependencies \ --extras "$EXTRAS" | tail -1` @@ -359,6 +359,7 @@ jobs: # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) conda install --update-deps -q -y $CONDA_DEPENDENCIES + conda install -q -y 'pip<24.3' if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that From b60673e7a5ed13f985cee9880e5a04df2c828591 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 12:17:08 -0600 Subject: [PATCH 12/20] Set some vars --- .github/workflows/test_pr_and_main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index b375ec9f5cd..a5b49605b04 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -322,6 +322,12 @@ jobs: conda list --show-channel-urls which python python --version + if test "${{matrix.TARGET}}" = 'win'; then + export PROGRAMDATA='C:\ProgramData' + export ALLUSERSPROFILE='C:\ProgramData' + export PIP_CONFIG_FILE="$RUNNER_TEMP/pip-empty.ini" + : > "$PIP_CONFIG_FILE" + fi # On 3.14, we need setuptools so we can run Pyomo's setup.py conda install setuptools # Note: some pypi packages are not available through conda @@ -359,7 +365,6 @@ jobs: # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) conda install --update-deps -q -y $CONDA_DEPENDENCIES - conda install -q -y 'pip<24.3' if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that From 45979d281fcd91838f5931611a089450d4260787 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 12:32:33 -0600 Subject: [PATCH 13/20] Try more things --- .github/workflows/test_pr_and_main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index a5b49605b04..395f932a812 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -323,10 +323,21 @@ jobs: which python python --version if test "${{matrix.TARGET}}" = 'win'; then + echo $USERPROFILE + # Make platformdirs use env vars instead of registry + export PLATFORMDIRS_PREFER_ENV=1 + # Provide the dirs platformdirs/pip expect export PROGRAMDATA='C:\ProgramData' export ALLUSERSPROFILE='C:\ProgramData' + export APPDATA="$USERPROFILE\AppData\Roaming" + export LOCALAPPDATA="$USERPROFILE\AppData\Local" + # Ensure they exist (best effort) + mkdir -p "$APPDATA/pip" "$LOCALAPPDATA/pip" || true + # Point pip at an empty config so it doesn't enumerate site configs export PIP_CONFIG_FILE="$RUNNER_TEMP/pip-empty.ini" : > "$PIP_CONFIG_FILE" + # Avoid exercises that trigger config discovery + export PIP_DISABLE_PIP_VERSION_CHECK=1 fi # On 3.14, we need setuptools so we can run Pyomo's setup.py conda install setuptools From b2f8b90d3d3aa6b22a0145a004d89a4c146353e6 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 12:50:24 -0600 Subject: [PATCH 14/20] Move the stuff to later jus tin case conda messes it up --- .github/workflows/test_pr_and_main.yml | 31 +++++++++----------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 395f932a812..625ab190c08 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -322,23 +322,6 @@ jobs: conda list --show-channel-urls which python python --version - if test "${{matrix.TARGET}}" = 'win'; then - echo $USERPROFILE - # Make platformdirs use env vars instead of registry - export PLATFORMDIRS_PREFER_ENV=1 - # Provide the dirs platformdirs/pip expect - export PROGRAMDATA='C:\ProgramData' - export ALLUSERSPROFILE='C:\ProgramData' - export APPDATA="$USERPROFILE\AppData\Roaming" - export LOCALAPPDATA="$USERPROFILE\AppData\Local" - # Ensure they exist (best effort) - mkdir -p "$APPDATA/pip" "$LOCALAPPDATA/pip" || true - # Point pip at an empty config so it doesn't enumerate site configs - export PIP_CONFIG_FILE="$RUNNER_TEMP/pip-empty.ini" - : > "$PIP_CONFIG_FILE" - # Avoid exercises that trigger config discovery - export PIP_DISABLE_PIP_VERSION_CHECK=1 - fi # On 3.14, we need setuptools so we can run Pyomo's setup.py conda install setuptools # Note: some pypi packages are not available through conda @@ -371,11 +354,19 @@ jobs: if test "${{matrix.TARGET}}" == 'win'; then CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0" fi - # PASSES - pip debug # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) conda install --update-deps -q -y $CONDA_DEPENDENCIES + if test "${{matrix.TARGET}}" = 'win'; then + echo "" > "$RUNNER_TEMP/pip-empty.ini" + export PIP_CONFIG_FILE="$RUNNER_TEMP/pip-empty.ini" + # persist for any subshells / subsequent steps that might run a replaced pip + echo "PIP_CONFIG_FILE=$RUNNER_TEMP/pip-empty.ini" >> "$GITHUB_ENV" + # belt & suspenders: set typical Windows dirs so platformdirs won't wander + export PROGRAMDATA="${PROGRAMDATA:-C:\\ProgramData}" + export APPDATA="${APPDATA:-$USERPROFILE\\AppData\\Roaming}" + export LOCALAPPDATA="${LOCALAPPDATA:-$USERPROFILE\\AppData\\Local}" + fi if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that @@ -445,7 +436,7 @@ jobs: echo "WARNING: $PKG is not available" fi # PANICS - pip debug + pip list done fi # Re-try Pyomo (optional) dependencies with pip From 0ad7da0fa1012ee89a7451172bacbd88282b8a11 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 13:01:06 -0600 Subject: [PATCH 15/20] Specifically make registry keys --- .github/workflows/test_pr_and_main.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 625ab190c08..1cb3e0d22a8 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -358,14 +358,17 @@ jobs: # possibly if it outputs messages to stderr) conda install --update-deps -q -y $CONDA_DEPENDENCIES if test "${{matrix.TARGET}}" = 'win'; then - echo "" > "$RUNNER_TEMP/pip-empty.ini" - export PIP_CONFIG_FILE="$RUNNER_TEMP/pip-empty.ini" - # persist for any subshells / subsequent steps that might run a replaced pip - echo "PIP_CONFIG_FILE=$RUNNER_TEMP/pip-empty.ini" >> "$GITHUB_ENV" - # belt & suspenders: set typical Windows dirs so platformdirs won't wander - export PROGRAMDATA="${PROGRAMDATA:-C:\\ProgramData}" - export APPDATA="${APPDATA:-$USERPROFILE\\AppData\\Roaming}" - export LOCALAPPDATA="${LOCALAPPDATA:-$USERPROFILE\\AppData\\Local}" + # Ensure the registry keys that platformdirs looks for actually exist + reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" ^ + /v "Common AppData" /t REG_SZ /d "C:\ProgramData" /f + reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^ + /v "AppData" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\AppData\Roaming" /f + reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^ + /v "Local AppData" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\AppData\Local" /f + # Helpful environment fallbacks (not strictly required once registry exists) + echo "PROGRAMDATA=C:\ProgramData" >> "$GITHUB_ENV" + echo "APPDATA=%USERPROFILE%\AppData\Roaming" >> "$GITHUB_ENV" + echo "LOCALAPPDATA=%USERPROFILE%\AppData\Local" >> "$GITHUB_ENV" fi if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely From 167af94a5b58ec2e92f086dc9d154fb2da341d69 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 13:15:46 -0600 Subject: [PATCH 16/20] Try downgrading setuptools, pip, and platformdirs --- .github/workflows/test_pr_and_main.yml | 30 ++++++-------------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 1cb3e0d22a8..27282c06cf7 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -322,7 +322,7 @@ jobs: conda list --show-channel-urls which python python --version - # On 3.14, we need setuptools so we can run Pyomo's setup.py + # We need setuptools so we can run Pyomo's setup.py conda install setuptools # Note: some pypi packages are not available through conda PYOMO_DEPENDENCIES=`python setup.py dependencies \ @@ -352,24 +352,12 @@ jobs: echo "*** Install Pyomo dependencies ***" # For windows, cannot use newer setuptools because of APPSI compilation issues if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<65.0.0 platformdirs<3.0 pip<24.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) - conda install --update-deps -q -y $CONDA_DEPENDENCIES - if test "${{matrix.TARGET}}" = 'win'; then - # Ensure the registry keys that platformdirs looks for actually exist - reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" ^ - /v "Common AppData" /t REG_SZ /d "C:\ProgramData" /f - reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^ - /v "AppData" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\AppData\Roaming" /f - reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" ^ - /v "Local AppData" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\AppData\Local" /f - # Helpful environment fallbacks (not strictly required once registry exists) - echo "PROGRAMDATA=C:\ProgramData" >> "$GITHUB_ENV" - echo "APPDATA=%USERPROFILE%\AppData\Roaming" >> "$GITHUB_ENV" - echo "LOCALAPPDATA=%USERPROFILE%\AppData\Local" >> "$GITHUB_ENV" - fi + conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES + pip list if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that @@ -386,11 +374,7 @@ jobs: TIMEOUT_MSG="TIMEOUT: killing conda install process" PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') echo "Installing for $PYVER" - SOLVER_LIST="'cplex>=12.10' docplex gurobi $XPRESS cyipopt pymumps" - if [[ ${{matrix.TARGET}} != win ]]; then - SOLVER_LIST="$SOLVER_LIST scip" - fi - for PKG in $SOLVER_LIST; do + for PKG in 'cplex>=12.10' docplex gurobi "$XPRESS" cyipopt pymumps scip; do echo "" echo "*** Install $PKG ***" echo "" @@ -438,15 +422,13 @@ jobs: if test -z "$_BUILDS"; then echo "WARNING: $PKG is not available" fi - # PANICS - pip list done fi # Re-try Pyomo (optional) dependencies with pip echo "" echo "Installing packages only available on PyPI" if test -n "$PYPI_DEPENDENCIES"; then - pip install --cache-dir cache/pip $PYPI_DEPENDENCIES + python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES fi # remember this python interpreter python -c 'import sys; print("PYTHON_EXE=%s" \ From 7475ee5b5513c7dbcb72c33558715dde8d23c0d5 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 13:22:43 -0600 Subject: [PATCH 17/20] Can't do 65 --- .github/workflows/test_pr_and_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 27282c06cf7..99e68e0607f 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -352,7 +352,7 @@ jobs: echo "*** Install Pyomo dependencies ***" # For windows, cannot use newer setuptools because of APPSI compilation issues if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<65.0.0 platformdirs<3.0 pip<24.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<3.0 pip<24.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) From 982af7a3eba530d5566bad3688669c067bb7c989 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 14:10:25 -0600 Subject: [PATCH 18/20] Revert back to normal file with the lines that fix it all --- .github/workflows/test_pr_and_main.yml | 81 +++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index 99e68e0607f..a4d9c941efd 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -92,12 +92,21 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] python: [ '3.10', 3.11, 3.12, 3.13, 3.14 ] other: [""] category: [""] include: + - os: ubuntu-latest + test_docs: 1 + TARGET: linux + PYENV: pip + + - os: macos-latest + test_docs: 1 + TARGET: osx + PYENV: pip - os: windows-latest test_docs: 1 @@ -105,12 +114,79 @@ jobs: PYENV: conda PACKAGES: glpk pytest-qt filelock + # Note: verify that pymumps is available when changing conda python version + - os: ubuntu-latest + python: 3.12 + other: /conda + TARGET: linux + PYENV: conda + PACKAGES: pytest-qt + + - os: ubuntu-latest + python: 3.11 + other: /mpi + mpi: 3 + TARGET: linux + PYENV: conda + PACKAGES: openmpi mpi4py + + - os: ubuntu-latest + python: 3.12 + other: /cython + setup_options: --with-cython + TARGET: linux + PYENV: pip + PACKAGES: cython + - os: windows-latest python: '3.10' other: /pip TARGET: win PYENV: pip + - os: ubuntu-latest + python: 3.11 + other: /singletest + category: "-m 'neos or importtest'" + TARGET: linux + PYENV: pip + + - os: ubuntu-latest + python: '3.10' + other: /slim + slim: 1 + TARGET: linux + PYENV: pip + + - os: ubuntu-latest + python: 3.12 + other: /numpy2 + slim: 1 + TARGET: linux + PYENV: pip + PACKAGES: "gurobipy dill numpy>2.0 scipy networkx" + + - os: ubuntu-latest + python: '3.10' + other: /pyutilib + TARGET: linux + PYENV: pip + PACKAGES: pyutilib + + - os: ubuntu-latest + python: 'pypy-3.11' + TARGET: linux + PYENV: pip + + - os: ubuntu-latest + python: 3.11 + other: /rtd + category: notests + build_docs: 1 + TARGET: linux + PYENV: pip + + steps: - name: Checkout Pyomo source uses: actions/checkout@v4 @@ -352,12 +428,11 @@ jobs: echo "*** Install Pyomo dependencies ***" # For windows, cannot use newer setuptools because of APPSI compilation issues if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<3.0 pip<24.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<3.0 pip<25.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES - pip list if test -z "${{matrix.slim}}"; then # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that From 16baa9a732070bd55e9e684c9f033f92cadfba34 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 14:39:10 -0600 Subject: [PATCH 19/20] Sync two files plus add comments --- .github/workflows/test_branches.yml | 4 +++- .github/workflows/test_pr_and_main.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 109aa2c38d5..b567c3bfbe8 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -375,8 +375,10 @@ jobs: echo "" echo "*** Install Pyomo dependencies ***" # For windows, cannot use newer setuptools because of APPSI compilation issues + # There are also issues with newer platformdirs on windows for 3.13/3.14, + # so pinning that plus a generally considered more "stable" pip version if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<3.0 pip<25.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index a4d9c941efd..f6a2eb5d1b8 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -426,7 +426,9 @@ jobs: done echo "" echo "*** Install Pyomo dependencies ***" - # For windows, cannot use newer setuptools because of APPSI compilation issues + # For windows, cannot use newer setuptools because of APPSI compilation issues. + # There are also issues with newer platformdirs on windows for 3.13/3.14, + # so pinning that plus a generally considered more "stable" pip version if test "${{matrix.TARGET}}" == 'win'; then CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<3.0 pip<25.0" fi From 56212b083740d324cbd9cb44587ed89a73946ee3 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Thu, 23 Oct 2025 17:37:05 -0600 Subject: [PATCH 20/20] Specifically avoid 4.5.0 --- .github/workflows/test_branches.yml | 6 +++--- .github/workflows/test_pr_and_main.yml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index b567c3bfbe8..530ab9cc4e1 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -375,10 +375,10 @@ jobs: echo "" echo "*** Install Pyomo dependencies ***" # For windows, cannot use newer setuptools because of APPSI compilation issues - # There are also issues with newer platformdirs on windows for 3.13/3.14, - # so pinning that plus a generally considered more "stable" pip version + # There seems to be some specific problem with platformdirs 4.5.0 + # on win 3.13/3.14 as of 2025-10-23 if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<3.0 pip<25.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr) diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index f6a2eb5d1b8..59924f6d0e1 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -426,11 +426,11 @@ jobs: done echo "" echo "*** Install Pyomo dependencies ***" - # For windows, cannot use newer setuptools because of APPSI compilation issues. - # There are also issues with newer platformdirs on windows for 3.13/3.14, - # so pinning that plus a generally considered more "stable" pip version + # For windows, cannot use newer setuptools because of APPSI compilation issues + # There seems to be some specific problem with platformdirs 4.5.0 + # on win 3.13/3.14 as of 2025-10-23 if test "${{matrix.TARGET}}" == 'win'; then - CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs<3.0 pip<25.0" + CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0" fi # Note: this will fail the build if any installation fails (or # possibly if it outputs messages to stderr)