Skip to content

Commit 2f5c7ae

Browse files
committed
build: use a cogged matrix of wheels
1 parent bda513f commit 2f5c7ae

File tree

1 file changed

+69
-25
lines changed

1 file changed

+69
-25
lines changed

.github/workflows/kit.yml

+69-25
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,76 @@ env:
2222

2323
jobs:
2424
wheels:
25-
name: "Build ${{ matrix.cibw_build }} ${{ matrix.os }} wheels"
26-
runs-on: ${{ matrix.os }}
25+
name: "Build ${{ matrix.os }} ${{ matrix.cibw_build }} ${{ matrix.cibw_arch }} wheels"
26+
runs-on: ${{ matrix.os }}-latest
2727
strategy:
2828
matrix:
29-
os:
30-
- ubuntu-latest
31-
- macos-latest
32-
- windows-latest
33-
cibw_build:
34-
- cp36
35-
- cp37
36-
- cp38
37-
- cp39
38-
- cp310
3929
include:
40-
- os: ubuntu-latest
41-
cibw_arch: x86_64 i686 aarch64
42-
- os: windows-latest
43-
cibw_arch: x86 AMD64
44-
- os: macos-latest
45-
cibw_arch: x86_64
30+
# To change the matrix, edit the choices, then process this file with cog:
31+
#
32+
# $ python -m pip install cogapp
33+
# $ python -m cogapp -r .github/workflows/kit.yml
34+
#
35+
#
36+
# [[[cog
37+
# #----- vvv Choices for the matrix vvv -----
38+
# oss = ["ubuntu", "macos", "windows"]
39+
# pys = ["cp36", "cp37", "cp38", "cp39", "cp310"]
40+
# archs = {
41+
# "ubuntu": ["x86_64", "i686", "aarch64"],
42+
# "macos": ["x86_64"],
43+
# "windows": ["x86", "AMD64"],
44+
# }
45+
# #----- ^^^ ---------------------- ^^^ -----
46+
#
47+
# import json
48+
# import cog
49+
# for the_os in oss:
50+
# for the_py in pys:
51+
# for the_arch in archs[the_os]:
52+
# them = {
53+
# "os": the_os,
54+
# "cibw_build": the_py,
55+
# "cibw_arch": the_arch,
56+
# }
57+
# cog.outl(f"- {json.dumps(them)}")
58+
# ]]]
59+
- {"os": "ubuntu", "cibw_build": "cp36", "cibw_arch": "x86_64"}
60+
- {"os": "ubuntu", "cibw_build": "cp36", "cibw_arch": "i686"}
61+
- {"os": "ubuntu", "cibw_build": "cp36", "cibw_arch": "aarch64"}
62+
- {"os": "ubuntu", "cibw_build": "cp37", "cibw_arch": "x86_64"}
63+
- {"os": "ubuntu", "cibw_build": "cp37", "cibw_arch": "i686"}
64+
- {"os": "ubuntu", "cibw_build": "cp37", "cibw_arch": "aarch64"}
65+
- {"os": "ubuntu", "cibw_build": "cp38", "cibw_arch": "x86_64"}
66+
- {"os": "ubuntu", "cibw_build": "cp38", "cibw_arch": "i686"}
67+
- {"os": "ubuntu", "cibw_build": "cp38", "cibw_arch": "aarch64"}
68+
- {"os": "ubuntu", "cibw_build": "cp39", "cibw_arch": "x86_64"}
69+
- {"os": "ubuntu", "cibw_build": "cp39", "cibw_arch": "i686"}
70+
- {"os": "ubuntu", "cibw_build": "cp39", "cibw_arch": "aarch64"}
71+
- {"os": "ubuntu", "cibw_build": "cp310", "cibw_arch": "x86_64"}
72+
- {"os": "ubuntu", "cibw_build": "cp310", "cibw_arch": "i686"}
73+
- {"os": "ubuntu", "cibw_build": "cp310", "cibw_arch": "aarch64"}
74+
- {"os": "macos", "cibw_build": "cp36", "cibw_arch": "x86_64"}
75+
- {"os": "macos", "cibw_build": "cp37", "cibw_arch": "x86_64"}
76+
- {"os": "macos", "cibw_build": "cp38", "cibw_arch": "x86_64"}
77+
- {"os": "macos", "cibw_build": "cp39", "cibw_arch": "x86_64"}
78+
- {"os": "macos", "cibw_build": "cp310", "cibw_arch": "x86_64"}
79+
- {"os": "windows", "cibw_build": "cp36", "cibw_arch": "x86"}
80+
- {"os": "windows", "cibw_build": "cp36", "cibw_arch": "AMD64"}
81+
- {"os": "windows", "cibw_build": "cp37", "cibw_arch": "x86"}
82+
- {"os": "windows", "cibw_build": "cp37", "cibw_arch": "AMD64"}
83+
- {"os": "windows", "cibw_build": "cp38", "cibw_arch": "x86"}
84+
- {"os": "windows", "cibw_build": "cp38", "cibw_arch": "AMD64"}
85+
- {"os": "windows", "cibw_build": "cp39", "cibw_arch": "x86"}
86+
- {"os": "windows", "cibw_build": "cp39", "cibw_arch": "AMD64"}
87+
- {"os": "windows", "cibw_build": "cp310", "cibw_arch": "x86"}
88+
- {"os": "windows", "cibw_build": "cp310", "cibw_arch": "AMD64"}
89+
# [[[end]]]
4690
fail-fast: false
4791

4892
steps:
4993
- name: Setup QEMU
50-
if: matrix.os == 'ubuntu-latest'
94+
if: matrix.os == 'ubuntu'
5195
uses: docker/setup-qemu-action@v1
5296
with:
5397
platforms: arm64
@@ -78,7 +122,7 @@ jobs:
78122
ls -al wheelhouse/
79123
80124
- name: "Remove unwanted wheels"
81-
if: matrix.os == 'ubuntu-latest' && matrix.cibw_build == 'cp39'
125+
if: matrix.os == 'ubuntu' && matrix.cibw_build == 'cp39'
82126
run: |
83127
# Python 3.9 musllinux wheels don't work in some places, so delete them.
84128
# https://github.com/nedbat/coveragepy/issues/1268
@@ -154,15 +198,15 @@ jobs:
154198
path: dist/*.whl
155199

156200
prerel:
157-
name: "Build ${{ matrix.python-version }} wheels on ${{ matrix.os }}"
201+
name: "Build pre-rel ${{ matrix.os }} ${{ matrix.python-version }} wheels"
158202
if: ${{ false }} # disable for now, since there are no pre-rel Python versions.
159-
runs-on: ${{ matrix.os }}
203+
runs-on: "${{ matrix.os }}-latest"
160204
strategy:
161205
matrix:
162206
os:
163-
- ubuntu-latest
164-
- windows-latest
165-
- macos-latest
207+
- ubuntu
208+
- windows
209+
- macos
166210
python-version:
167211
- "3.10.0-rc.2"
168212
fail-fast: false

0 commit comments

Comments
 (0)