-
Notifications
You must be signed in to change notification settings - Fork 108
179 lines (173 loc) · 5.27 KB
/
CI.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: CI
on:
push:
pull_request:
jobs:
# linux:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: messense/maturin-action@v1
# with:
# manylinux: auto
# command: build
# container: ghcr.io/biliup/manylinux2014-cross:x86_64
# args: --release --sdist -o dist -m crates/stream-gears/Cargo.toml --find-interpreter
## - name: aarch64
## uses: messense/maturin-action@v1
## with:
## target: aarch64-unknown-linux-gnu
## command: build
## args: --release --sdist -o dist -m crates/stream-gears/Cargo.toml --find-interpreter
# - name: Upload wheels
# uses: actions/upload-artifact@v2
# with:
# name: wheels
# path: dist
# linux-cross:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python:
# - '3.7'
# - '3.8'
# - '3.9'
# - '3.10'
# target: [aarch64, armv7, s390x, ppc64le]
# include:
# - python: pypy3.7
# target: aarch64
# - python: pypy3.8
# target: aarch64
# - python: pypy3.9
# target: aarch64
# steps:
# - uses: actions/checkout@v2
# - name: Build Wheels
# uses: messense/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# manylinux: auto
# args: -i ${{ matrix.python }} --release --out dist -m crates/stream-gears/Cargo.toml
# - name: Upload wheels
# uses: actions/upload-artifact@v2
# with:
# name: wheels
# path: dist
# windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# - uses: messense/maturin-action@v1
# with:
# command: build
# args: --release -o dist -m crates/stream-gears/Cargo.toml --find-interpreter
# - name: Upload wheels
# uses: actions/upload-artifact@v2
# with:
# name: wheels
# path: dist
#
# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# - uses: messense/maturin-action@v1
# with:
# command: build
# args: --release -o dist --universal2 -m crates/stream-gears/Cargo.toml --find-interpreter
# - name: Upload wheels
# uses: actions/upload-artifact@v2
# with:
# name: wheels
# path: dist
build:
name: build on ${{ matrix.os }} (${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }})
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
target: [x86_64, aarch64]
manylinux: [auto]
include:
- os: ubuntu
target: x86_64
container: ghcr.io/biliup/manylinux2014-cross:x86_64
- os: windows
interpreter: 3.7 3.8 3.9 3.10 3.11
- os: windows
target: i686
interpreter: 3.7 3.8 3.9 3.10 3.11
- os: macos
target: aarch64
interpreter: 3.7 3.8 3.9 3.10 3.11
- os: ubuntu
target: i686
container: ghcr.io/biliup/manylinux2014-cross:i686
- os: ubuntu
target: aarch64
manylinux: 2_28 # FIXME: look https://github.com/briansmith/ring/issues/1728
- os: ubuntu
target: armv7
interpreter: 3.7 3.8 3.9 3.10 3.11
# musllinux
- os: ubuntu
target: x86_64
manylinux: musllinux_1_1
- os: ubuntu
target: aarch64
manylinux: musllinux_1_1
- os: ubuntu
target: ppc64le
interpreter: 3.7 3.8 3.9 3.10 3.11
- os: ubuntu
target: s390x
interpreter: 3.7 3.8 3.9 3.10 3.11
exclude:
# Windows on arm64 only supports Python 3.11+
- os: windows
target: aarch64
# FIXME: look https://github.com/briansmith/ring/issues/1728
- os: ubuntu
target: aarch64
manylinux: auto
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v3
- name: build sdist
if: ${{ matrix.os == 'ubuntu' && matrix.target == 'x86_64' && matrix.manylinux == 'auto' }}
uses: messense/maturin-action@v1
with:
command: sdist
args: --out dist -m crates/stream-gears/Cargo.toml
rust-toolchain: stable
- name: build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux || 'auto' }}
container: ${{ matrix.container }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.7 3.8 3.9 3.10 3.11 pypy3.7 pypy3.8 pypy3.9' }} -m crates/stream-gears/Cargo.toml
rust-toolchain: stable
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/py-')"
# needs: [ macos, windows, linux ]
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- name: Publish to PyPI
uses: messense/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *