20
20
permissions : {}
21
21
jobs :
22
22
23
- build_scancode_for_pypi :
23
+ build_scancode_wheel_for_pypi :
24
24
permissions :
25
25
contents : read # to fetch code (actions/checkout)
26
26
27
- name : Build PyPI archives
27
+ name : Build PyPI wheels
28
28
runs-on : ubuntu-20.04
29
29
30
30
defaults :
@@ -33,51 +33,65 @@ jobs:
33
33
34
34
strategy :
35
35
fail-fast : true
36
+ matrix :
37
+ pyver : ["3.7", "3.8", "3.9", "3.10"]
36
38
37
39
steps :
38
40
- uses : actions/checkout@v2
39
41
40
- - name : Set up Python
42
+ - name : Set up Python on ${{ matrix.pyver }}
41
43
uses : actions/setup-python@v1
42
44
with :
43
- python-version : 3.8
45
+ python-version : ${{ matrix.pyver }}
44
46
45
- - name : Install requirements then build main and mini wheel and sdist
46
- run : etc/release/scancode-create-pypi-dist .sh
47
+ - name : Install requirements then build main and mini wheel
48
+ run : etc/release/scancode-create-pypi-wheel .sh
47
49
48
- - name : Collect built main wheel
50
+ - name : Collect built wheels for ${{ matrix.pyver }}
49
51
uses : actions/upload-artifact@v3
50
52
with :
51
- name : main_wheel
52
- path : dist/scancode_toolkit-3 *.whl
53
+ name : wheels-${{ matrix.pyver }}
54
+ path : dist/*.whl
53
55
54
- - name : Collect built main sdist
55
- uses : actions/upload-artifact@v3
56
- with :
57
- name : main_sdist
58
- path : dist/scancode-toolkit-3*.tar.gz
59
56
60
- - name : Collect built mini wheel
61
- uses : actions/upload-artifact@v3
57
+ build_scancode_sdist_for_pypi :
58
+ permissions :
59
+ contents : read # to fetch code (actions/checkout)
60
+
61
+ name : Build PyPI sdist archives
62
+ runs-on : ubuntu-20.04
63
+
64
+ defaults :
65
+ run :
66
+ shell : bash
67
+
68
+ strategy :
69
+ fail-fast : true
70
+
71
+ steps :
72
+ - uses : actions/checkout@v2
73
+
74
+ - name : Set up Python
75
+ uses : actions/setup-python@v1
62
76
with :
63
- name : mini_wheel
64
- path : dist/scancode_toolkit_mini-3*.whl
77
+ python-version : " 3.10"
65
78
66
- - name : Collect built mini sdist
79
+ - name : Install requirements then build main and mini sdist
80
+ run : etc/release/scancode-create-pypi-sdist.sh
81
+
82
+ - name : Collect built sdist
67
83
uses : actions/upload-artifact@v3
68
84
with :
69
- name : mini_sdist
70
- path : dist/scancode-toolkit-mini *.tar.gz
85
+ name : sdists
86
+ path : dist/*.tar.gz
71
87
72
88
73
89
build_scancode_for_release_linux :
74
90
permissions :
75
91
contents : read # to fetch code (actions/checkout)
76
92
77
- name : Build Release for linux
93
+ name : Build app Release for linux
78
94
runs-on : ubuntu-20.04
79
- needs :
80
- - build_scancode_for_pypi
81
95
82
96
defaults :
83
97
run :
@@ -92,18 +106,10 @@ jobs:
92
106
- name : Set up Python
93
107
uses : actions/setup-python@v1
94
108
with :
95
- python-version : 3.8
96
-
97
- - name : Download a the main wheel
98
- uses : actions/download-artifact@v3
99
- with :
100
- name : main_wheel
101
- path : dist
109
+ python-version : " 3.8"
102
110
103
111
- name : Build linux app archive
104
- run : |
105
- ./configure --rel
106
- etc/release/scancode-create-release-app-linux.sh
112
+ run : etc/release/scancode-create-release-app-linux.sh
107
113
108
114
- name : Collect built linux app
109
115
uses : actions/upload-artifact@v3
@@ -116,10 +122,8 @@ jobs:
116
122
permissions :
117
123
contents : read # to fetch code (actions/checkout)
118
124
119
- name : Build Release for mac
125
+ name : Build app Release for mac
120
126
runs-on : ubuntu-20.04
121
- needs :
122
- - build_scancode_for_pypi
123
127
124
128
defaults :
125
129
run :
@@ -134,18 +138,10 @@ jobs:
134
138
- name : Set up Python
135
139
uses : actions/setup-python@v1
136
140
with :
137
- python-version : 3.8
138
-
139
- - name : Download a the main wheel
140
- uses : actions/download-artifact@v3
141
- with :
142
- name : main_wheel
143
- path : dist
141
+ python-version : " 3.8"
144
142
145
143
- name : Build mac app archive
146
- run : |
147
- ./configure --rel
148
- etc/release/scancode-create-release-app-macos.sh
144
+ run : etc/release/scancode-create-release-app-macos.sh
149
145
150
146
- name : Collect built mac app
151
147
uses : actions/upload-artifact@v3
@@ -158,10 +154,8 @@ jobs:
158
154
permissions :
159
155
contents : read # to fetch code (actions/checkout)
160
156
161
- name : Build Release for windows
157
+ name : Build app Release for windows
162
158
runs-on : ubuntu-20.04
163
- needs :
164
- - build_scancode_for_pypi
165
159
166
160
defaults :
167
161
run :
@@ -175,18 +169,10 @@ jobs:
175
169
- name : Set up Python
176
170
uses : actions/setup-python@v1
177
171
with :
178
- python-version : 3.8
179
-
180
- - name : Download a the main wheel
181
- uses : actions/download-artifact@v3
182
- with :
183
- name : main_wheel
184
- path : dist
172
+ python-version : " 3.8"
185
173
186
174
- name : Build windows app archive
187
- run : |
188
- ./configure --rel
189
- etc/release/scancode-create-release-app-windows.sh
175
+ run : etc/release/scancode-create-release-app-windows.sh
190
176
191
177
- name : Collect built windows app
192
178
uses : actions/upload-artifact@v3
@@ -199,10 +185,8 @@ jobs:
199
185
permissions :
200
186
contents : read # to fetch code (actions/checkout)
201
187
202
- name : Build source
188
+ name : Build app source
203
189
runs-on : ubuntu-20.04
204
- needs :
205
- - build_scancode_for_pypi
206
190
207
191
defaults :
208
192
run :
@@ -216,18 +200,10 @@ jobs:
216
200
- name : Set up Python
217
201
uses : actions/setup-python@v1
218
202
with :
219
- python-version : 3.8
220
-
221
- - name : Download a the main sdist
222
- uses : actions/download-artifact@v3
223
- with :
224
- name : main_sdist
225
- path : dist
203
+ python-version : " 3.10"
226
204
227
205
- name : Build source archive with deps
228
- run : |
229
- ./configure --rel
230
- etc/release/scancode-create-release-app-sources.sh
206
+ run : etc/release/scancode-create-release-app-sources.sh
231
207
232
208
- name : Collect built source app tarball
233
209
uses : actions/upload-artifact@v3
@@ -236,13 +212,13 @@ jobs:
236
212
path : release/*
237
213
238
214
239
- smoke_test_install_and_run_pypi_dists_posix :
215
+ smoke_test_install_and_run_pypi_wheels_on_posix :
240
216
permissions :
241
217
contents : read # to fetch code (actions/checkout)
242
218
243
- name : Test POSIX PyPI wheels
219
+ name : Test PyPI wheels on linux and mac
244
220
needs :
245
- - build_scancode_for_pypi
221
+ - build_scancode_wheel_for_pypi
246
222
runs-on : ${{ matrix.os }}
247
223
248
224
defaults :
@@ -252,10 +228,8 @@ jobs:
252
228
strategy :
253
229
fail-fast : true
254
230
matrix :
255
- os : [ubuntu-22.04, macos-12]
256
- pyver : ["3.9", "3.10"]
257
- # os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, macos-10.15, macos-11, macos-12]
258
- # pyver: ["3.7", "3.8", "3.9", "3.10"]
231
+ os : [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12]
232
+ pyver : ["3.7", "3.8", "3.9", "3.10"]
259
233
260
234
steps :
261
235
- uses : actions/checkout@v2
@@ -265,10 +239,10 @@ jobs:
265
239
with :
266
240
python-version : ${{ matrix.pyver }}
267
241
268
- - name : Download a single artifact mainw
242
+ - name : Download wheels artifact
269
243
uses : actions/download-artifact@v3
270
244
with :
271
- name : main_wheel
245
+ name : wheels-${{ matrix.pyver }}
272
246
path : dist
273
247
274
248
- name : test install wheels
@@ -277,21 +251,20 @@ jobs:
277
251
rm -rf venv; \
278
252
python -m venv venv
279
253
venv/bin/python -m pip install --upgrade pip wheel setuptools
280
- for f in `find dist -type f`; \
254
+ for f in `find dist -type f -name "*${{ matrix.pyver }}*" `; \
281
255
do \
282
256
venv/bin/python -m pip install --force-reinstall "$f[full]" ; \
283
257
venv/bin/scancode -clipeu --json-pp - some.file ; \
284
- venv/bin/python -m pip uninstall --yes scancode-toolkit ; \
285
258
done
286
259
287
260
288
- smoke_test_install_and_run_pypi_dists_windows :
261
+ smoke_test_install_and_run_pypi_wheels_on_windows :
289
262
permissions :
290
263
contents : read # to fetch code (actions/checkout)
291
264
292
- name : Test Windows PyPI wheels
265
+ name : Test PyPI wheels on Windows
293
266
needs :
294
- - build_scancode_for_pypi
267
+ - build_scancode_wheel_for_pypi
295
268
runs-on : ${{ matrix.os }}
296
269
297
270
defaults :
@@ -301,10 +274,8 @@ jobs:
301
274
strategy :
302
275
fail-fast : true
303
276
matrix :
304
- os : [windows-2022]
305
- pyver : ["3.9", "3.10"]
306
- # os: [windows-2019, windows-2022]
307
- # pyver: ["3.7", "3.8", "3.9", "3.10"]
277
+ os : [windows-2019, windows-2022]
278
+ pyver : ["3.7", "3.8", "3.9", "3.10"]
308
279
309
280
steps :
310
281
- uses : actions/checkout@v2
@@ -314,22 +285,21 @@ jobs:
314
285
with :
315
286
python-version : ${{ matrix.pyver }}
316
287
317
- - name : Download a single artifact mainw
288
+ - name : Download wheels artifact
318
289
uses : actions/download-artifact@v3
319
290
with :
320
- name : main_wheel
291
+ name : wheels-${{ matrix.pyver }}
321
292
path : dist
322
293
323
294
- name : test install wheel
324
295
run : |
325
296
echo "license: gpl-2.0" > some.file
326
297
python -m venv venv
327
298
venv/Scripts/python.exe -m pip install --upgrade pip
328
- for f in `find dist -type f`; \
299
+ for f in `find dist -type f -name "*${{ matrix.pyver }}*" `; \
329
300
do \
330
301
venv/Scripts/python.exe -m pip install --force-reinstall "$f[full]" ; \
331
302
venv/Scripts/scancode -clipeu --json-pp - some.file ; \
332
- venv/Scripts/python.exe -m pip uninstall --yes scancode-toolkit ; \
333
303
done
334
304
335
305
@@ -390,7 +360,7 @@ jobs:
390
360
strategy :
391
361
fail-fast : true
392
362
matrix :
393
- os : [macos-10.15, macos- 11, macos-12]
363
+ os : [macos-11, macos-12]
394
364
pyver : [3.8]
395
365
396
366
steps :
@@ -509,9 +479,10 @@ jobs:
509
479
publish_to_pypi :
510
480
name : Publish to PyPI
511
481
needs :
512
- - build_scancode_for_pypi
513
- - smoke_test_install_and_run_pypi_dists_windows
514
- - smoke_test_install_and_run_pypi_dists_posix
482
+ - build_scancode_wheel_for_pypi
483
+ - build_scancode_sdist_for_pypi
484
+ - smoke_test_install_and_run_pypi_wheels_on_windows
485
+ - smoke_test_install_and_run_pypi_wheels_on_posix
515
486
- publish_to_gh_release
516
487
runs-on : ubuntu-20.04
517
488
defaults :
@@ -520,7 +491,7 @@ jobs:
520
491
strategy :
521
492
fail-fast : true
522
493
matrix :
523
- dist_names : [main_wheel, main_sdist, mini_wheel, mini_sdist ]
494
+ dist_names : ["wheels-3.7", "wheels-3.8", "wheels-3.9", "wheels-3.10", sdists ]
524
495
525
496
steps :
526
497
- name : Set up Python
0 commit comments