summaryrefslogtreecommitdiff
path: root/.github/workflows/kit.yml
blob: 854b4f29976cc6d42f45cc137db129358ff449f6 (plain)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt

# Based on:
# https://github.com/joerick/cibuildwheel/blob/master/examples/github-deploy.yml

name: "Kits"

on:
  workflow_dispatch:

defaults:
  run:
    shell: bash

jobs:
  build_wheels:
    name: "Build wheels on ${{ matrix.os }}"
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - windows-latest
          - macos-latest
      fail-fast: false

    steps:
      - name: "Check out the repo"
        uses: actions/checkout@v2

      - name: "Install Python 3.7"
        uses: actions/setup-python@v2
        with:
          python-version: "3.7"

      - name: "Install cibuildwheel"
        run: |
          python -m pip install -c requirements/pins.pip cibuildwheel

      - name: "Install Visual C++ for Python 2.7"
        if: runner.os == 'Windows'
        run: |
          choco install vcpython27 -f -y

      - name: "Build wheels"
        env:
          # Don't build wheels for PyPy.
          CIBW_SKIP: pp*
        run: |
          python -m cibuildwheel --output-dir wheelhouse

      - name: "Upload wheels"
        uses: actions/upload-artifact@v2
        with:
          name: dist
          path: ./wheelhouse/*.whl

  build_sdist:
    name: "Build source distribution"
    runs-on: ubuntu-latest
    steps:
      - name: "Check out the repo"
        uses: actions/checkout@v2

      - name: "Install Python 3.7"
        uses: actions/setup-python@v2
        with:
          python-version: "3.7"

      - name: "Build sdist"
        run: |
          python setup.py sdist

      - name: "Upload sdist"
        uses: actions/upload-artifact@v2
        with:
          name: dist
          path: dist/*.tar.gz

  build_pypy:
    name: "Build PyPy wheels"
    runs-on: ubuntu-latest
    steps:
      - name: "Check out the repo"
        uses: actions/checkout@v2

      - name: "Install PyPy"
        uses: actions/setup-python@v2
        with:
          python-version: "pypy3"

      - name: "Install requirements"
        run: |
          pypy3 -m pip install -r requirements/wheel.pip

      - name: "Build wheels"
        run: |
          pypy3 setup.py bdist_wheel --python-tag pp36
          pypy3 setup.py bdist_wheel --python-tag pp37

      - name: "Upload wheels"
        uses: actions/upload-artifact@v2
        with:
          name: dist
          path: dist/*.whl