Download miniforge. #64
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
name: tests | |
on: [push, pull_request] | |
# cancels prior builds for this workflow when new commit is pushed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build and run tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.9', '3.10', '3.11', '3.12'] | |
ipopt-version: ['3.13', '3.14'] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout CyIpopt | |
uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
activate-environment: test-environment | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
miniforge-version: "latest" | |
- name: Install basic dependencies against generic blas/lapack | |
run: | | |
conda install -q -y liblapack "libblas=*=*netlib" "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.25" "pkg-config>=0.29.2" "setuptools>=44.1.1" "cython>=0.29.28" | |
- run: echo "IPOPTWINDIR=USECONDAFORGEIPOPT" >> $GITHUB_ENV | |
- name: Install CyIpopt | |
run: | | |
rm pyproject.toml | |
python -m pip install --no-deps --no-build-isolation . | |
conda list | |
- name: Test with pytest using OS specific blas/lapack | |
run: | | |
python -c "import cyipopt" | |
conda remove liblapack | |
conda install -q -y "libblas=*=*openblas" "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.25" "pkg-config>=0.29.2" "setuptools>=44.1.1" "pytest>=6.2.5" "cython=0.29.*" | |
conda list | |
pytest | |
python examples/hs071.py | |
python examples/exception_handling.py | |
- name: Test with pytest and scipy, new ipopt | |
run: | | |
conda install -q -y -c conda-forge "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.25" "pkg-config>=0.29.2" "setuptools>=44.1.1" "scipy>1.8.0" "pytest>=6.2.5" "cython=0.29.*" | |
conda list | |
pytest |