@@ -2,12 +2,12 @@ name: Release
2
2
3
3
on :
4
4
pull_request :
5
- branches :
6
- - " master"
7
- - " ci"
8
- - " [0-9]+.[0-9x]+*"
9
- paths :
10
- - " asyncpg/_version.py"
5
+ # branches:
6
+ # - "master"
7
+ # - "ci"
8
+ # - "[0-9]+.[0-9x]+*"
9
+ # paths:
10
+ # - "asyncpg/_version.py"
11
11
12
12
jobs :
13
13
validate-release-request :
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,28 +68,35 @@ jobs:
68
68
name : dist
69
69
path : dist/*.tar.*
70
70
71
+ build-wheels-matrix :
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 https://github.com/henryiii/cibuildwheel/archive/refs/heads/henryiii/fix/crossplatform.zip # unreleased ref https://github.com/pypa/cibuildwheel/pull/1266
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
+
71
91
build-wheels :
72
- needs : validate-release-request
92
+ needs : build-wheels-matrix
73
93
runs-on : ${{ matrix.os }}
74
94
continue-on-error : true
95
+ name : Build ${{ matrix.only }}
96
+
75
97
strategy :
76
98
matrix :
77
- include :
78
- - {os: macos-latest, arch: x86_64, build: "*"}
79
- - {os: macos-latest, arch: arm64, build: "*"}
80
- - {os: windows-latest, arch: AMD64, build: "*"}
81
- - {os: windows-latest, arch: x86, build: "*"}
82
- - {os: ubuntu-latest, arch: x86_64, build: "*"}
83
- - {os: ubuntu-latest, arch: aarch64, build: "*[61]-manylinux*"}
84
- - {os: ubuntu-latest, arch: aarch64, build: "*[72]-manylinux*"}
85
- - {os: ubuntu-latest, arch: aarch64, build: "*[83]-manylinux*"}
86
- - {os: ubuntu-latest, arch: aarch64, build: "*[94]-manylinux*"}
87
- - {os: ubuntu-latest, arch: aarch64, build: "*[05]-manylinux*"}
88
- - {os: ubuntu-latest, arch: aarch64, build: "*[61]-musllinux*"}
89
- - {os: ubuntu-latest, arch: aarch64, build: "*[72]-musllinux*"}
90
- - {os: ubuntu-latest, arch: aarch64, build: "*[83]-musllinux*"}
91
- - {os: ubuntu-latest, arch: aarch64, build: "*[94]-musllinux*"}
92
- - {os: ubuntu-latest, arch: aarch64, build: "*[05]-musllinux*"}
99
+ include : ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}
93
100
94
101
defaults :
95
102
run :
@@ -109,11 +116,10 @@ jobs:
109
116
uses : docker/setup-qemu-action@v2
110
117
111
118
- uses : pypa/cibuildwheel@v2.10.0
119
+ with :
120
+ only : ${{ matrix.only }}
112
121
env :
113
122
CIBW_BUILD_VERBOSITY : 1
114
- CIBW_ARCHS : ${{ matrix.arch }}
115
- CIBW_BUILD : ${{ matrix.build }} # py versions from setup.py -> python_requires
116
- CIBW_SKIP : pp*
117
123
CIBW_MANYLINUX_X86_64_IMAGE : manylinux_2_28
118
124
CIBW_MANYLINUX_AARCH64_IMAGE : manylinux_2_28
119
125
@@ -137,7 +143,7 @@ jobs:
137
143
submodules : true
138
144
139
145
- name : Set up Python
140
- uses : actions/setup-python@v2
146
+ uses : actions/setup-python@v4
141
147
with :
142
148
python-version : 3.8
143
149
0 commit comments