-
Notifications
You must be signed in to change notification settings - Fork 13
84 lines (72 loc) · 2.15 KB
/
build-wheels.yml
File metadata and controls
84 lines (72 loc) · 2.15 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
# Build Python wheels using cibuildwheel.
# This workflow leverages cibuildwheel's before-all and before-build hooks to properly
# separate non-Python dependencies from Python-version-specific builds.
name: Build Python Wheels
on:
push:
branches:
- main
- develop
- feature/python-wheels-ci
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Linux x86_64
- os: ubuntu-latest
cibw_archs: x86_64
# Linux aarch64
#- os: ubuntu-24.04-arm
# cibw_archs: aarch64
# macOS arm64 (macOS 14 Sonoma)
#- os: macos-14
# cibw_archs: arm64
# macos_deployment_target: "14.0"
# macOS arm64 (macOS 15 Sequoia)
#- os: macos-15
# cibw_archs: arm64
# macos_deployment_target: "15.0"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.21.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS: ${{ matrix.cibw_archs }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_deployment_target }}
- name: List wheels
run: ls -lah wheelhouse/
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.cibw_archs }}
path: wheelhouse/*.whl
merge_wheels:
name: Merge all wheels
needs: build_wheels
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist/
pattern: wheels-*
merge-multiple: true
- name: List all wheels
run: ls -la dist/
- name: Upload combined wheels
uses: actions/upload-artifact@v4
with:
name: all-wheels
path: dist/*.whl