@@ -131,15 +131,27 @@ jobs:
131
131
phylum-ci -h
132
132
133
133
build_windows :
134
- name : Build Windows standalone binary
134
+ name : Build Windows ${{ matrix.name }} binary
135
135
needs : build_dist
136
136
runs-on : windows-latest
137
+ strategy :
138
+ fail-fast : false
139
+ matrix :
140
+ include :
141
+ - name : standalone
142
+ options : --standalone --remove-output
143
+ binary : ./build/cli.dist/phylum-ci.exe
144
+ artifact : ./phylum-ci.zip
145
+ - name : onefile
146
+ options : --onefile --onefile-tempdir-spec="{CACHE_DIR}/{PRODUCT}/{VERSION}"
147
+ binary : ./build/phylum-ci.exe
148
+ artifact : ./build/phylum-ci.exe
137
149
steps :
138
150
- name : Checkout the repo
139
151
uses : actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
140
152
141
- # Nuitka needs the packaged form and not the editable install Poetry provides
142
- # Ref: https://github.com/Nuitka/Nuitka/issues/2965
153
+ # Nuitka needs the packaged form and not the editable install Poetry provides
154
+ # Ref: https://github.com/Nuitka/Nuitka/issues/2965
143
155
- name : Download build artifacts
144
156
uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
145
157
@@ -166,13 +178,12 @@ jobs:
166
178
PHYLUM_REL_VER : ${{ needs.build_dist.outputs.phylum_rel_ver_nuitka }}
167
179
run : |
168
180
poetry run python -m nuitka `
169
- --onefile `
181
+ ${{ matrix.options }} `
170
182
--output-dir=build `
171
183
--output-filename="phylum-ci.exe" `
172
184
--include-package=phylum `
173
185
--include-package-data=phylum `
174
186
--include-distribution-metadata=phylum `
175
- --onefile-tempdir-spec="{CACHE_DIR}/{PRODUCT}/{VERSION}" `
176
187
--product-name=phylum-ci `
177
188
--product-version=${env:PHYLUM_REL_VER} `
178
189
--file-version=${env:GITHUB_RUN_NUMBER} `
@@ -187,27 +198,32 @@ jobs:
187
198
--deployment `
188
199
src/phylum/ci/cli.py
189
200
201
+ # Create the archive here because the confirmation step adds files to the source path
202
+ - name : Create standalone zip archive
203
+ if : matrix.name == 'standalone'
204
+ run : Compress-Archive -Path ./build/cli.dist/* -DestinationPath ${{ matrix.artifact }}
205
+
190
206
- name : Confirm operation of binary
191
207
env :
192
208
PHYLUM_API_KEY : ${{ secrets.PHYLUM_TOKEN }}
193
209
PHYLUM_BYPASS_CI_DETECTION : true
194
210
run : |
195
- ./build/phylum-ci.exe -h
196
- ./build/phylum-ci.exe -vvaf
211
+ ${{ matrix.binary }} -h
212
+ ${{ matrix.binary }} -vvaf
197
213
198
- - name : Upload standalone binary
214
+ - name : Upload ${{ matrix.name }} artifact
199
215
if : always()
200
216
uses : actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
201
217
with :
202
- name : build
203
- path : ./build/phylum-ci.exe
218
+ name : phylum-ci-${{ matrix.name }}
219
+ path : ${{ matrix.artifact }}
204
220
if-no-files-found : error
205
221
206
222
- name : Upload compilation report
207
223
if : always()
208
224
uses : actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
209
225
with :
210
- name : nuitka-compilation-report.xml
226
+ name : nuitka-compilation-report-${{ matrix.name }}
211
227
path : ./nuitka-compilation-report.xml
212
228
if-no-files-found : warn
213
229
@@ -216,7 +232,7 @@ jobs:
216
232
if : always()
217
233
uses : actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
218
234
with :
219
- name : nuitka-crash-report.xml
235
+ name : nuitka-crash-report-${{ matrix.name }}
220
236
path : ./nuitka-crash-report.xml
221
237
if-no-files-found : ignore
222
238
@@ -252,8 +268,18 @@ jobs:
252
268
git_commit_gpgsign : true
253
269
git_tag_gpgsign : true
254
270
271
+ - name : Download dist artifacts
272
+ uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
273
+ with :
274
+ name : dist
275
+ path : ./dist
276
+
255
277
- name : Download build artifacts
256
278
uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
279
+ with :
280
+ path : ./build
281
+ pattern : phylum-ci-*
282
+ merge-multiple : true
257
283
258
284
- name : Install poetry
259
285
run : pipx install poetry==${{ env.POETRY_VERSION }}
0 commit comments