-
Notifications
You must be signed in to change notification settings - Fork 10
127 lines (106 loc) · 3.33 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
name: Build wheels
on: [push, pull_request]
jobs:
build_wheels_linux:
name: ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
architecture: [x86_64, aarch64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Setup variables for aarch64
if: matrix.architecture == 'aarch64'
run: |
echo "CIBW_ARCHS_LINUX=aarch64" >> $GITHUB_ENV
echo "CIBW_PLATFORM=linux" >> $GITHUB_ENV
echo "CIBW_EMULATOR=linux/aarch64" >> $GITHUB_ENV
- name: Build wheels with cibuildwheel
env:
CIBW_ARCHS_LINUX: ${{ matrix.architecture }}
CIBW_SKIP: "cp36-* cp37-*"
run: |
cibuildwheel --output-dir wheelhouse
- name: List wheels
run: |
ls wheelhouse
- name: Upload wheels as artifact
uses: actions/upload-artifact@v3
with:
name: python-wheels
path: wheelhouse/*.whl
build_wheels_mac:
name: ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
architecture: [x86_64, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Set macOS Deployment Target
run: |
export MACOSX_DEPLOYMENT_TARGET=11.0
echo "CIBW_PLATFORM=macos" >> $GITHUB_ENV
- name: Build wheels with cibuildwheel
env:
CIBW_ARCHS_LINUX: ${{ matrix.architecture }}
CIBW_ARCHS_MACOS: ${{ matrix.architecture }}
CIBW_SKIP: "cp36-* cp37-*"
run: |
cibuildwheel --output-dir wheelhouse
- name: List wheels
run: |
ls wheelhouse
- name: Upload wheels as artifact
uses: actions/upload-artifact@v3
with:
name: python-wheels
path: wheelhouse/*.whl
build_wheels_windows:
name: ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
architecture: [x86, AMD64, ARM64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python for Windows (Only on Windows)
if: matrix.os == 'windows-latest'
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Build wheels with cibuildwheel
env:
CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }}
CIBW_SKIP: "cp36-* cp37-*"
run: |
cibuildwheel --output-dir wheelhouse
- name: List wheels
run: |
ls wheelhouse
- name: Upload wheels as artifact
uses: actions/upload-artifact@v3
with:
name: python-wheels
path: wheelhouse/*.whl