Skip to content

Commit

Permalink
Merge pull request #283 from moorepants/switch-to-miniforge
Browse files Browse the repository at this point in the history
Use miniforge instead of mambaforge in CI.
  • Loading branch information
moorepants authored Dec 30, 2024
2 parents 3a563ea + 94faeb0 commit b58b866
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ jobs:
steps:
- name: Checkout CyIpopt
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: test-environment
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniforge-variant: Mambaforge
conda-remove-defaults: "true"
miniforge-version: latest
- name: Install basic dependencies
run: mamba install -y -v lapack "libblas=*=*netlib" "cython>=0.29.28" "ipopt=${{ matrix.ipopt-version }}" numpy>=1.25 pkg-config>=0.29.2 setuptools>=44.1.1 --file docs/requirements.txt
run: conda install -y -v lapack "libblas=*=*netlib" "cython>=0.29.28" "ipopt=${{ matrix.ipopt-version }}" numpy>=1.25 pkg-config>=0.29.2 setuptools>=44.1.1 --file docs/requirements.txt
- name: Install CyIpopt
run: |
rm pyproject.toml
python -m pip install .
mamba list
conda list
- name: Test building documentation
run: cd docs && make clean && make html && cd ..
21 changes: 12 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# TODO : Move to macos-latet which is an arm image, but then the old
# ipopts will not be available, see: https://github.com/actions/runner-images?tab=readme-ov-file#available-images
os: [ubuntu-latest, macos-13, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
ipopt-version: ['3.12', '3.13', '3.14']
exclude:
Expand All @@ -25,27 +27,28 @@ jobs:
shell: bash -l {0}
steps:
- name: Checkout CyIpopt
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: test-environment
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniforge-variant: Mambaforge
conda-remove-defaults: "true"
miniforge-version: latest
- name: Install basic dependencies against generic blas/lapack
run: |
mamba install -q -y "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.25" "pkg-config>=0.29.2" "setuptools>=44.1.1" "cython>=0.29.28" "pytest>=6.2.5"
conda install -q -y "ipopt=${{ matrix.ipopt-version }}" "numpy>=1.25" "pkg-config>=0.29.2" "setuptools>=44.1.1" "cython>=0.29.28" "pytest>=6.2.5"
- run: echo "IPOPTWINDIR=USECONDAFORGEIPOPT" >> $GITHUB_ENV
- name: Install cyipopt
run: |
rm pyproject.toml
python -m pip install --no-deps --no-build-isolation .
mamba list
conda list
- name: Test with pytest and run examples
run: |
python -c "import cyipopt"
mamba list
conda list
pytest
python examples/hs071.py
python examples/exception_handling.py
Expand All @@ -55,6 +58,6 @@ jobs:
# 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.25" "pkg-config>=0.29.2" "setuptools>=44.1.1" "scipy>1.8.0" "pytest>=6.2.5" "cython=0.29.*"
mamba list
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

0 comments on commit b58b866

Please sign in to comment.