-
Notifications
You must be signed in to change notification settings - Fork 27
166 lines (133 loc) · 4.26 KB
/
cling-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
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Build and upload to PyPI
on: [push]
jobs:
build-aarch64-wheels:
runs-on: ubuntu-latest
outputs:
job_number: ${{ steps.aarch64-job-number.outputs.job_number }}
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Trigger circleci build for ARM
id: aarch64-job-number
run: |
export JOB_NUMBER=$(python3 circleci.py job --token ${{ secrets.CIRCLE_API_TOKEN }})
echo "job_number=$JOB_NUMBER" >> $GITHUB_OUTPUT
build_wheels:
name: Build wheels on ${{ matrix.cibw.build }}
runs-on: ${{ matrix.os }}
env:
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
CIBW_ARCHS_LINUX: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_ARCHS_MACOS: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_ARCHS_WINDOWS: "${{ matrix.cibw.arch || 'auto' }}"
strategy:
fail-fast: false
matrix:
include:
- os: macos-11
name: mac-cpython
cibw:
arch: x86_64
build: "cp36-macosx_x86_64"
- os: macos-11
name: mac-cpython-arm
cibw:
arch: arm64
build: "cp38-macosx_arm64"
- os: macos-11
name: mac-pypy
cibw:
arch: x86_64
build: "pp37-macosx_x86_64"
- os: ubuntu-20.04
name: manylinux-x86_64
cibw:
arch: x86_64
build: "cp36-manylinux_x86_64"
- os: ubuntu-20.04
name: manylinux-i686
cibw:
arch: i686
build: "cp36-manylinux_i686"
- os: ubuntu-20.04
name: manylinux-pypy-x86_64
cibw:
arch: x86_64
build: "pp37-manylinux_x86_64"
- os: windows-2019
name: win32
cibw:
arch: x86
build: "cp36-win32"
- os: windows-2019
name: win_amd64
cibw:
arch: AMD64
build: "cp36-win_amd64"
- os: windows-2019
name: win32-arm64
cibw:
arch: ARM64
build: "cp39-win_arm64"
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.9"
architecture: ${{ matrix.architecture }}
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: customize mac-arm-64
if: contains(matrix.os, 'macos') && matrix.cibw.arch == 'arm64'
run: |
echo 'MACOSX_DEPLOYMENT_TARGET=10.15' >> "$GITHUB_ENV"
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.12.0
- name: list target wheels
run: |
python -m cibuildwheel cling --print-build-identifiers
- name: Build wheels
timeout-minutes: 600
run: |
python -m cibuildwheel cling --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: cd cling && pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: ./cling/dist/*.tar.gz
upload_aarch64_wheel:
needs: [build_wheels, build-aarch64-wheels] # Just wait until this workflow is done - then aarch64 should be done
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Get wheel from CircleCI artifact
env:
JOB_NUMBER: ${{ needs.build-aarch64-wheels.outputs.job_number }}
run: |
export WHEEL_PATH=$(python circleci.py artifact --job-number $JOB_NUMBER --token ${{ secrets.CIRCLE_API_TOKEN }})
echo "wheel_path=$WHEEL_PATH" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
path: ${{ env.wheel_path }}