Skip to content

Add DIFFENGINE as canonicalization backend #590

Add DIFFENGINE as canonicalization backend

Add DIFFENGINE as canonicalization backend #590

name: test_optional_solvers
on:
pull_request:
push:
branches:
- master
tags:
- '*'
jobs:
test_optional_solvers:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-14 ] # Windows excluded - cylp/CBC cannot be built
steps:
- uses: actions/checkout@v5
- name: Set Additional Envs
run: |
echo "PYTHON_SUBVERSION=$(echo $PYTHON_VERSION | cut -c 3-)" >> $GITHUB_ENV
echo $MOSEK_CI_BASE64 | base64 -d > mosek.lic
echo "MOSEKLM_LICENSE_FILE=$( [[ $RUNNER_OS == 'macOS' ]] && echo $(pwd)/mosek.lic || echo $(realpath mosek.lic) )" >> $GITHUB_ENV
echo $KNITRO_LICENSE > ~/artelys_lic.txt
- uses: astral-sh/setup-uv@v7
with:
python-version: 3.12
enable-cache: true
- name: Setup Julia
uses: julia-actions/setup-julia@v2
with:
version: 'lts'
- name: Install COSMO
run: julia -e 'using Pkg; Pkg.add("COSMO")'
- name: Install SuiteSparse (macOS)
if: runner.os == 'macOS'
run: brew install suite-sparse
- name: Install cvxpy dependencies and all optional solvers
run: uv sync --all-extras --dev
- name: Install Moreau
if: runner.os == 'Linux'
run: uv pip install moreau --extra-index-url https://${FURY_TOKEN}:@pypi.fury.io/optimalintellect/
env:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
- name: Print installed solvers
run: uv run python -c "import cvxpy; print(cvxpy.installed_solvers())"
- name: Run test_conic_solvers
run: uv run pytest -rs cvxpy/tests/test_conic_solvers.py
- name: Run test_qp_solvers
if: always()
run: uv run pytest -rs cvxpy/tests/test_qp_solvers.py
env:
RUNNER_OS: ${{ matrix.os }}
PYTHON_VERSION: 3.12
KNITRO_LICENSE: ${{ secrets.KNITRO_LICENSE }}
MOREAU_LICENSE_KEY: ${{ secrets.MOREAU_KEY }}