File: build_python.yml

package info (click to toggle)
dlib 20.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 293,056 kB
  • sloc: cpp: 331,568; xml: 27,095; python: 1,631; sh: 290; java: 229; makefile: 179; javascript: 73; perl: 18
file content (80 lines) | stat: -rw-r--r-- 1,808 bytes parent folder | download | duplicates (2)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Python

on:
  push:
    branches:
    - master
    paths:
    - ".github/workflows/build_python.yml"
    - "**.cpp"
    - "**.h"
    - "**.c"
    - "**.cu"
    - "**.cmake"
    - "**CMakeLists.txt"
    - "**py"
  pull_request:
    branches:
    - master
    paths:
    - ".github/workflows/build_python.yml"
    - "**.cpp"
    - "**.h"
    - "**.c"
    - "**.cu"
    - "**.cmake"
    - "**CMakeLists.txt"
    - "**py"

defaults:
  run:
    shell: bash

jobs:
  Windows:
    runs-on: 'windows-latest'
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-python@v4
    - name: Install python deps
      run: |
        pip install pytest numpy
        # don't use CMake 3.25.0 https://gitlab.kitware.com/cmake/cmake/-/issues/23975
        pip3 install cmake==3.24.0
    - name: Build
      run: |
        pip3 install cmake==3.24.0
        python setup.py build
        python setup.py install --user
    - name: Test
      run: python -m pytest --ignore docs --ignore dlib

  Ubuntu:
    runs-on: 'ubuntu-latest'
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-python@v4
    - name: Install python deps
      run: pip install pytest numpy
    - name: Build
      run: |
        python setup.py build
        python setup.py install --user
    - name: Test
      run: python -m pytest --ignore docs --ignore dlib

# Disabled for now since something is going sideways with python packages on github actions
# MacOS:
#   runs-on: 'macos-latest'
#   steps:
#   - uses: actions/checkout@v3
#   - uses: actions/setup-python@v4
#   - name: Install python deps
#     run: pip3 install pytest numpy
#   - name: Build
#     run: |
#       python3 setup.py build
#       python3 setup.py install --user
#   - name: Test
#     run: python3 -m pytest --ignore docs --ignore dlib