diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d4801df..4853051 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 .. diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b1d250c..49de015 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: @@ -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 @@ -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