-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (50 loc) · 1.46 KB
/
build.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
name: Build Wheels
# Only run on new tags starting with `v`
on:
push:
tags:
- 'v*'
jobs:
build_wheels:
name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- name: set environment variables
uses: allenevans/set-env@v1.1.0
with:
# Only build on CPython and PyPy >=3
CIBW_BUILD: "pp3?-* cp3?-*"
# Run before build
CIBW_BEFORE_BUILD: python -m pip install numpy Cython
# CIBW_BEFORE_TEST: python -m pip install numpy Cython '.[test]'
# # run the package tests using `pytest`
# CIBW_TEST_COMMAND: pytest
- uses: actions/setup-python@v1
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Install Visual C++ for Python 2.7
if: startsWith(matrix.os, 'windows')
run: |
choco install vcpython27 -f -y
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v1
with:
name: wheels
path: ./wheelhouse
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install twine
twine upload wheelhouse/*.whl