@@ -12,11 +12,24 @@ jobs:
12
12
build_wheels :
13
13
name : Build wheels on ${{ matrix.os }}
14
14
runs-on : ${{ matrix.os }}
15
+ env :
16
+ min-numpy-version : " 1.16.0"
17
+ min-numpy-hash : " 04/b6/d7faa70a3e3eac39f943cc6a6a64ce378259677de516bd899dd9eb8f9b32"
15
18
strategy :
16
19
matrix :
17
20
os : [ubuntu-18.04, windows-latest, macos-latest]
21
+ cibw_archs : ["auto"]
22
+ include :
23
+ - os : ubuntu-18.04
24
+ cibw_archs : " aarch64"
18
25
19
26
steps :
27
+ - name : Set up QEMU
28
+ if : matrix.cibw_archs == 'aarch64'
29
+ uses : docker/setup-qemu-action@v1
30
+ with :
31
+ platforms : arm64
32
+
20
33
- uses : actions/checkout@v2
21
34
with :
22
35
fetch-depth : 0
26
39
with :
27
40
python-version : ' 3.7'
28
41
42
+ - uses : actions/cache@v2
43
+ id : numpy-cache
44
+ with :
45
+ path : numpy-aarch64-cache/
46
+ key : numpy-${{ matrix.cibw_archs }}-cache-${{ env.min-numpy-version }}
47
+
29
48
- name : Install cibuildwheel
30
49
run : |
31
- python -m pip install cibuildwheel==1.6.3
50
+ python -m pip install cibuildwheel==1.9.0
51
+
52
+ - name : Build minimum NumPy for aarch64
53
+ if : matrix.cibw_archs == 'aarch64' && steps.numpy-cache.outputs.cache-hit != 'true'
54
+ run : |
55
+ wget https://files.pythonhosted.org/packages/${{ env.min-numpy-hash }}/numpy-${{ env.min-numpy-version }}.zip
56
+ unzip numpy-${{ env.min-numpy-version }}.zip
57
+ cd numpy-${{ env.min-numpy-version }}
58
+ python -m cibuildwheel --output-dir ../numpy-aarch64-cache
59
+ env :
60
+ CIBW_BUILD : " cp36-* cp37-* cp38-*"
61
+ CIBW_ARCHS : aarch64
32
62
33
63
- name : Copy setup.cfg to configure wheel
34
64
run : |
@@ -43,17 +73,18 @@ jobs:
43
73
CIBW_MANYLINUX_I686_IMAGE : manylinux1
44
74
CIBW_BEFORE_BUILD : pip install certifi numpy==1.19.3
45
75
MPL_DISABLE_FH4 : " yes"
76
+ CIBW_ARCHS : ${{ matrix.cibw_archs }}
46
77
47
78
- name : Build wheels for CPython
48
79
run : |
49
80
python -m cibuildwheel --output-dir dist
50
81
env :
51
- CIBW_BUILD : " cp3?-*"
52
- CIBW_SKIP : " cp35-* cp36-* cp39-*"
82
+ CIBW_BUILD : " cp37-* cp38-*"
53
83
CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
54
84
CIBW_MANYLINUX_I686_IMAGE : manylinux1
55
- CIBW_BEFORE_BUILD : pip install certifi numpy==1.16
85
+ CIBW_BEFORE_BUILD : pip install certifi; pip install --find-links= numpy-aarch64-cache/ numpy==${{ env.min-numpy-version }}
56
86
MPL_DISABLE_FH4 : " yes"
87
+ CIBW_ARCHS : ${{ matrix.cibw_archs }}
57
88
58
89
- name : Build wheels for CPython 3.6
59
90
run : |
62
93
CIBW_BUILD : " cp36-*"
63
94
CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
64
95
CIBW_MANYLINUX_I686_IMAGE : manylinux1
65
- CIBW_BEFORE_BUILD : pip install certifi numpy==1.16
96
+ CIBW_BEFORE_BUILD : pip install certifi; pip install --find-links= numpy-aarch64-cache/ numpy==${{ env.min-numpy-version }}
66
97
MPL_DISABLE_FH4 : " yes"
98
+ CIBW_ARCHS : ${{ matrix.cibw_archs }}
67
99
if : >
68
100
startsWith(github.ref, 'refs/heads/v3.3') ||
69
101
startsWith(github.ref, 'refs/tags/v3.3')
73
105
python -m cibuildwheel --output-dir dist
74
106
env :
75
107
CIBW_BUILD : " pp3?-*"
76
- CIBW_BEFORE_BUILD : pip install certifi numpy==1.16
108
+ CIBW_BEFORE_BUILD : pip install certifi numpy==${{ env.min-numpy-version }}
109
+ CIBW_ARCHS : ${{ matrix.cibw_archs }}
77
110
if : >
78
111
runner.os != 'Windows' && (
79
112
startsWith(github.ref, 'refs/heads/v3.3') ||
0 commit comments