-
Notifications
You must be signed in to change notification settings - Fork 56
55 lines (52 loc) · 2.04 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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