1+ name : build-python-sdist
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ build_sdist_ubuntu :
7+ runs-on : ${{ matrix.os }}
8+ strategy :
9+ matrix :
10+ os : [ubuntu-latest]
11+
12+ steps :
13+ - uses : actions/checkout@v4
14+ - uses : seanmiddleditch/gha-setup-ninja@master
15+
16+ - name : Build sdist
17+ shell : bash
18+ run : pipx run build --sdist
19+
20+ - name : check metadata
21+ run : pipx run twine check dist/*
22+
23+ - name : install highspy
24+ run : |
25+ python3 -m pip install dist/*.tar.gz --user
26+
27+ - name : Test Python Examples
28+ run : |
29+ python3 ./examples/call_highs_from_python_highspy.py
30+ python3 ./examples/call_highs_from_python_mps.py
31+ python3 ./examples/call_highs_from_python.py
32+ python3 ./examples/minimal.py
33+
34+ build_sdist_mac :
35+ runs-on : ${{ matrix.os }}
36+ strategy :
37+ matrix :
38+ os : [macos-latest]
39+
40+ steps :
41+ - uses : actions/checkout@v4
42+ - uses : seanmiddleditch/gha-setup-ninja@master
43+
44+ - name : Build sdist
45+ shell : bash
46+ run : pipx run build --sdist
47+
48+ - name : check metadata
49+ run : pipx run twine check dist/*
50+
51+ - name : install highspy
52+ run : |
53+ python3 -m venv path/to/venv
54+ source path/to/venv/bin/activate
55+ python3 -m pip install dist/*.tar.gz
56+
57+ - name : Test Python Examples
58+ run : |
59+ source path/to/venv/bin/activate
60+ python3 ./examples/call_highs_from_python_highspy.py
61+ python3 ./examples/call_highs_from_python_mps.py
62+ python3 ./examples/call_highs_from_python.py
63+ python3 ./examples/minimal.py
64+
65+ build_sdist_win :
66+ runs-on : windows-latest
67+
68+ steps :
69+ - uses : actions/checkout@v4
70+
71+ - name : Build sdist
72+ shell : bash
73+ run : pipx run build --sdist
74+
75+ - name : check metadata
76+ run : pipx run twine check dist/*
77+
78+ - name : install highspy
79+ run : |
80+ $item = Get-ChildItem dist
81+ python -m pip install "$item"
82+
83+ - name : Test Python Examples
84+ run : |
85+ python ./examples/call_highs_from_python_highspy.py
86+ python ./examples/call_highs_from_python_mps.py
87+ python ./examples/call_highs_from_python.py
88+ python ./examples/minimal.py
0 commit comments