@@ -58,10 +58,34 @@ jobs:
58
58
pip --disable-pip-version-check install -e .
59
59
pip --disable-pip-version-check install -r docs/requirements.txt
60
60
cd docs && make clean html SPHINXOPTS="-W --keep-going"
61
-
61
+
62
+ build :
63
+ runs-on : ubuntu-22.04
64
+ steps :
65
+ - uses : actions/checkout@v3
66
+ with :
67
+ submodules : recursive
68
+ fetch-depth : 0
69
+
70
+ - uses : actions/setup-python@v4
71
+ with :
72
+ python-version : 3.8
73
+
74
+ - name : Install build
75
+ run : python -m pip --disable-pip-version-check install build
76
+
77
+ - name : Build sdist + wheel
78
+ run : python -m build
79
+
80
+ - name : Upload build artifacts
81
+ uses : actions/upload-artifact@v3
82
+ with :
83
+ name : dist
84
+ path : dist
85
+
62
86
test :
63
87
runs-on : ${{ matrix.os }}
64
- needs : [setup_concurrency]
88
+ needs : [setup_concurrency, build ]
65
89
strategy :
66
90
max-parallel : ${{ fromJSON(needs.setup_concurrency.outputs.max-parallel).v }}
67
91
matrix :
@@ -88,6 +112,12 @@ jobs:
88
112
with :
89
113
python-version : ${{ matrix.python_version }}
90
114
architecture : ${{ matrix.architecture }}
115
+
116
+ - name : Download build artifacts
117
+ uses : actions/download-artifact@v3
118
+ with :
119
+ name : dist
120
+ path : dist
91
121
92
122
- name : Set ccache variant
93
123
shell : bash
@@ -105,12 +135,6 @@ jobs:
105
135
key : ${{ matrix.os }}-${{ matrix.architecture }}-${{ matrix.python_version }}
106
136
variant : ${{ steps.ccache.outputs.variant }}
107
137
108
- - name : Install build
109
- run : python -m pip --disable-pip-version-check install build
110
-
111
- - name : Build wheel
112
- run : python -m build --wheel
113
-
114
138
- name : Install
115
139
shell : bash
116
140
working-directory : dist
@@ -133,7 +157,7 @@ jobs:
133
157
134
158
cross-build :
135
159
runs-on : ubuntu-latest
136
- needs : [setup_concurrency]
160
+ needs : [setup_concurrency, build ]
137
161
strategy :
138
162
max-parallel : ${{ fromJSON(needs.setup_concurrency.outputs.max-parallel).v }}
139
163
matrix :
@@ -155,11 +179,11 @@ jobs:
155
179
with :
156
180
key : ${{ matrix.container }}
157
181
158
- - name : Install build
159
- run : /build/venv/bin/build-pip --disable-pip-version-check install build
160
-
161
- - name : Build wheel
162
- run : /build/venv/bin/build-python -m build --wheel
182
+ - name : Download build artifacts
183
+ uses : actions/download-artifact@v3
184
+ with :
185
+ name : dist
186
+ path : dist
163
187
164
188
- name : Install
165
189
working-directory : dist
@@ -168,6 +192,14 @@ jobs:
168
192
/build/venv/bin/build-pip --disable-pip-version-check install *.whl
169
193
/build/venv/bin/cross-pip --disable-pip-version-check install *.whl
170
194
195
+ - name : Install test dependencies
196
+ shell : bash
197
+ working-directory : tests
198
+ run : |
199
+ # install to both cross and build in case things get mixed up
200
+ /build/venv/bin/build-pip --disable-pip-version-check install -r requirements.txt
201
+ /build/venv/bin/cross-pip --disable-pip-version-check install -r requirements.txt
202
+
171
203
- name : Build cross wheel
172
204
env :
173
205
RPYBUILD_PARALLEL : 1
@@ -179,22 +211,16 @@ jobs:
179
211
publish :
180
212
runs-on : ubuntu-latest
181
213
needs : [check, check-doc, test]
214
+ permissions :
215
+ id-token : write
182
216
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
183
217
184
218
steps :
185
- - uses : actions/checkout@v3
219
+ - name : Download build artifacts
220
+ uses : actions/download-artifact@v3
186
221
with :
187
- submodules : true
188
-
189
- - uses : actions/setup-python@v4
190
-
191
- - run : pip --disable-pip-version-check install build
192
-
193
- - name : Build packages
194
- run : python -m build
222
+ name : dist
223
+ path : dist
195
224
196
225
- name : Publish to PyPI
197
- uses : pypa/gh-action-pypi-publish@master
198
- with :
199
- user : __token__
200
- password : ${{ secrets.pypi_password }}
226
+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments