-
Notifications
You must be signed in to change notification settings - Fork 78
185 lines (157 loc) · 4.57 KB
/
Copy pathwheel-builder.yml
File metadata and controls
185 lines (157 loc) · 4.57 KB
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
180
181
182
183
184
185
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build Python Wheels
#on:
# release:
# types: [published]
#on:
# push:
# tags:
# - "*.*.*"
#on:
# release:
# types: [created]
#on:
# push:
# branches: [ main ]
on: workflow_dispatch
permissions:
contents: read
jobs:
build_sdist:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", ]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "setuptools>57.0" oldest-supported-numpy cython==0.29.28 urllib3
pip list
- name: Build package
run: |
python setup.py build_ext --inplace
python setup.py sdist
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.gz
build_win_mac_wheel:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# os: [windows-latest, macos-latest]
os: [windows-latest, macos-latest]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
# python-version: [ "3.6", "3.7", "3.8", "3.9", ]
# exclude:
# - os: windows-latest
# python-version: 3.6
include:
- os: macos-10.15
python-version: 3.6
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build oldest-supported-numpy cython urllib3
pip list
- name: Build package
run: |
python setup.py build_ext --inplace
python -m build
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.whl
build_linux_wheel:
# runs-on: ubuntu-latest
runs-on: ubuntu-20.04
container:
image: quay.io/pypa/manylinux2014_x86_64
strategy:
fail-fast: false
matrix:
python-name: [ cp310-cp310, cp311-cp311, cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39 ]
# python-name: [ cp310-cp310, cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39 ]
# python-name: [ cp38-cp38 ]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
yum install -y atlas-devel
/opt/python/${{ matrix.python-name }}/bin/python -m pip install --upgrade pip
/opt/python/${{ matrix.python-name }}/bin/python -m pip install build oldest-supported-numpy cython urllib3
/opt/python/${{ matrix.python-name }}/bin/python -m pip list
- name: Build package
run: |
/opt/python/${{ matrix.python-name }}/bin/python setup.py build_ext --inplace
/opt/python/${{ matrix.python-name }}/bin/python -m build
- name: Repair wheel
run: |
mkdir dist_wheelhouse
ls dist/*.whl | cat | xargs -t -n 1 auditwheel repair -w dist_wheelhouse
ls -R dist
ls -R dist_wheelhouse
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist_wheelhouse/*.whl
#
# release_and_publish_package:
# runs-on: ubuntu-latest
#
# needs: [build_windows_macos_wheel, build_linux_wheel]
# # needs: [build_windows_macos_wheel, build_linux_wheel]
#
# steps:
#
# - name: Download wheels
# uses: actions/download-artifact@v3
# with:
# name: windows_macos_wheels
# path: dist
#
# - run: ls -R
#
# - name: Download linux wheels
# uses: actions/download-artifact@v3
# with:
# name: linux_wheels
# path: dist
#
# - run: ls -R
#
# - name: Rearrange wheels
# run: |
# mv dist/wheelhouse/* dist
# rm -rf dist/wheelhouse/
#
# - run: ls -R
#
# - name: Publish a Python distribution to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN_OAKS }}
#
# - name: Publish Github release
# uses: softprops/action-gh-release@v1
# with:
# token: ${{ secrets.DEV_GITHUB_TOKEN }}
# files: dist/*