-
Notifications
You must be signed in to change notification settings - Fork 6
120 lines (105 loc) · 3.1 KB
/
publish.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
name: CI
on:
push:
tags:
- "*"
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} - ${{ matrix.vers }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- vers: i686
os: ubuntu-20.04
- vers: aarch64
os: ubuntu-20.04
- vers: auto64
os: ubuntu-20.04
- vers: arm64
os: macos-10.15
- vers: auto64
os: macos-10.15
- vers: auto64
os: windows-2019
env:
SCCACHE_VERSION: 0.2.13
CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y && yum install -y openssl-devel"
CIBW_BUILD_VERBOSITY: "1" # Make some more noise so that travis doesn't stall
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"'
CIBW_SKIP: "cp27-* cp34-* cp35-* pp* *-win32"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.8"
- name: Install Visual C++ for Python 2.7
if: runner.os == 'Windows'
run: choco install vcpython27 -f -y
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: wheels Linux ${{ matrix.vers }}
if: runner.os == 'Linux'
uses: joerick/cibuildwheel@v1.10.0
env:
CIBW_ARCHS_LINUX: ${{ matrix.vers }}
- name: wheels Macos ${{ matrix.vers }}
if: runner.os == 'Macos'
uses: joerick/cibuildwheel@v1.10.0
env:
CIBW_ARCHS_MACOS: ${{ matrix.vers }}
- name: wheels Windows ${{ matrix.vers }}
if: runner.os == 'Windows'
uses: joerick/cibuildwheel@v1.10.0
env:
CIBW_ARCHS_WINDOWS: ${{ matrix.vers }}
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.8"
- name: Build sdist
run: |
python -m pip install setuptools-rust setuptools wheel
python setup.py sdist
- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
release:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- name: Release
uses: softprops/action-gh-release@v1
with:
body: |
view the CHANGELOG.md for full changes
files: |
dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}