2020permissions : {}
2121jobs :
2222
23- build_scancode_for_pypi :
23+ build_scancode_wheel_for_pypi :
2424 permissions :
2525 contents : read # to fetch code (actions/checkout)
2626
27- name : Build PyPI archives
27+ name : Build PyPI wheels
2828 runs-on : ubuntu-20.04
2929
3030 defaults :
@@ -33,51 +33,65 @@ jobs:
3333
3434 strategy :
3535 fail-fast : true
36+ matrix :
37+ pyver : ["3.7", "3.8", "3.9", "3.10"]
3638
3739 steps :
3840 - uses : actions/checkout@v2
3941
40- - name : Set up Python
42+ - name : Set up Python on ${{ matrix.pyver }}
4143 uses : actions/setup-python@v1
4244 with :
43- python-version : 3.8
45+ python-version : ${{ matrix.pyver }}
4446
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
4749
48- - name : Collect built main wheel
50+ - name : Collect built wheels for ${{ matrix.pyver }}
4951 uses : actions/upload-artifact@v3
5052 with :
51- name : main_wheel
52- path : dist/scancode_toolkit-3 *.whl
53+ name : wheels-${{ matrix.pyver }}
54+ path : dist/*.whl
5355
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
5956
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
6276 with :
63- name : mini_wheel
64- path : dist/scancode_toolkit_mini-3*.whl
77+ python-version : " 3.10"
6578
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
6783 uses : actions/upload-artifact@v3
6884 with :
69- name : mini_sdist
70- path : dist/scancode-toolkit-mini *.tar.gz
85+ name : sdists
86+ path : dist/*.tar.gz
7187
7288
7389 build_scancode_for_release_linux :
7490 permissions :
7591 contents : read # to fetch code (actions/checkout)
7692
77- name : Build Release for linux
93+ name : Build app Release for linux
7894 runs-on : ubuntu-20.04
79- needs :
80- - build_scancode_for_pypi
8195
8296 defaults :
8397 run :
@@ -92,18 +106,10 @@ jobs:
92106 - name : Set up Python
93107 uses : actions/setup-python@v1
94108 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"
102110
103111 - 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
107113
108114 - name : Collect built linux app
109115 uses : actions/upload-artifact@v3
@@ -116,10 +122,8 @@ jobs:
116122 permissions :
117123 contents : read # to fetch code (actions/checkout)
118124
119- name : Build Release for mac
125+ name : Build app Release for mac
120126 runs-on : ubuntu-20.04
121- needs :
122- - build_scancode_for_pypi
123127
124128 defaults :
125129 run :
@@ -134,18 +138,10 @@ jobs:
134138 - name : Set up Python
135139 uses : actions/setup-python@v1
136140 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"
144142
145143 - 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
149145
150146 - name : Collect built mac app
151147 uses : actions/upload-artifact@v3
@@ -158,10 +154,8 @@ jobs:
158154 permissions :
159155 contents : read # to fetch code (actions/checkout)
160156
161- name : Build Release for windows
157+ name : Build app Release for windows
162158 runs-on : ubuntu-20.04
163- needs :
164- - build_scancode_for_pypi
165159
166160 defaults :
167161 run :
@@ -175,18 +169,10 @@ jobs:
175169 - name : Set up Python
176170 uses : actions/setup-python@v1
177171 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"
185173
186174 - 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
190176
191177 - name : Collect built windows app
192178 uses : actions/upload-artifact@v3
@@ -199,10 +185,8 @@ jobs:
199185 permissions :
200186 contents : read # to fetch code (actions/checkout)
201187
202- name : Build source
188+ name : Build app source
203189 runs-on : ubuntu-20.04
204- needs :
205- - build_scancode_for_pypi
206190
207191 defaults :
208192 run :
@@ -216,18 +200,10 @@ jobs:
216200 - name : Set up Python
217201 uses : actions/setup-python@v1
218202 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"
226204
227205 - 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
231207
232208 - name : Collect built source app tarball
233209 uses : actions/upload-artifact@v3
@@ -236,13 +212,13 @@ jobs:
236212 path : release/*
237213
238214
239- smoke_test_install_and_run_pypi_dists_posix :
215+ smoke_test_install_and_run_pypi_wheels_on_posix :
240216 permissions :
241217 contents : read # to fetch code (actions/checkout)
242218
243- name : Test POSIX PyPI wheels
219+ name : Test PyPI wheels on linux and mac
244220 needs :
245- - build_scancode_for_pypi
221+ - build_scancode_wheel_for_pypi
246222 runs-on : ${{ matrix.os }}
247223
248224 defaults :
@@ -252,10 +228,8 @@ jobs:
252228 strategy :
253229 fail-fast : true
254230 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"]
259233
260234 steps :
261235 - uses : actions/checkout@v2
@@ -265,10 +239,10 @@ jobs:
265239 with :
266240 python-version : ${{ matrix.pyver }}
267241
268- - name : Download a single artifact mainw
242+ - name : Download wheels artifact
269243 uses : actions/download-artifact@v3
270244 with :
271- name : main_wheel
245+ name : wheels-${{ matrix.pyver }}
272246 path : dist
273247
274248 - name : test install wheels
@@ -277,21 +251,20 @@ jobs:
277251 rm -rf venv; \
278252 python -m venv venv
279253 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 }}*" `; \
281255 do \
282256 venv/bin/python -m pip install --force-reinstall "$f[full]" ; \
283257 venv/bin/scancode -clipeu --json-pp - some.file ; \
284- venv/bin/python -m pip uninstall --yes scancode-toolkit ; \
285258 done
286259
287260
288- smoke_test_install_and_run_pypi_dists_windows :
261+ smoke_test_install_and_run_pypi_wheels_on_windows :
289262 permissions :
290263 contents : read # to fetch code (actions/checkout)
291264
292- name : Test Windows PyPI wheels
265+ name : Test PyPI wheels on Windows
293266 needs :
294- - build_scancode_for_pypi
267+ - build_scancode_wheel_for_pypi
295268 runs-on : ${{ matrix.os }}
296269
297270 defaults :
@@ -301,10 +274,8 @@ jobs:
301274 strategy :
302275 fail-fast : true
303276 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"]
308279
309280 steps :
310281 - uses : actions/checkout@v2
@@ -314,22 +285,21 @@ jobs:
314285 with :
315286 python-version : ${{ matrix.pyver }}
316287
317- - name : Download a single artifact mainw
288+ - name : Download wheels artifact
318289 uses : actions/download-artifact@v3
319290 with :
320- name : main_wheel
291+ name : wheels-${{ matrix.pyver }}
321292 path : dist
322293
323294 - name : test install wheel
324295 run : |
325296 echo "license: gpl-2.0" > some.file
326297 python -m venv venv
327298 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 }}*" `; \
329300 do \
330301 venv/Scripts/python.exe -m pip install --force-reinstall "$f[full]" ; \
331302 venv/Scripts/scancode -clipeu --json-pp - some.file ; \
332- venv/Scripts/python.exe -m pip uninstall --yes scancode-toolkit ; \
333303 done
334304
335305
@@ -390,7 +360,7 @@ jobs:
390360 strategy :
391361 fail-fast : true
392362 matrix :
393- os : [macos-10.15, macos- 11, macos-12]
363+ os : [macos-11, macos-12]
394364 pyver : [3.8]
395365
396366 steps :
@@ -509,9 +479,10 @@ jobs:
509479 publish_to_pypi :
510480 name : Publish to PyPI
511481 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
515486 - publish_to_gh_release
516487 runs-on : ubuntu-20.04
517488 defaults :
@@ -520,7 +491,7 @@ jobs:
520491 strategy :
521492 fail-fast : true
522493 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 ]
524495
525496 steps :
526497 - name : Set up Python
0 commit comments