-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (124 loc) · 3.34 KB
/
build_and_upload_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
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
name: build full and pypi upload
on:
push:
branches: ["main"]
pull_request:
jobs:
macos_wheel_m:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: "arm64"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
macos_wheel_intel:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: "x86_64"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
linux_wheel:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64]
cw_build: ["cp*manylinux*", "pp*manylinux*", "*musllinux*"]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.cw_build }}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
linux_wheel_qemu:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [aarch64, ppc64le]
cw_build: ["cp37*many*", "cp38*many*", "cp39*many*", "cp310*many*", "cp311*many*", "cp312*many*", "pp37*many*", "pp38*many*", "pp39*many*"]
exclude:
- arch: ppc64le
cw_build: "pp37*many*"
- arch: ppc64le
cw_build: "pp38*many*"
- arch: ppc64le
cw_build: "pp39*many*"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64, ppc64le
- name: build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.cw_build }}
CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x}"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
windows_wheel:
runs-on: windows-latest
strategy:
matrix:
arch: [x86, AMD64, ARM64]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_SKIP: "pp*"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
source_dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: ./dist/*
upload_pypi:
needs: [macos_wheel_m, macos_wheel_intel, linux_wheel, windows_wheel, source_dist]
runs-on: ubuntu-latest
# try to publish only if this is a push to stable branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_TOKEN }}