@@ -17,12 +17,90 @@ jobs:
1717 python-version : ${{ matrix.python }}
1818
1919 - name : Install build dependencies
20- run : python3 -m pip install numpy setuptools wheel pytest
21-
20+ run : python3 -m pip install numpy wheel pytest
21+
22+ - name : Test Python Interface
23+ run : |
24+ python3 -m pip install .
25+ pytest -v
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+
33+ build_hipo :
34+ runs-on : ${{ matrix.os }}
35+ strategy :
36+ matrix :
37+ os : [ubuntu-latest]
38+ python : [3.11]
39+ steps :
40+ - uses : actions/checkout@v4
41+ - name : Install correct python version
42+ uses : actions/setup-python@v5
43+ with :
44+ python-version : ${{ matrix.python }}
45+
46+ - name : Edit pyproject
47+ run : |
48+ ls
49+ $VCPKG_ROOT = "C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
50+ $METIS_ROOT = "${{ runner.workspace }}/installs"
51+ sed -i '/cmake\.args = \[/,/\]/{
52+ s/"-DPYTHON_BUILD_SETUP=ON"/"-DPYTHON_BUILD_SETUP=ON",\n \
53+ "-DHIPO=ON",\n "-DMETIS_ROOT=$METIS_ROOT"/
54+ }' pyproject.toml
55+ cat pyproject.toml
56+
57+
58+ - name : Checkout METIS
59+ uses : actions/checkout@v4
60+ with :
61+ repository : galabovaa/METIS
62+ ref : 521-ts
63+ path : METIS
64+
65+ - name : Create installs dir
66+ working-directory : ${{runner.workspace}}
67+ run : |
68+ mkdir installs
69+ ls
70+
71+ - name : Install METIS
72+ run : |
73+ cmake \
74+ -S $GITHUB_WORKSPACE/METIS \
75+ -B build \
76+ -DGKLIB_PATH=${{ github.workspace }}/METIS/GKlib \
77+ -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/installs
78+ cmake --build build --parallel
79+ cmake --install build
80+
81+ # no default blas available on runner
82+
83+ - name : Cache APT packages
84+ uses : actions/cache@v4
85+ with :
86+ path : |
87+ /var/cache/apt/archives
88+ /var/lib/apt/lists
89+ key : ${{ runner.os }}-apt-libopenblas
90+
91+ - name : Install OpenBLAS
92+ shell : bash
93+ run : |
94+ sudo apt update
95+ sudo apt install libopenblas-dev
96+
97+ - name : Install build dependencies
98+ run : python3 -m pip install numpy wheel pytest
99+
22100 - name : Test Python Interface
23101 run : |
24102 python3 -m pip install .
25- pytest -v
103+ pytest -v
26104
27105 - name : Test Python Examples
28106 run : |
0 commit comments