39
39
mkdir -p dist/
40
40
echo "${VERSION}" > dist/VERSION
41
41
42
- - uses : actions/upload-artifact@v2
42
+ - uses : actions/upload-artifact@v3
43
43
with :
44
44
name : dist
45
45
path : dist/
52
52
PIP_DISABLE_PIP_VERSION_CHECK : 1
53
53
54
54
steps :
55
- - uses : actions/checkout@v2
55
+ - uses : actions/checkout@v3
56
56
with :
57
57
fetch-depth : 50
58
58
submodules : true
@@ -65,19 +65,41 @@ jobs:
65
65
pip install -U setuptools wheel pip
66
66
python setup.py sdist
67
67
68
- - uses : actions/upload-artifact@v2
68
+ - uses : actions/upload-artifact@v3
69
69
with :
70
70
name : dist
71
71
path : dist/*.tar.*
72
72
73
- build-wheels :
73
+ build-wheels-matrix :
74
74
needs : validate-release-request
75
+ runs-on : ubuntu-latest
76
+ outputs :
77
+ include : ${{ steps.set-matrix.outputs.include }}
78
+ steps :
79
+ - uses : actions/checkout@v3
80
+ - uses : actions/setup-python@v4
81
+ with :
82
+ python-version : " 3.x"
83
+ - run : pip install cibuildwheel==2.12.3
84
+ - id : set-matrix
85
+ # Cannot test on Musl distros yet.
86
+ run : |
87
+ MATRIX_INCLUDE=$(
88
+ {
89
+ cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | grep many | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
90
+ && cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \
91
+ && cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-2019"}'
92
+ } | jq -sc
93
+ )
94
+ echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT
95
+ build-wheels :
96
+ needs : build-wheels-matrix
75
97
runs-on : ${{ matrix.os }}
98
+ name : Build ${{ matrix.only }}
76
99
strategy :
100
+ fail-fast : false
77
101
matrix :
78
- os : [ubuntu-latest, macos-latest, windows-2019]
79
- cibw_python : ["cp37-*", "cp38-*", "cp39-*", "cp310-*"]
80
- cibw_arch : ["auto64"]
102
+ include : ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}
81
103
82
104
defaults :
83
105
run :
@@ -87,32 +109,32 @@ jobs:
87
109
PIP_DISABLE_PIP_VERSION_CHECK : 1
88
110
89
111
steps :
90
- - uses : actions/checkout@v2
112
+ - uses : actions/checkout@v3
91
113
with :
92
114
fetch-depth : 50
93
115
submodules : true
94
116
95
117
- name : Setup WSL
96
- if : ${{ steps.release.outputs.version == 0 && matrix.os == 'windows-2019' }}
97
- uses : vampire/setup-wsl@v1
118
+ if : ${{ matrix.os == 'windows-2019' }}
119
+ uses : vampire/setup-wsl@v2
98
120
with :
99
121
wsl-shell-user : edgedb
100
122
additional-packages :
101
123
ca-certificates
102
124
curl
103
125
126
+ - name : Set up QEMU
127
+ if : runner.os == 'Linux'
128
+ uses : docker/setup-qemu-action@v2
129
+
104
130
- name : Install EdgeDB
105
131
uses : edgedb/setup-edgedb@v1
106
132
107
-
133
+
134
+ with :
135
+ only : ${{ matrix.only }}
108
136
env :
109
137
CIBW_BUILD_VERBOSITY : 1
110
- CIBW_BUILD : ${{ matrix.cibw_python }}
111
- # Cannot test on Musl distros yet.
112
- CIBW_SKIP : " *-musllinux*"
113
- CIBW_ARCHS : ${{ matrix.cibw_arch }}
114
- # EdgeDB doesn't run on CentOS 6, so use 2014 as baseline
115
- CIBW_MANYLINUX_X86_64_IMAGE : " quay.io/pypa/manylinux2014_x86_64"
116
138
CIBW_BEFORE_ALL_LINUX : >
117
139
.github/workflows/install-edgedb.sh
118
140
CIBW_TEST_EXTRAS : " test"
@@ -126,7 +148,7 @@ jobs:
126
148
&& chmod -R go+rX "$(dirname $(dirname $(dirname $PY)))"
127
149
&& su -l edgedb -c "EDGEDB_PYTHON_TEST_CODEGEN_CMD=$CODEGEN $PY {project}/tests/__init__.py"
128
150
129
- - uses : actions/upload-artifact@v2
151
+ - uses : actions/upload-artifact@v3
130
152
with :
131
153
name : dist
132
154
path : wheelhouse/*.whl
@@ -136,12 +158,12 @@ jobs:
136
158
runs-on : ubuntu-latest
137
159
138
160
steps :
139
- - uses : actions/checkout@v2
161
+ - uses : actions/checkout@v3
140
162
with :
141
163
fetch-depth : 5
142
164
submodules : false
143
165
144
- - uses : actions/download-artifact@v2
166
+ - uses : actions/download-artifact@v3
145
167
with :
146
168
name : dist
147
169
path : dist/
0 commit comments