File: build.yml

package info (click to toggle)
pybluez 0.23-5.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,152 kB
  • sloc: ansic: 4,854; python: 4,319; objc: 3,363; cpp: 1,950; makefile: 190
file content (61 lines) | stat: -rw-r--r-- 2,002 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
name: Build

on: [push]

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        python-version: [2.7, 3.5, 3.6, 3.7]
        os: [macOS-latest, ubuntu-latest, windows-latest]

    runs-on: ${{ matrix.os }}

    steps:
    - uses: actions/checkout@v1
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install Windows Visual C++ for Python 2.7
      if: startsWith(matrix.os, 'windows-') && matrix.python-version < 3
      run: choco install vcpython27
    - name: Install Windows 10 SDK for Python 3.5
      if: startsWith(matrix.os, 'windows-') && matrix.python-version == 3.5
      run: choco install windows-sdk-10.0
    - name: Install Linux dependencies
      if: startsWith(matrix.os, 'ubuntu-')
      run: sudo apt install bluez libbluetooth-dev
    - name: Lint
      run: |
        pip install flake8
        # stop the build if there are Python syntax errors or undefined names
        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=./.*,./contrib/bluez/test/sap_client.py
        # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
        flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
    - name: Build
      run: |
        pip install wheel
        python setup.py bdist_wheel
    - name: Upload wheel
      uses: actions/upload-artifact@v1
      with:
        name: dist
        path: dist

  package_source:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - name: Make source distribution
        run: python setup.py sdist
      - name: Upload source distribution
        uses: actions/upload-artifact@v1
        with:
          name: dist
          path: dist