Highspy and Xpress are not installed by `pythonpackage` github action workflow when they are supposed to be
simon-b opened this issue · comments
Highspy is supposed to be installed for several matrix tests:
https://github.com/coin-or/pulp/blob/master/.github/workflows/pythonpackage.yml#L36
if: (matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest') && matrix.python-version < '3.12'
However, this step is not actually run in all cases where it is expected.
E.g here, install highspy
step is skipped across many matrix jobs, for example with python 3.7 and os "ubuntu-latest":
https://github.com/coin-or/pulp/actions/runs/7694250028
The step install xpress
is also skipped in that same example, even though the condition for install xpress
should be hit:
if: (matrix.os != 'macOS-latest' || matrix.python-version < '3.11') && matrix.python-version < '3.12'
I believe this is because the checks on matrix.python-version
are not valid -- these are e.g. a float check or string comparison and not a proper version comparison.
I observe that install highs
runs with ubuntu-latest
and python 3.10
and 3.11
and with no other python versions:
https://github.com/coin-or/pulp/actions/runs/7694250028/job/20964667848
https://github.com/coin-or/pulp/actions/runs/7694250028/job/20964668719
Therefore I believe that matrix.python-version < '3.12'
is treated as a float comparison
thanks and it makes sense. Do you know how to solve it? Would you mind doing a PR? This is the only thing I found: https://stackoverflow.com/questions/73598359/github-actions-run-only-if-above-certain-python-version
Hmm yeah that's the only clear solution I can see on google. I can test this change when I have some time.
For current matrix it should work out for now with only 3.x
; not any 2.x
or 3.x.y
.
Only other ideas I have would be to:
- list out explicitly what's valid, like
matrix.python-version == '3.12' || matrix.python-version == '3.11' || ...
- add one or more version-check steps invoking
packaging.version.parse
to properly compare and set output flag
The solution proposed on SO is probably the simplest/quickest fix at least in short term.
sure, if you do the PR I'll take a look, thanks!
I actually fixed this in an uglier but simpler way: https://github.com/coin-or/pulp/pull/734/files
I took out mac-OS from the xpress tests because it appears to fail all the time. Now highspy is tested for all three distros. I'm closing for now.