Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/pyomo/pyomo into cyipopt-cb
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbybp committed Feb 19, 2024
2 parents e3fe5c9 + 825742e commit c2637ff
Show file tree
Hide file tree
Showing 1,971 changed files with 18,906 additions and 10,256 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ ed13c8c65d6c3f56973887744be1c62a5d4756de
0d93f98aa608f892df404ad8015885d26e09bb55
63a3c602a00a2b747fc308c0571bbe33e55a3731
363a16a609f519b3edfdfcf40c66d6de7ac135af
d024718991455519e09149ede53a38df1c067abe
017e21ee50d98d8b2f2083e6880f030025ed5378

8 changes: 4 additions & 4 deletions .github/workflows/release_wheel_creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_BUILD: pip install cython pybind11
CIBW_CONFIG_SETTINGS: '--global-option="--with-cython --with-distributable-extensions"'
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: native_wheels
path: dist/*.whl
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_BUILD: pip install cython pybind11
CIBW_CONFIG_SETTINGS: '--global-option="--with-cython --with-distributable-extensions"'
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: alt_wheels
path: dist/*.whl
Expand All @@ -91,7 +91,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -102,7 +102,7 @@ jobs:
run: |
python setup.py --without-cython sdist --format=gztar
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: generictarball
path: dist
Expand Down
62 changes: 30 additions & 32 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Checkout Pyomo source
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Black Formatting Check
Expand Down Expand Up @@ -75,15 +75,15 @@ jobs:
python: 3.9
TARGET: win
PYENV: conda
PACKAGES: glpk
PACKAGES: glpk pytest-qt

- os: ubuntu-latest
python: '3.11'
other: /conda
skip_doctest: 1
TARGET: linux
PYENV: conda
PACKAGES:
PACKAGES: pytest-qt

- os: ubuntu-latest
python: 3.9
Expand Down Expand Up @@ -134,23 +134,23 @@ jobs:
| tr '\n' ' ' | sed 's/ \+/ /g' >> $GITHUB_ENV
#- name: Pip package cache
# uses: actions/cache@v3
# uses: actions/cache@v4
# if: matrix.PYENV == 'pip'
# id: pip-cache
# with:
# path: cache/pip
# key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-${{matrix.python}}

#- name: OS package cache
# uses: actions/cache@v3
# uses: actions/cache@v4
# if: matrix.TARGET != 'osx'
# id: os-cache
# with:
# path: cache/os
# key: pkg-${{env.CACHE_VER}}.0-${{runner.os}}

- name: TPL package download cache
uses: actions/cache@v3
uses: actions/cache@v4
if: ${{ ! matrix.slim }}
id: download-cache
with:
Expand Down Expand Up @@ -202,17 +202,26 @@ jobs:
- name: Set up Python ${{ matrix.python }}
if: matrix.PYENV == 'pip'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Set up Miniconda Python ${{ matrix.python }}
if: matrix.PYENV == 'conda'
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: false
python-version: ${{ matrix.python }}

# This is necessary for qt (UI) tests; the package utilized here does not
# have support for OSX.
- name: Set up UI testing infrastructure
if: ${{ matrix.TARGET != 'osx' }}
uses: pyvista/setup-headless-display-action@v2
with:
qt: true
pyvista: false

# GitHub actions is very fragile when it comes to setting up various
# Python interpreters, expecially the setup-miniconda interface.
# Per the setup-miniconda documentation, it is important to always
Expand Down Expand Up @@ -309,7 +318,7 @@ jobs:
fi
# HACK: Remove problem packages on conda+Linux
if test "${{matrix.TARGET}}" == linux; then
EXCLUDE="casadi numdifftools pint $EXCLUDE"
EXCLUDE="casadi numdifftools $EXCLUDE"
fi
EXCLUDE=`echo "$EXCLUDE" | xargs`
if test -n "$EXCLUDE"; then
Expand Down Expand Up @@ -346,10 +355,11 @@ jobs:
| sed -r 's/\s+/ /g' | cut -d\ -f3) || echo ""
if test -n "$_BUILDS"; then
_ISPY=$(echo "$_BUILDS" | grep "^py") \
|| echo "No python build detected"
_PYOK=$(echo "$_BUILDS" | grep "^$PYVER") \
|| echo "No python build matching $PYVER detected"
|| echo "INFO: No python build detected."
_PYOK=$(echo "$_BUILDS" | grep -E "^($PYVER|pyh)") \
|| echo "INFO: No python build matching $PYVER detected."
if test -z "$_ISPY" -o -n "$_PYOK"; then
echo ""
echo "... INSTALLING $PKG"
conda install -y "$PKG" || _BUILDS=""
fi
Expand All @@ -358,18 +368,6 @@ jobs:
echo "WARNING: $PKG is not available"
fi
done
# TODO: This is a hack to stop test_qt.py from running until we
# can better troubleshoot why it fails on GHA
for QTPACKAGE in qt pyqt; do
# Because conda is insane, removing packages can cause
# unrelated packages to be updated (breaking version
# specifications specified previously, e.g., in
# setup.py). There doesn't appear to be a good
# workaround, so we will just force-remove (recognizing
# that it may break other conda cruft).
conda remove --force-remove $QTPACKAGE \
|| echo "$QTPACKAGE not in this environment"
done
fi
# Re-try Pyomo (optional) dependencies with pip
if test -n "$PYPI_DEPENDENCIES"; then
Expand Down Expand Up @@ -623,7 +621,7 @@ jobs:
$PYTHON_EXE -m pytest -v \
-W ignore::Warning ${{matrix.category}} \
pyomo `pwd`/pyomo-model-libraries \
`pwd`/examples/pyomobook --junitxml="TEST-pyomo.xml"
`pwd`/examples `pwd`/doc --junitxml="TEST-pyomo.xml"
- name: Run Pyomo MPI tests
if: matrix.mpi != 0
Expand All @@ -650,7 +648,7 @@ jobs:
coverage xml -i
- name: Record build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{github.job}}_${{env.GHA_JOBGROUP}}-${{env.GHA_JOBNAME}}
path: |
Expand All @@ -670,7 +668,7 @@ jobs:
uses: actions/checkout@v4

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

Expand Down Expand Up @@ -726,19 +724,19 @@ jobs:
# We need the source for .codecov.yml and running "coverage xml"

#- name: Pip package cache
# uses: actions/cache@v3
# uses: actions/cache@v4
# id: pip-cache
# with:
# path: cache/pip
# key: pip-${{env.CACHE_VER}}.0-${{runner.os}}-3.8

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

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

Expand Down Expand Up @@ -833,7 +831,7 @@ jobs:
- name: Upload codecov reports
if: github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: coverage.xml
token: ${{ secrets.PYOMO_CODECOV_TOKEN }}
Expand All @@ -845,7 +843,7 @@ jobs:
if: |
hashFiles('coverage-other.xml') != '' &&
(github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main')
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: coverage-other.xml
token: ${{ secrets.PYOMO_CODECOV_TOKEN }}
Expand Down
Loading

0 comments on commit c2637ff

Please sign in to comment.