27
27
runs-on : ubuntu-latest
28
28
steps :
29
29
- name : " Run PyAnsys code style checks"
30
- uses : ansys/actions/code-style@v8
30
+ uses : ansys/actions/code-style@v9
31
31
32
32
smoke-tests :
33
33
name : Build and Smoke tests
44
44
os : macos-latest
45
45
steps :
46
46
- name : Build wheelhouse and perform smoke test
47
- uses : ansys/actions/build-wheelhouse@v8
47
+ uses : ansys/actions/build-wheelhouse@v9
48
48
with :
49
49
library-name : ${{ env.PACKAGE_NAME }}
50
50
operating-system : ${{ matrix.os }}
92
92
runs-on : ubuntu-latest
93
93
steps :
94
94
- name : PyAnsys documentation style checks
95
- uses : ansys/actions/doc-style@v8
95
+ uses : ansys/actions/doc-style@v9
96
96
with :
97
97
token : ${{ secrets.GITHUB_TOKEN }}
98
98
@@ -103,7 +103,7 @@ jobs:
103
103
steps :
104
104
105
105
- name : " Run Ansys documentation building action"
106
- uses : ansys/actions/doc-build@v8
106
+ uses : ansys/actions/doc-build@v9
107
107
with :
108
108
add-pdf-html-docs-as-assets : true
109
109
@@ -114,7 +114,7 @@ jobs:
114
114
needs : [docs-build]
115
115
steps :
116
116
- name : Deploy the latest documentation
117
- uses : ansys/actions/doc-deploy-dev@v8
117
+ uses : ansys/actions/doc-deploy-dev@v9
118
118
with :
119
119
cname : ${{ env.DOCUMENTATION_CNAME }}
120
120
token : ${{ secrets.GITHUB_TOKEN }}
@@ -131,7 +131,7 @@ jobs:
131
131
steps :
132
132
133
133
- name : Testing
134
- uses : ansys/actions/tests-pytest@v8
134
+ uses : ansys/actions/tests-pytest@v9
135
135
timeout-minutes : 12
136
136
137
137
- name : Upload coverage results (HTML)
@@ -163,7 +163,7 @@ jobs:
163
163
needs : [release]
164
164
steps :
165
165
- name : Deploy the stable documentation
166
- uses : ansys/actions/doc-deploy-stable@v8
166
+ uses : ansys/actions/doc-deploy-stable@v9
167
167
with :
168
168
cname : ${{ env.DOCUMENTATION_CNAME }}
169
169
token : ${{ secrets.GITHUB_TOKEN }}
@@ -229,3 +229,88 @@ jobs:
229
229
platforms : linux/amd64,linux/arm64
230
230
tags : |
231
231
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
232
+
233
+ binaries :
234
+ name : Create binaries
235
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
236
+ needs : [release]
237
+ runs-on : ${{ matrix.os }}
238
+ strategy :
239
+ fail-fast : false
240
+ matrix :
241
+ os : [windows-latest, ubuntu-latest, macos-latest]
242
+ steps :
243
+ - name : Checkout code
244
+ uses : actions/checkout@v4
245
+
246
+ - name : Set up Python
247
+ uses : actions/setup-python@v5
248
+ with :
249
+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
250
+
251
+ - name : Install dependencies
252
+ run : pip install .[all]
253
+
254
+ - name : Install PyInstaller
255
+ run : pip install pyinstaller
256
+
257
+ - name : Attempt to build executable
258
+ id : first-attempt
259
+ run : >
260
+ pyinstaller src/allie/flowkit/__main__.py --onefile
261
+ --name ${{ github.event.repository.name }}-${{ github.ref_name }}
262
+ --copy-metadata ${{ github.event.repository.name }} # keep importlib.metadata working
263
+ --hidden-import uvicorn --collect-all uvicorn # bring in the runtime server
264
+ --distpath build/dist --workpath build/build --specpath build
265
+ continue-on-error : true
266
+
267
+ - name : Modify spec file and retry build
268
+ if : steps.first-attempt.outcome == 'failure'
269
+ run : |
270
+ echo "import sys ; sys.setrecursionlimit(sys.getrecursionlimit() * 5)" >> ${{ github.event.repository.name }}-${{ github.ref_name }}.spec
271
+ pyinstaller ${{ github.event.repository.name }}-${{ github.ref_name }}.spec
272
+
273
+ - name : Upload artifact
274
+ uses : actions/upload-artifact@v4
275
+ with :
276
+ name : ${{ matrix.os }}-binaries
277
+ path : dist/${{ github.event.repository.name }}-*
278
+
279
+ sign-windows-binary :
280
+ name : Sign Windows binary
281
+ needs : [binaries]
282
+ runs-on :
283
+ group : ansys-network
284
+ labels : [self-hosted, Windows, signtool]
285
+ steps :
286
+ - name : Checkout the SignTool
287
+ uses : actions/checkout@v4
288
+ with :
289
+ repository : ansys-internal/signtool-ansys-apps
290
+ token : ${{ secrets.SIGNTOOL_ACCESS_TOKEN }}
291
+
292
+ - uses : actions/download-artifact@v4
293
+ with :
294
+ name : windows-latest-binaries
295
+ path : signtool/installer
296
+
297
+ - name : List current structure
298
+ run : ls -R
299
+
300
+ - name : Sign application
301
+ working-directory : signtool
302
+ run : |
303
+ $filename = (get-ChildItem installer -recurse | where {$_.name -like "allie-flowkit-python*"}).Name
304
+ $jobname = $filename -replace ".{4}$"
305
+ .\Ansys.SignClient.exe sign `
306
+ --signUrl https://csign.ansys.com `
307
+ -r gh_signtool_account `
308
+ -s '${{ secrets.SIGNTOOL_PWD }}' `
309
+ -n $jobname `
310
+ -i installer/$filename `
311
+ -o installer/$filename
312
+
313
+ - uses : actions/upload-artifact@v4
314
+ with :
315
+ name : windows-latest-binaries-signed
316
+ path : signtool/installer/*.exe
0 commit comments