@@ -63,12 +63,18 @@ jobs:
6363 os : ["ubuntu-latest", "windows-latest", "macos-latest"]
6464 python-version : ["3.11", "3.12", "3.13"]
6565 include :
66- - extras_best_effort : false
66+ - extras_best_effort : false # If True, try to install each extra separately and skip those that fail to install
67+ skip_extras : ' ' # JSON array of extras not to install
6768 - os : macos-latest
6869 python-version : 3.13
6970 extras_best_effort : true
7071 - os : windows-latest
7172 extras_best_effort : true
73+ - os : ubuntu-latest
74+ python-version : 3.13
75+ # cvxopt wheel for 3.13 is bundled with GLPK 4.65, which has a known bug, see
76+ # https://github.com/cvxopt/cvxopt-wheels/issues/8
77+ skip_extras : ' ["glpk-mi"]'
7278
7379 name : Python tests (${{ matrix.python-version }}, ${{ matrix.os }})
7480 runs-on : ${{ matrix.os }}
@@ -92,17 +98,23 @@ jobs:
9298 run : uv sync
9399
94100 - name : Install additional backends
95- if : ${{ ! matrix.extras_best_effort }}
101+ if : ${{ ! matrix.extras_best_effort && matrix.skip_extras == '' }}
96102 run : uv sync --all-extras
97103
98104 - name : Install additional backends (best effort)
99- if : ${{ matrix.extras_best_effort }}
105+ if : ${{ matrix.extras_best_effort || matrix.skip_extras != '' }}
100106 env :
101107 NO_COLOR : 1
102108 shell : bash
103109 run : |
104110 while read -r -a extra_deps; do
105111 extra_name="${extra_deps[0]}"
112+ if jq --exit-status --null-input --arg extra "${extra_name}" \
113+ '${{ matrix.skip_extras && matrix.skip_extras || '[]' }} | contains([$extra])' > /dev/null;
114+ then
115+ echo "NOT installing $extra_name backend"
116+ continue
117+ fi
106118 deps=("${extra_deps[@]:1}")
107119 echo "::group::Installing $extra_name backend"
108120 uv pip install "${deps[@]}" \
@@ -111,7 +123,7 @@ jobs:
111123 done < <(
112124 # for each extra, output the extra name followed by the listed dependencies, space-separated
113125 uvx hatch project metadata \
114- | jq -r '."optional-dependencies" | to_entries[] | "\(.key) \(.value | join(" "))"'
126+ | jq --raw-output '."optional-dependencies" | to_entries[] | "\(.key) \(.value | join(" "))"'
115127 )
116128
117129 - name : Test with pytest
0 commit comments