Skip to content

Merge pull request #227 from chrhansk/feature-cython3 #240

Merge pull request #227 from chrhansk/feature-cython3

Merge pull request #227 from chrhansk/feature-cython3 #240

Workflow file for this run

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.8', '3.9', '3.10', '3.11']
ipopt-version: ['3.12', '3.13', '3.14']
exclude:
- os: windows-latest
ipopt-version: '3.12'
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-variant: Mambaforge
- name: Install basic dependencies against generic blas/lapack
run: |
mamba install -q -y lapack "libblas=*=*netlib" "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.21.5" "pkg-config>=0.29.2" "setuptools>=44.1.1" "cython=0.29.*"
- run: echo "IPOPTWINDIR=USECONDAFORGEIPOPT" >> $GITHUB_ENV
- name: Install CyIpopt
run: |
rm pyproject.toml
python -m pip install .
mamba list
- name: Test with pytest using OS specific blas/lapack
run: |
python -c "import cyipopt"
mamba remove lapack
mamba install -q -y "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.21.5" "pkg-config>=0.29.2" "setuptools>=44.1.1" "pytest>=6.2.5" "cython=0.29.*"
mamba list
pytest
- name: Test with pytest and scipy, new ipopt
# cyipopt can build with these dependencies, but it seems impossible to
# also install scipy into these environments likely due to SciPy and
# Ipopt needed different libfortrans.
if: (matrix.ipopt-version != '3.12' && matrix.python-version != '3.11') || (matrix.ipopt-version != '3.12' && matrix.python-version != '3.10' && matrix.os != 'macos-latest')
run: |
mamba install -q -y -c conda-forge "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.21.5" "pkg-config>=0.29.2" "setuptools>=44.1.1" "scipy>1.8.0" "pytest>=6.2.5" "cython=0.29.*"
mamba list
pytest