9
9
- main
10
10
11
11
env :
12
- MAIN_PYTHON_VERSION : ' 3.10'
12
+ MAIN_PYTHON_VERSION : ' 3.11'
13
+ MAIN_PYTHON_VERSION_WINDOWS_SELFHOSTED : ' 3.9'
13
14
PACKAGE_NAME : ' ansys-geometry-core'
14
15
DOCUMENTATION_CNAME : ' geometry.docs.pyansys.com'
15
16
ANSRV_GEO_IMAGE : ' ghcr.io/ansys/geometry'
20
21
RESET_IMAGE_CACHE : 6
21
22
IS_WORKFLOW_RUNNING : True
22
23
ARTIFACTORY_VERSION : v241
24
+ MEILISEARCH_API_KEY : ${{ secrets.MEILISEARCH_API_KEY }}
25
+ MEILISEARCH_HOST_URL : ${{ vars.MEILISEARCH_HOST_URL }}
26
+ MEILISEARCH_PUBLIC_API_KEY : ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
23
27
24
28
concurrency :
25
29
group : ${{ github.workflow }}-${{ github.ref }}
43
47
fail-fast : false
44
48
matrix :
45
49
os : [ubuntu-latest, windows-latest, macos-latest]
46
- python-version : ['3.8', '3. 9', '3.10', '3.11']
50
+ python-version : ['3.9', '3.10', '3.11']
47
51
should-release :
48
52
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
49
53
exclude :
85
89
if : env.SKIP_UNSTABLE == 'false'
86
90
uses : actions/setup-python@v4
87
91
with :
88
- python-version : ' 3.9 ' # use python3.9, self-hosted has an issue with 3.10
92
+ python-version : ${{ env.MAIN_PYTHON_VERSION_WINDOWS_SELFHOSTED }} # self-hosted has an issue with 3.11
89
93
90
94
- name : Set up headless display
91
95
if : env.SKIP_UNSTABLE == 'false'
@@ -204,7 +208,7 @@ jobs:
204
208
- name : Set up Python
205
209
uses : actions/setup-python@v4
206
210
with :
207
- python-version : ' 3.9 ' # use python3.9, self-hosted has an issue with 3.10
211
+ python-version : ${{ env.MAIN_PYTHON_VERSION_WINDOWS_SELFHOSTED }} # self-hosted has an issue with 3.11
208
212
209
213
- name : Set up headless display
210
214
uses : pyvista/setup-headless-display-action@v2
@@ -254,6 +258,12 @@ jobs:
254
258
cd doc
255
259
.\make.bat pdf
256
260
261
+ - name : Add assets to HTML docs
262
+ run : |
263
+ zip -r documentation-html.zip .\doc\_build\html
264
+ mv documentation-html.zip .\doc\_build\html\_static\assets\download\
265
+ cp doc/_build/latex/ansys-geometry-core.pdf .\doc\_build\html\_static\assets\download\
266
+
257
267
- name : Upload HTML documentation
258
268
uses : actions/upload-artifact@v3
259
269
with :
@@ -338,7 +348,6 @@ jobs:
338
348
ALLOW_PLOTTING : true
339
349
with :
340
350
python-version : ${{ env.MAIN_PYTHON_VERSION }}
341
- pytest-extra-args : " --service-os=linux"
342
351
checkout : false
343
352
344
353
- name : Upload integration test logs
@@ -391,6 +400,12 @@ jobs:
391
400
labels : [self-hosted, Windows, signtool]
392
401
393
402
steps :
403
+ - name : Check out repository pyansys-geometry-binaries
404
+ uses : actions/checkout@v4
405
+ with :
406
+ repository : ' ansys/pyansys-geometry-binaries'
407
+ token : ${{ env.BINARIES_TOKEN }}
408
+
394
409
- name : Download binaries
395
410
run : |
396
411
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerWindows.zip --output windows-binaries.zip
@@ -401,14 +416,28 @@ jobs:
401
416
with :
402
417
name : windows-binaries.zip
403
418
path : windows-binaries.zip
404
- retention-days : 7
419
+ retention-days : 1
405
420
406
421
- name : Upload Linux binaries as workflow artifacts
407
422
uses : actions/upload-artifact@v3
408
423
with :
409
424
name : linux-binaries.zip
410
425
path : linux-binaries.zip
411
- retention-days : 7
426
+ retention-days : 1
427
+
428
+ - name : Publish the binaries to private repo
429
+ env :
430
+ VERSION_WITH_PREFIX : ${{ github.ref_name }}
431
+ run : |
432
+ $env:VERSION=$env:VERSION_WITH_PREFIX.substring(1)
433
+ mkdir $env:VERSION
434
+ mv windows-binaries.zip .\$env:VERSION\
435
+ mv linux-binaries.zip .\$env:VERSION\
436
+ git config user.email ${{ env.BINARIES_EMAIL }}
437
+ git config user.name ${{ env.BINARIES_USERNAME }}
438
+ git add *
439
+ git commit -m "adding binaries for ${{ github.ref_name }}"
440
+ git push origin main
412
441
413
442
build-windows-container :
414
443
name : Building Geometry Service - Windows
@@ -421,7 +450,7 @@ jobs:
421
450
- name : Set up Python
422
451
uses : actions/setup-python@v4
423
452
with :
424
- python-version : ' 3.9 ' # use python3.9, self-hosted has an issue with 3.10
453
+ python-version : ${{ env.MAIN_PYTHON_VERSION_WINDOWS_SELFHOSTED }} # self-hosted has an issue with 3.11
425
454
426
455
- name : Download Windows binaries
427
456
uses : actions/download-artifact@v3
@@ -549,7 +578,7 @@ jobs:
549
578
ALLOW_PLOTTING : true
550
579
with :
551
580
python-version : ${{ env.MAIN_PYTHON_VERSION }}
552
- pytest-extra-args : " --service-os=linux -- use-existing-service=yes"
581
+ pytest-extra-args : " --use-existing-service=yes"
553
582
checkout : false
554
583
requires-xvfb : true
555
584
@@ -590,7 +619,7 @@ jobs:
590
619
uses : ansys/actions/release-github@v4
591
620
with :
592
621
library-name : ${{ env.PACKAGE_NAME }}
593
- additional-artifacts : windows-binaries.zip windows- dockerfile.zip linux-binaries .zip linux-dockerfile.zip
622
+ additional-artifacts : windows-dockerfile.zip linux-dockerfile.zip
594
623
595
624
upload_dev_docs :
596
625
name : Upload dev documentation
@@ -604,6 +633,21 @@ jobs:
604
633
cname : ${{ env.DOCUMENTATION_CNAME }}
605
634
token : ${{ secrets.GITHUB_TOKEN }}
606
635
636
+ doc-index-dev :
637
+ name : " Deploy dev index docs"
638
+ if : github.ref == 'refs/heads/main'
639
+ runs-on : ubuntu-latest
640
+ needs : upload_dev_docs
641
+ steps :
642
+ - name : " Deploy the latest documentation index"
643
+ uses : ansys/actions/doc-deploy-index@v4
644
+ with :
645
+ cname : ${{ env.DOCUMENTATION_CNAME }}/version/dev
646
+ index-name : pyansys-geometry-vdev
647
+ host-url : ${{ env.MEILISEARCH_HOST_URL }}
648
+ api-key : ${{ env.MEILISEARCH_API_KEY }}
649
+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
650
+
607
651
upload_docs_release :
608
652
name : Upload release documentation
609
653
if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
@@ -615,3 +659,32 @@ jobs:
615
659
with :
616
660
cname : ${{ env.DOCUMENTATION_CNAME }}
617
661
token : ${{ secrets.GITHUB_TOKEN }}
662
+
663
+ doc-index-stable :
664
+ name : " Deploy stable docs index"
665
+ runs-on : ubuntu-latest
666
+ needs : upload_docs_release
667
+ steps :
668
+ - name : " Install Git and clone project"
669
+ uses : actions/checkout@v4
670
+
671
+ - name : " Install the package requirements"
672
+ run : pip install -e .
673
+
674
+ - name : " Get the version to PyMeilisearch"
675
+ run : |
676
+ VERSION=$(python -c "from ansys.geometry.core import __version__; print('.'.join(__version__.split('.')[:2]))")
677
+ VERSION_MEILI=$(python -c "from ansys.geometry.core import __version__; print('-'.join(__version__.split('.')[:2]))")
678
+ echo "Calculated VERSION: $VERSION"
679
+ echo "Calculated VERSION_MEILI: $VERSION_MEILI"
680
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
681
+ echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV
682
+
683
+ - name : " Deploy the latest documentation index"
684
+ uses : ansys/actions/doc-deploy-index@v4
685
+ with :
686
+ cname : ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }}
687
+ index-name : pyansys-geometry-v${{ env.VERSION_MEILI }}
688
+ host-url : ${{ env.MEILISEARCH_HOST_URL }}
689
+ api-key : ${{ env.MEILISEARCH_API_KEY }}
690
+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
0 commit comments