diff --git a/.github/workflows/test_branches.yml b/.github/workflows/test_branches.yml index 7b0e9843981..26026eace8b 100644 --- a/.github/workflows/test_branches.yml +++ b/.github/workflows/test_branches.yml @@ -304,7 +304,14 @@ jobs: python -m pip install --cache-dir cache/pip pymysql || \ python -m pip install --cache-dir cache/pip pymysql if test -z "${{matrix.slim}}"; then - python -m pip install --cache-dir cache/pip 'cplex!=22.1.2.1' docplex \ + # Disallow cplex 22.1.2.1 because it errors fatally when + # computing IIS on python 3.13 and 3.14 + if [[ ${{matrix.python}} =~ 3.1[34] ]]; then + CPLEX='cplex!=22.1.2.1' + else + CPLEX='cplex' + fi + python -m pip install --cache-dir cache/pip "$CPLEX" docplex \ || echo "WARNING: CPLEX Community Edition is not available" python -m pip install --cache-dir cache/pip gurobipy \ || echo "WARNING: Gurobi is not available" @@ -375,6 +382,18 @@ jobs: # possibly if it outputs messages to stderr) conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES if test -z "${{matrix.slim}}"; then + TIMEOUT_MSG="TIMEOUT: killing conda install process" + PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') + echo "Installing for $PYVER" + # + # Disallow cplex 22.1.2 and 22.1.2.1, as they error fatally when + # computing IIS on Python 3.13 and 3.14 + # Disallow cplex 12.9 (caused segfaults in tests) + if [[ ${{matrix.python}} =~ 3.1[34] ]]; then + CPLEX='cplex>=12.10,<22.1.2|>22.1.2.1' + else + CPLEX='cplex>=12.10' + fi # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that # release on that platform. @@ -387,10 +406,7 @@ jobs: else XPRESS='xpress' fi - TIMEOUT_MSG="TIMEOUT: killing conda install process" - PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') - echo "Installing for $PYVER" - for PKG in 'cplex>=12.10' docplex gurobi "$XPRESS" cyipopt pymumps scip; do + for PKG in "$CPLEX" docplex gurobi "$XPRESS" cyipopt pymumps scip; do echo "" echo "*** Install $PKG ***" echo "" diff --git a/.github/workflows/test_pr_and_main.yml b/.github/workflows/test_pr_and_main.yml index c14d52bb316..32663db656a 100644 --- a/.github/workflows/test_pr_and_main.yml +++ b/.github/workflows/test_pr_and_main.yml @@ -356,7 +356,14 @@ jobs: python -m pip install --cache-dir cache/pip pymysql || \ python -m pip install --cache-dir cache/pip pymysql if test -z "${{matrix.slim}}"; then - python -m pip install --cache-dir cache/pip 'cplex!=22.1.2.1' docplex \ + # Disallow cplex 22.1.2.1 because it errors fatally when + # computing IIS on python 3.13 and 3.14 + if [[ ${{matrix.python}} =~ 3.1[34] ]]; then + CPLEX='cplex!=22.1.2.1' + else + CPLEX='cplex' + fi + python -m pip install --cache-dir cache/pip "$CPLEX" docplex \ || echo "WARNING: CPLEX Community Edition is not available" python -m pip install --cache-dir cache/pip gurobipy \ || echo "WARNING: Gurobi is not available" @@ -427,6 +434,18 @@ jobs: # possibly if it outputs messages to stderr) conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES if test -z "${{matrix.slim}}"; then + TIMEOUT_MSG="TIMEOUT: killing conda install process" + PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') + echo "Installing for $PYVER" + # + # Disallow cplex 22.1.2 and 22.1.2.1, as they error fatally when + # computing IIS on Python 3.13 and 3.14 + # Disallow cplex 12.9 (caused segfaults in tests) + if [[ ${{matrix.python}} =~ 3.1[34] ]]; then + CPLEX='cplex>=12.10,<22.1.2|>22.1.2.1' + else + CPLEX='cplex>=12.10' + fi # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely # on GHA/Windows under Python 3.10 and 3.11. Exclude that # release on that platform. @@ -439,10 +458,7 @@ jobs: else XPRESS='xpress' fi - TIMEOUT_MSG="TIMEOUT: killing conda install process" - PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') - echo "Installing for $PYVER" - for PKG in 'cplex>=12.10' docplex gurobi "$XPRESS" cyipopt pymumps scip; do + for PKG in "$CPLEX" docplex gurobi "$XPRESS" cyipopt pymumps scip; do echo "" echo "*** Install $PKG ***" echo ""