Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ad-hoc macOS testing with Apple Silicon GHA hosted runners #1306

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 40 additions & 44 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,11 @@ jobs:
os:
- linux
- win64
# - macos
include:
- os: linux
os-version: ubuntu-20.04
- os: win64
os-version: windows-2019
# - os: macos
# os-version: macos-10.15
- python-version: '3.8'
# limit uploading coverage report for a single Python version in the matrix
cov_report: true
Expand Down Expand Up @@ -142,6 +139,46 @@ jobs:
run: |
make -C docs linkcheck -d

# unlike other GHA runners, Miniconda is not installed by default on macos-14
# see actions/runner-images#9262
test-macos:
name: Tests (py${{ matrix.python-version }}/macos:M1)
runs-on: macos-14
needs: [code-formatting]
strategy:
fail-fast: false
matrix:
python-version:
# minimum available Python version is 3.10
# - '3.8'
# - '3.9'
- '3.10'
- '3.11'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
echo '::group::Output of "pip install" commands'
pip install -r requirements-dev.txt
echo '::endgroup::'
echo '::group::Output of "pip install -U ray" command'
pip install -U ray
echo '::endgroup::'
echo '::group::Display installed packages'
pip list
pip show watertap idaes-pse
echo '::endgroup::'
echo '::group::Output of "idaes get-extensions" command'
idaes get-extensions --verbose
echo '::endgroup::'
- name: Test with pytest
run: |
pytest --pyargs watertap

user-mode-pytest:
name: pytest (user mode) (py${{ matrix.python-version }}/${{ matrix.os }})
runs-on: ${{ matrix.os-version }}
Expand Down Expand Up @@ -240,44 +277,3 @@ jobs:
- name: Run pytest with nbmake
run:
pytest --nbmake **/*.ipynb

macos:
name: macOS setup (EXPERIMENTAL)
runs-on: macos-11
needs: [code-formatting]
strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: watertap
python-version: ${{ matrix.python-version }}
- name: Install WaterTAP (dev) without idaes get-extensions
run: |
echo '::group::Output of "conda install" commands'
conda install --quiet --yes pip=21.1 wheel setuptools pandoc
echo '::endgroup::'
echo '::group::Output of "pip install" commands'
pip install -r requirements-dev.txt
echo '::endgroup::'
echo '::group::Display installed packages'
conda list
pip list
pip show pyomo idaes-pse
echo '::endgroup::'
- name: Install Ipopt from conda-forge
run:
conda install --quiet --yes -c conda-forge ipopt=3.14.11
- name: Build Pyomo extensions
run: |
conda install --quiet --yes cmake
# some failures are expected, but this should succeed as long as pynumero is built correctly
pyomo build-extensions || python -c "from pyomo.contrib.pynumero.asl import AmplInterface; exit(0) if AmplInterface.available() else exit(1)"
- name: Run pytest
run: |
pytest --pyargs watertap -k 'not (nf_dspmde.nf_ui or nf_dspmde.nf_with_bypass_ui or mvc.mvc_single_stage_ui)'
Loading