56
56
submodules : true
57
57
58
58
- name : Set up Python
59
- uses : actions/setup-python@v2
59
+ uses : actions/setup-python@v4
60
60
61
61
- name : Build source distribution
62
62
run : |
@@ -68,19 +68,35 @@ jobs:
68
68
name : dist
69
69
path : dist/*.tar.*
70
70
71
- build-wheels :
71
+ build-wheels-matrix :
72
72
needs : validate-release-request
73
+ runs-on : ubuntu-latest
74
+ outputs :
75
+ include : ${{ steps.set-matrix.outputs.include }}
76
+ steps :
77
+ - uses : actions/checkout@v2
78
+ - uses : actions/setup-python@v4
79
+ - run : pip install cibuildwheel==2.10.2
80
+ - id : set-matrix
81
+ run : |
82
+ MATRIX_INCLUDE=$(
83
+ {
84
+ cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -Rc '{"only": inputs, "os": "ubuntu-latest"}' \
85
+ && cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -Rc '{"only": inputs, "os": "macos-latest"}' \
86
+ && cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | grep cp | jq -Rc '{"only": inputs, "os": "windows-latest"}'
87
+ } | jq -sc
88
+ )
89
+ echo ::set-output name=include::"$MATRIX_INCLUDE"
90
+
91
+ build-wheels :
92
+ needs : build-wheels-matrix
73
93
runs-on : ${{ matrix.os }}
94
+ continue-on-error : true
95
+ name : Build ${{ matrix.only }}
96
+
74
97
strategy :
75
98
matrix :
76
- os : [ubuntu-latest, macos-latest, windows-latest]
77
- cibw_python : ["cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*"]
78
- cibw_arch : ["auto64", "auto32"]
79
- exclude :
80
- - os : macos-latest
81
- cibw_arch : " auto32"
82
- - os : ubuntu-latest
83
- cibw_arch : " auto32"
99
+ include : ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}
84
100
85
101
defaults :
86
102
run :
@@ -94,20 +110,26 @@ jobs:
94
110
with :
95
111
fetch-depth : 50
96
112
submodules : true
113
+
114
+ - name : Set up QEMU
115
+ if : runner.os == 'Linux'
116
+ uses : docker/setup-qemu-action@v2
97
117
98
-
118
+
119
+ with :
120
+ only : ${{ matrix.only }}
99
121
env :
100
122
CIBW_BUILD_VERBOSITY : 1
101
- CIBW_BUILD : ${{ matrix.cibw_python }}
102
- CIBW_ARCHS : ${{ matrix.cibw_arch }}
123
+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux_2_28
124
+ CIBW_MANYLINUX_AARCH64_IMAGE : manylinux_2_28
103
125
104
126
- uses : actions/upload-artifact@v2
105
127
with :
106
128
name : dist
107
129
path : wheelhouse/*.whl
108
130
109
131
publish-docs :
110
- needs : validate-release-request
132
+ needs : [build-sdist, build-wheels]
111
133
runs-on : ubuntu-latest
112
134
113
135
env :
@@ -121,7 +143,7 @@ jobs:
121
143
submodules : true
122
144
123
145
- name : Set up Python
124
- uses : actions/setup-python@v2
146
+ uses : actions/setup-python@v4
125
147
with :
126
148
python-version : 3.8
127
149
0 commit comments