6
6
release :
7
7
types :
8
8
- created
9
+ env :
10
+ cibuildwheel_version : " 2.2.2"
9
11
jobs :
10
12
build_sdist :
11
13
name : Build source distribution
@@ -26,26 +28,109 @@ jobs:
26
28
build_wheels :
27
29
name : Build wheels on ${{ matrix.os }}
28
30
runs-on : ${{ matrix.os }}
31
+ env :
32
+ MACOSX_DEPLOYMENT_TARGET : " 10.9"
33
+ CIBW_BUILD_VERBOSITY : " 1"
34
+ CIBW_BUILD : " ${{ matrix.cibw.build || '*' }}"
35
+ CIBW_SKIP : " ${{ matrix.cibw.skip || '' }}"
36
+ CIBW_ENVIRONMENT : " ${{ matrix.cibw.env || '' }}"
37
+ CIBW_TEST_COMMAND : pytest {project}/tests
38
+ CIBW_TEST_REQUIRES : pytest
39
+ CIBW_MANYLINUX_X86_64_IMAGE : " ${{ matrix.cibw.manylinux_image }}"
40
+ CIBW_MANYLINUX_I686_IMAGE : " ${{ matrix.cibw.manylinux_image }}"
41
+ CIBW_MANYLINUX_AARCH64_IMAGE : " ${{ matrix.cibw.manylinux_image }}"
42
+ CIBW_ARCHS_LINUX : " ${{ matrix.cibw.arch || 'auto' }}"
43
+ CIBW_ARCHS_MACOS : " ${{ matrix.cibw.arch || 'auto' }}"
29
44
strategy :
30
45
matrix :
31
- os : [ubuntu-20.04, macOS-10.15, windows-2019]
46
+ include :
47
+ - os : macos-10.15
48
+ name : mac
49
+ cibw :
50
+ arch : x86_64
51
+ env : CFLAGS='-march=core-avx-i'
52
+ build : " cp37* cp38*"
53
+
54
+ - os : macos-10.15
55
+ name : mac-arm
56
+ cibw :
57
+ arch : universal2
58
+ build : " cp39* cp310*"
59
+ env : ' '
60
+
61
+ - os : ubuntu-20.04
62
+ name : manylinux1
63
+ cibw :
64
+ # include python 3.6 because I want to run it on sagemaker notebook instance.
65
+ build : " cp36* cp37*"
66
+ skip : " *musllinux*"
67
+ manylinux_image : manylinux2010
68
+ env : CFLAGS='-march=core-avx-i'
69
+ arch : auto64
70
+
71
+ - os : ubuntu-20.04
72
+ name : manylinux2014
73
+ cibw :
74
+ build : " cp38* cp39* cp310"
75
+ skip : " *musllinux*"
76
+ manylinux_image : manylinux2014
77
+ env : CFLAGS='-march=core-avx-i'
78
+ arch : auto64
79
+
80
+ - os : ubuntu-20.04
81
+ name : manylinux_aarch64_cp37
82
+ cibw :
83
+ build : " cp37*"
84
+ skip : " *musllinux*"
85
+ manylinux_image : manylinux2014
86
+ arch : aarch64
87
+
88
+ - os : ubuntu-20.04
89
+ name : manylinux_aarch64_cp38
90
+ cibw :
91
+ build : " cp38*"
92
+ skip : " *musllinux*"
93
+ manylinux_image : manylinux2014
94
+ arch : aarch64
95
+
96
+ - os : ubuntu-20.04
97
+ name : manylinux_aarch64_cp39
98
+ cibw :
99
+ build : " cp39*"
100
+ skip : " *musllinux*"
101
+ manylinux_image : manylinux2014
102
+ arch : aarch64
103
+
104
+ - os : ubuntu-20.04
105
+ name : manylinux_aarch64_cp310
106
+ cibw :
107
+ build : " cp310*"
108
+ skip : " *musllinux*"
109
+ manylinux_image : manylinux2014
110
+ arch : aarch64
111
+
112
+ - os : windows-2019
113
+ name : win_amd64
114
+ architecture : x64
115
+ cibw :
116
+ build : " cp*win_amd64"
117
+ env : " CL='/arch:AVX'"
32
118
33
119
steps :
34
120
- uses : actions/checkout@v2
35
121
with :
36
122
fetch-depth : 0
37
123
- uses : actions/setup-python@v2
38
124
name : Install Python
125
+ - name : register qemu
126
+ if : contains(matrix.cibw.arch, 'aarch64')
127
+ run : |
128
+ docker run --rm --privileged hypriot/qemu-register:v4.2.0
39
129
- name : Install cibuildwheel
40
- run : python -m pip install cibuildwheel==1.7.4
41
-
130
+ run : python -m pip install cibuildwheel=="${{env.cibuildwheel_version}}"
42
131
- name : Build wheels
43
132
run : python -m cibuildwheel --output-dir wheelhouse
44
- env :
45
- CIBW_BUILD : " cp36-* cp37-* cp38-* cp39-*"
46
- CIBW_ENVIRONMENT : " CFLAGS='-march=core-avx-i' CXXFLAGS='-march=core-avx-i' CL='/arch:AVX'"
47
- CIBW_TEST_COMMAND : pytest {project}/tests
48
- CIBW_TEST_REQUIRES : pytest
133
+
49
134
50
135
- uses : actions/upload-artifact@v2
51
136
with :
0 commit comments