-
Notifications
You must be signed in to change notification settings - Fork 79
140 lines (116 loc) · 3.65 KB
/
build-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
name: build-wheels
on:
workflow_dispatch:
inputs:
release:
description: Do you want to release to pipy
required: true
default: "false"
jobs:
build_wheels_pypitest:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v4
# Used to host cibuildwheel
- uses: actions/setup-python@v3
- name: set test version
run: |
rm setup.py
ln -s setup_pypi_test.py setup.py
# - name: Set up QEMU
# if: runner.os == 'Linux'
# uses: docker/setup-qemu-action@v3
# with:
# platforms: all
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.0
# - name: Build wheels
# uses: pypa/cibuildwheel@v2.16.0
# env:
# # configure cibuildwheel to build native archs ('auto'), and some
# # emulated ones
# CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
env:
CIBW_ARCHS_MACOS: "x86_64 arm64"
# CIBW_ARCHS_LINUX: "auto aarch64"
- uses: actions/upload-artifact@v3
with:
name: pypi_test
path: ./wheelhouse/*.whl
publish-pypitest:
needs: build_wheels_pypitest
runs-on: ubuntu-latest
if: ${{ github.event.inputs.release }} == "true"
steps:
- uses: actions/download-artifact@v3
with:
name: pypi_test
path: ./wheelhouse/
- name: show all artifact
run: |
ls -R ./wheelhouse/
- name: Publish package to pypitest
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.EELIUTEST }}
packages_dir: ./wheelhouse/
repository_url: https://test.pypi.org/legacy/
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v4
# Used to host cibuildwheel
- uses: actions/setup-python@v3
# - name: Set up QEMU
# if: runner.os == 'Linux'
# uses: docker/setup-qemu-action@v3
# with:
# platforms: all
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.0
# - name: Build wheels
# uses: pypa/cibuildwheel@v2.16.0
# env:
# # configure cibuildwheel to build native archs ('auto'), and some
# # emulated ones
# CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
env:
CIBW_ARCHS_MACOS: "x86_64 arm64"
# CIBW_ARCHS_LINUX: "auto aarch64"
- uses: actions/upload-artifact@v3
with:
name: pypi
path: ./wheelhouse/*.whl
publish:
needs: build_wheels
runs-on: ubuntu-latest
if: ${{ github.event.inputs.release }} == "true"
steps:
- uses: actions/download-artifact@v3
with:
name: pypi
path: ./wheelhouse/
- name: show all artifact
run: |
ls -R ./wheelhouse/
- name: Publish package to pypitest
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PINPOINTPY }}
packages_dir: ./wheelhouse/