-
Notifications
You must be signed in to change notification settings - Fork 8
64 lines (53 loc) · 1.84 KB
/
build_wheels.yml
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
# based on https://github.com/joerick/cibuildwheel/blob/master/examples/github-minimal.yml
name: Build wheels
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # unshallow fetch for setuptools-scm
submodules: true
- name: Use MSBuild (Windows)
uses: microsoft/setup-msbuild@v1.0.0
if: matrix.os == 'windows-latest'
- uses: actions/setup-python@v1
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.1
- name: Build wheel
run: |
python -m cibuildwheel --output-dir dist
env:
# skip 2.7, 3.4 and 3.5: for now, only build for >= 3.6 64-bit
CIBW_BUILD: "cp36-* cp37-* cp38-*"
# build using the manylinux1 image to ensure manylinux1 wheels are produced
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
# skip PyPy (no manylinux1), 32-bit linux, and other architectures
CIBW_SKIP: "pp* cp*manylinux_i686 cp*manylinux_aarch64 cp*manylinux_ppc64le cp*manylinux_s390x"
- uses: actions/upload-artifact@v1
with:
name: wheels
path: ./dist
- name: Build sdist
run: |
python setup.py sdist
if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')