From f2b54acc25824f07c1dbafcb7d1acf345161b208 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Mon, 30 Dec 2024 21:00:03 +0100 Subject: [PATCH 1/4] Use miniforge instead of mambaforge in CI. --- .github/workflows/tests.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b1d250c..07eb26b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,27 +25,27 @@ 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 + 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 +55,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 From 85808a59493e287f1d9a00b5236a61a2e06065e5 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Mon, 30 Dec 2024 21:01:33 +0100 Subject: [PATCH 2/4] Switch to conda + miniforge in docs build. --- .github/workflows/docs.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d4801df..d38e6ff 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,19 +22,19 @@ 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 + 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 .. From 4ad3c33b95b5fcbcfc5b794f9df631b2e1709a21 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Mon, 30 Dec 2024 21:11:07 +0100 Subject: [PATCH 3/4] Use a macos intel image since old ipopts are not built for arm. --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 07eb26b..59f0c9f 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: From 94faeb07adda34a0e8ede7161c60fb604ac49f38 Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Mon, 30 Dec 2024 21:15:21 +0100 Subject: [PATCH 4/4] Remove the defaults channel. --- .github/workflows/docs.yml | 1 + .github/workflows/tests.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d38e6ff..4853051 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,6 +28,7 @@ jobs: activate-environment: test-environment python-version: ${{ matrix.python-version }} channels: conda-forge + conda-remove-defaults: "true" miniforge-version: latest - name: Install basic dependencies 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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 59f0c9f..49de015 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,6 +34,7 @@ jobs: activate-environment: test-environment python-version: ${{ matrix.python-version }} channels: conda-forge + conda-remove-defaults: "true" miniforge-version: latest - name: Install basic dependencies against generic blas/lapack run: |