File: test-python-win.yml

package info (click to toggle)
scipy 1.16.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 236,092 kB
  • sloc: cpp: 503,720; python: 345,302; ansic: 195,677; javascript: 89,566; fortran: 56,210; cs: 3,081; f90: 1,150; sh: 857; makefile: 792; pascal: 284; csh: 135; lisp: 134; xml: 56; perl: 51
file content (54 lines) | stat: -rw-r--r-- 1,621 bytes parent folder | download | duplicates (3)
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
name: test-python-win

on: [push, pull_request]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        # os: [self-hosted]
        os: [windows-2019]
        python: [3.12]
    steps:
      - uses: actions/checkout@v4
      - name: Install correct python version
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python }}

      - name: Install build dependencies
        run: python -m pip install numpy setuptools wheel pytest meson ninja delvewheel build
      
      - name: Build project
        run: |
          meson setup bbdir --prefix=${{ github.workspace }}/local_install
          meson compile -C bbdir

      - name: Install project to custom directory
        run: meson install -C bbdir

      - name: Build Python package
        run: python -m build

      - name: Repair the wheel
        shell: pwsh
        run: |
          $installedPath = "${{ github.workspace }}/local_install"
          $wheels = Get-ChildItem -Path dist -Filter *.whl
          foreach ($wheel in $wheels) {
            delvewheel repair $wheel.FullName --add-path "$installedPath/bin;$installedPath/lib" -w repaired_wheels
          }

      - name: Install the repaired wheel
        run: |
          $wheels = Get-ChildItem -Path repaired_wheels -Filter *.whl
          foreach ($wheel in $wheels){
            pip install $wheel.FullName
          }

      - name: Test Python Examples
        run: |
         python ./examples/call_highs_from_python_highspy.py
         python ./examples/call_highs_from_python_mps.py
         python ./examples/minimal.py