forked from matplotlib/matplotlib
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (102 loc) · 3.17 KB
/
cibuildwheel.yml
File metadata and controls
114 lines (102 loc) · 3.17 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
---
name: Build CI wheels
on:
# Save CI by only running this on release branches or tags.
push:
branches:
- main
- v[0-9]+.[0-9]+.x
tags:
- v*
# Also allow running this action on PRs if requested by applying the
# "Run cibuildwheel" label.
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
permissions:
contents: read
jobs:
build_wheels:
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request' && (
(
github.event.action == 'labeled' &&
github.event.label.name == 'CI: Run cibuildwheel'
) ||
contains(github.event.pull_request.labels.*.name, 'CI: Run cibuildwheel')
)
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CIBW_BEFORE_BUILD: >-
pip install certifi oldest-supported-numpy &&
git clean -fxd build
CIBW_BEFORE_BUILD_WINDOWS: >-
pip install certifi delvewheel oldest-supported-numpy &&
git clean -fxd build
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
delvewheel repair -w {dest_dir} {wheel}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_SKIP: "*-musllinux*"
MACOSX_DEPLOYMENT_TARGET: "10.12"
MPL_DISABLE_FH4: "yes"
strategy:
matrix:
include:
- os: ubuntu-20.04
cibw_archs: "x86_64"
- os: ubuntu-20.04
cibw_archs: "aarch64"
- os: windows-latest
cibw_archs: "auto"
- os: macos-11
cibw_archs: "x86_64 universal2 arm64"
steps:
- name: Set up QEMU
if: matrix.cibw_archs == 'aarch64'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: actions/checkout@v3
with:
fetch-depth: 0
# Something changed somewhere that prevents the downloaded-at-build-time
# licenses from being included in built wheels, so pre-download them so
# that they exist before the build and are included.
- name: Pre-download bundled licenses
run: >
curl -Lo LICENSE/LICENSE_QHULL
https://github.com/qhull/qhull/raw/2020.2/COPYING.txt
- name: Build wheels for CPython 3.11
uses: pypa/cibuildwheel@v2.12.1
env:
CIBW_BUILD: "cp311-*"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
- name: Build wheels for CPython 3.10
uses: pypa/cibuildwheel@v2.12.1
env:
CIBW_BUILD: "cp310-*"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
- name: Build wheels for CPython 3.9
uses: pypa/cibuildwheel@v2.12.1
env:
CIBW_BUILD: "cp39-*"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
- name: Build wheels for PyPy
uses: pypa/cibuildwheel@v2.12.1
env:
CIBW_BUILD: "pp39-*"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
if: matrix.cibw_archs != 'aarch64'
- name: Validate that LICENSE files are included in wheels
run: |
python3 ./ci/check_wheel_licenses.py
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
if-no-files-found: error