-
Notifications
You must be signed in to change notification settings - Fork 46
132 lines (98 loc) · 3.38 KB
/
deploy.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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: release
on:
push:
tags:
- v*
jobs:
build-linux:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
steps:
- uses: actions/checkout@v2
- name: Install Python package dependencies
run: python${{ matrix.python-version }} -m pip install --upgrade setuptools cython wheel build
- name: Build binary wheel
run: python${{ matrix.python-version }} -m build --wheel
- name: Apply auditwheel
run: auditwheel repair -w dist dist/*
- name: Remove linux wheel
run: rm dist/*-linux_x86_64.whl
- name: Archive dist artifacts
uses: actions/upload-artifact@v2
with:
name: dist-linux-${{ matrix.python-version }}
path: dist
build-macos:
runs-on: macos-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} x64
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Python package dependencies
run: pip install --upgrade setuptools cython wheel build
- name: Build binary wheel
run: python -m build --wheel
- name: Archive dist artifacts
uses: actions/upload-artifact@v2
with:
name: dist-macos-${{ matrix.python-version }}
path: dist
build-windows:
runs-on: windows-latest
strategy:
max-parallel: 3
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Download Build Tools for Visual Studio 2019
run: Invoke-WebRequest -Uri https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile vs_buildtools.exe
- name: Run vs_buildtools.exe install
run: ./vs_buildtools.exe --quiet --wait --norestart --nocache --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 --add Microsoft.VisualStudio.Component.VC.140 --includeRecommended
- name: Set up Python ${{ matrix.python-version }} x64
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Python package dependencies
run: pip install --upgrade setuptools cython wheel build
- name: Build binary wheel
run: python -m build --wheel
- name: Archive dist artifacts
uses: actions/upload-artifact@v2
with:
name: dist-windows-${{ matrix.python-version }}
path: dist
upload:
needs: [build-linux, build-macos, build-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools cython build wheel
- name: Create source dist
run: python -m build --sdist
- name: Stage artifacts
uses: actions/download-artifact@v2
- name: collect all wheels in single dist/ folder
run: mv dist-*/*whl dist/
- name: Upload with twine
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.TWINE_USERNAME }}
password: ${{ secrets.TWINE_PASSWORD }}