forked from Pyomo/pyomo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
327 changed files
with
15,023 additions
and
4,706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,12 +40,26 @@ jobs: | |
python-version: '3.10' | ||
- name: Black Formatting Check | ||
run: | | ||
pip install black | ||
# Note v24.4.1 fails due to a bug in the parser | ||
pip install 'black!=24.4.1' | ||
black . -S -C --check --diff --exclude examples/pyomobook/python-ch/BadIndent.py | ||
- name: Spell Check | ||
uses: crate-ci/typos@master | ||
with: | ||
config: ./.github/workflows/typos.toml | ||
- name: URL Checker | ||
uses: urlstechie/[email protected] | ||
with: | ||
# A comma-separated list of file types to cover in the URL checks | ||
file_types: .md,.rst | ||
# Choose whether to include file with no URLs in the prints. | ||
print_all: false | ||
# More verbose summary at the end of a run | ||
verbose: true | ||
# How many times to retry a failed request (defaults to 1) | ||
retry_count: 3 | ||
# Exclude Jenkins because it's behind a firewall | ||
exclude_urls: https://pyomo-jenkins.sandia.gov/ | ||
|
||
|
||
build: | ||
|
@@ -92,7 +106,7 @@ jobs: | |
skip_doctest: 1 | ||
TARGET: linux | ||
PYENV: conda | ||
PACKAGES: mpi4py | ||
PACKAGES: openmpi mpi4py | ||
|
||
- os: ubuntu-latest | ||
python: '3.10' | ||
|
@@ -180,7 +194,7 @@ jobs: | |
# Notes: | ||
# - install glpk | ||
# - pyodbc needs: gcc pkg-config unixodbc freetds | ||
for pkg in bash pkg-config unixodbc freetds glpk; do | ||
for pkg in bash pkg-config unixodbc freetds glpk ginac; do | ||
brew list $pkg || brew install $pkg | ||
done | ||
|
@@ -192,7 +206,8 @@ jobs: | |
# - install glpk | ||
# - ipopt needs: libopenblas-dev gfortran liblapack-dev | ||
sudo apt-get -o Dir::Cache=${GITHUB_WORKSPACE}/cache/os \ | ||
install libopenblas-dev gfortran liblapack-dev glpk-utils | ||
install libopenblas-dev gfortran liblapack-dev glpk-utils \ | ||
libginac-dev | ||
sudo chmod -R 777 ${GITHUB_WORKSPACE}/cache/os | ||
- name: Update Windows | ||
|
@@ -263,11 +278,12 @@ jobs: | |
if test -z "${{matrix.slim}}"; then | ||
python -m pip install --cache-dir cache/pip cplex docplex \ | ||
|| echo "WARNING: CPLEX Community Edition is not available" | ||
python -m pip install --cache-dir cache/pip \ | ||
-i https://pypi.gurobi.com gurobipy==10.0.3 \ | ||
python -m pip install --cache-dir cache/pip gurobipy==10.0.3 \ | ||
|| echo "WARNING: Gurobi is not available" | ||
python -m pip install --cache-dir cache/pip xpress \ | ||
|| echo "WARNING: Xpress Community Edition is not available" | ||
python -m pip install --cache-dir cache/pip maingopy \ | ||
|| echo "WARNING: MAiNGO is not available" | ||
if [[ ${{matrix.python}} == pypy* ]]; then | ||
echo "skipping wntr for pypy" | ||
else | ||
|
@@ -337,7 +353,7 @@ jobs: | |
echo "*** Install Pyomo dependencies ***" | ||
# Note: this will fail the build if any installation fails (or | ||
# possibly if it outputs messages to stderr) | ||
conda install --update-deps -y $CONDA_DEPENDENCIES | ||
conda install --update-deps -q -y $CONDA_DEPENDENCIES | ||
if test -z "${{matrix.slim}}"; then | ||
PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') | ||
echo "Installing for $PYVER" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,11 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
workflow_dispatch: | ||
inputs: | ||
git-ref: | ||
|
@@ -34,6 +39,8 @@ jobs: | |
lint: | ||
name: lint/style-and-typos | ||
runs-on: ubuntu-latest | ||
if: | | ||
contains(github.event.pull_request.title, '[WIP]') != true && !github.event.pull_request.draft | ||
steps: | ||
- name: Checkout Pyomo source | ||
uses: actions/checkout@v4 | ||
|
@@ -43,12 +50,26 @@ jobs: | |
python-version: '3.10' | ||
- name: Black Formatting Check | ||
run: | | ||
pip install black | ||
# Note v24.4.1 fails due to a bug in the parser | ||
pip install 'black!=24.4.1' | ||
black . -S -C --check --diff --exclude examples/pyomobook/python-ch/BadIndent.py | ||
- name: Spell Check | ||
uses: crate-ci/typos@master | ||
with: | ||
config: ./.github/workflows/typos.toml | ||
- name: URL Checker | ||
uses: urlstechie/[email protected] | ||
with: | ||
# A comma-separated list of file types to cover in the URL checks | ||
file_types: .md,.rst | ||
# Choose whether to include file with no URLs in the prints. | ||
print_all: false | ||
# More verbose summary at the end of a run | ||
verbose: true | ||
# How many times to retry a failed request (defaults to 1) | ||
retry_count: 3 | ||
# Exclude Jenkins because it's behind a firewall | ||
exclude_urls: https://pyomo-jenkins.sandia.gov/ | ||
|
||
|
||
build: | ||
|
@@ -93,7 +114,7 @@ jobs: | |
skip_doctest: 1 | ||
TARGET: linux | ||
PYENV: conda | ||
PACKAGES: mpi4py | ||
PACKAGES: openmpi mpi4py | ||
|
||
- os: ubuntu-latest | ||
python: '3.11' | ||
|
@@ -210,7 +231,7 @@ jobs: | |
# Notes: | ||
# - install glpk | ||
# - pyodbc needs: gcc pkg-config unixodbc freetds | ||
for pkg in bash pkg-config unixodbc freetds glpk; do | ||
for pkg in bash pkg-config unixodbc freetds glpk ginac; do | ||
brew list $pkg || brew install $pkg | ||
done | ||
|
@@ -222,7 +243,8 @@ jobs: | |
# - install glpk | ||
# - ipopt needs: libopenblas-dev gfortran liblapack-dev | ||
sudo apt-get -o Dir::Cache=${GITHUB_WORKSPACE}/cache/os \ | ||
install libopenblas-dev gfortran liblapack-dev glpk-utils | ||
install libopenblas-dev gfortran liblapack-dev glpk-utils \ | ||
libginac-dev | ||
sudo chmod -R 777 ${GITHUB_WORKSPACE}/cache/os | ||
- name: Update Windows | ||
|
@@ -293,11 +315,12 @@ jobs: | |
if test -z "${{matrix.slim}}"; then | ||
python -m pip install --cache-dir cache/pip cplex docplex \ | ||
|| echo "WARNING: CPLEX Community Edition is not available" | ||
python -m pip install --cache-dir cache/pip \ | ||
-i https://pypi.gurobi.com gurobipy==10.0.3 \ | ||
python -m pip install --cache-dir cache/pip gurobipy==10.0.3 \ | ||
|| echo "WARNING: Gurobi is not available" | ||
python -m pip install --cache-dir cache/pip xpress \ | ||
|| echo "WARNING: Xpress Community Edition is not available" | ||
python -m pip install --cache-dir cache/pip maingopy \ | ||
|| echo "WARNING: MAiNGO is not available" | ||
if [[ ${{matrix.python}} == pypy* ]]; then | ||
echo "skipping wntr for pypy" | ||
else | ||
|
@@ -363,6 +386,7 @@ jobs: | |
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES $PKG" | ||
fi | ||
done | ||
echo "" | ||
echo "*** Install Pyomo dependencies ***" | ||
# Note: this will fail the build if any installation fails (or | ||
# possibly if it outputs messages to stderr) | ||
|
@@ -605,7 +629,8 @@ jobs: | |
if: ${{ ! matrix.slim }} | ||
shell: bash | ||
run: | | ||
$PYTHON_EXE -m pip install --cache-dir cache/pip highspy \ | ||
echo "NOTE: temporarily pinning to highspy pre-release for testing" | ||
$PYTHON_EXE -m pip install --cache-dir cache/pip "highspy>=1.7.1.dev1" \ | ||
|| echo "WARNING: highspy is not available" | ||
- name: Set up coverage tracking | ||
|
@@ -733,7 +758,7 @@ jobs: | |
cover: | ||
name: process-coverage-${{ matrix.TARGET }} | ||
needs: build | ||
if: always() # run even if a build job fails | ||
if: success() || failure() # run even if a build job fails, but not if cancelled | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 10 | ||
strategy: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.