Repository navigation
63 lines (58 loc) · 1.92 KB
/
Copy pathpython.yaml
File metadata and controls
63 lines (58 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Python package: tests (including the shared conformance suite) on three
# platforms, from the lock file, plus one job at the minimum supported highspy.
on:
push:
pull_request:
name: python.yaml
permissions: read-all
jobs:
test:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (Python ${{ matrix.python }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.10", "3.13"]
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v10.2.0
- run: uv sync --locked --extra test --python ${{ matrix.python }}
- run: uv run --locked python -c "import highspy; print('HiGHS', highspy.Highs().version())"
- run: uv run --locked pytest -q
minimum:
runs-on: ubuntu-latest
name: ubuntu-latest (minimum highspy)
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v10.2.0
- run: uv venv --python 3.10
- run: uv pip install -e ".[test]" "highspy==1.15.1"
- run: uv run --no-sync pytest -q
package:
runs-on: ubuntu-latest
name: build and install the wheel
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v10.2.0
- run: uv build
- run: |
uv venv /tmp/clean --python 3.12
uv pip install --python /tmp/clean dist/*.whl
cd /tmp && /tmp/clean/bin/python -c "
import turflp
from turflp import datasets
tie = [[0,1,0,0,1],[0,0,1,1,1],[0,0,1,1,0],[0,1,0,0,1],[0,0,1,0,1],[1,0,0,1,0],[1,1,0,0,0],[0,1,1,0,1]]
p = turflp.turf(tie, 2)
assert p.products == (1, 2) and p.reach == 7, p
assert datasets.load('cafe').values.shape == (2500, 40)
print('clean install ok')"