1313 PACKAGE_NAME : ' ansys-geometry-core'
1414 DOCUMENTATION_CNAME : ' geometry.docs.pyansys.com'
1515 ANSRV_GEO_IMAGE : ' ghcr.io/ansys/geometry'
16- ANSRV_GEO_IMAGE_DOCS_TAG : ghcr.io/ansys/geometry:windows -latest
16+ ANSRV_GEO_IMAGE_DOCS_TAG : ghcr.io/ansys/geometry:core-linux -latest
1717 ANSRV_GEO_PORT : 700
1818 ANSRV_GEO_LICENSE_SERVER : ${{ secrets.LICENSE_SERVER }}
1919 GEO_CONT_NAME : ans_geo
@@ -108,16 +108,11 @@ jobs:
108108 name : Check Docker manifests
109109 runs-on : ubuntu-latest
110110 outputs :
111- skip_dms : ${{ steps.services.outputs.skip_dms }}
112111 skip_core_windows : ${{ steps.services.outputs.skip_core_windows }}
113112 skip_core_linux : ${{ steps.services.outputs.skip_core_linux }}
114113 strategy :
115114 matrix :
116115 include :
117- - container-stable : " windows-latest"
118- container-unstable : " windows-latest-unstable"
119- service : " dms"
120- service-name : " Windows DMS"
121116 - container-stable : " core-windows-latest"
122117 container-unstable : " core-windows-latest-unstable"
123118 service : " core_windows"
@@ -171,10 +166,6 @@ jobs:
171166 fail-fast : false
172167 matrix :
173168 include :
174- - docker-image : " windows-latest"
175- experimental : false
176- - docker-image : " windows-latest-unstable"
177- experimental : true
178169 - docker-image : " core-windows-latest"
179170 experimental : false
180171 - docker-image : " core-windows-latest-unstable"
@@ -184,11 +175,8 @@ jobs:
184175 - name : Calculate SKIP_UNSTABLE
185176 if : matrix.experimental
186177 run : |
187- # Choose the manifests output to consider (for DMS or Core service)
188- # based on the matrix value
189- if ("${{ matrix.docker-image }}" -eq "windows-latest-unstable") {
190- $ImagesAreEqual = ${{ needs.manifests.outputs.skip_dms }}
191- } elseif ("${{ matrix.docker-image }}" -eq "core-windows-latest-unstable") {
178+ # Choose the manifests output to consider based on the matrix value
179+ if ("${{ matrix.docker-image }}" -eq "core-windows-latest-unstable") {
192180 $ImagesAreEqual = ${{ needs.manifests.outputs.skip_core_windows }}
193181 } else {
194182 Write-Output "Unknown docker image"
@@ -307,7 +295,7 @@ jobs:
307295
308296 - name : Upload coverage to Codecov
309297 uses : codecov/codecov-action@v5
310- if : matrix.docker-image == 'windows-latest'
298+ if : matrix.docker-image == 'core- windows-latest'
311299 env :
312300 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
313301 with :
@@ -335,14 +323,12 @@ jobs:
335323 docs :
336324 name : Documentation
337325 needs : [docs-style]
338- runs-on : [self-hosted, Windows, pygeometry]
326+ runs-on : ubuntu-latest
339327 env :
340328 PYVISTA_OFF_SCREEN : true
341329 steps :
342330 - name : Set up headless display
343331 uses : pyvista/setup-headless-display-action@v3
344- with :
345- pyvista : false
346332
347333 - name : Login to GitHub Container Registry
348334 uses : docker/login-action@v3
@@ -351,31 +337,19 @@ jobs:
351337 username : ${{ github.actor }}
352338 password : ${{ secrets.GITHUB_TOKEN }}
353339
354- - name : Download Geometry service container (if needed)
355- run : docker pull ${{ env.ANSRV_GEO_IMAGE_DOCS_TAG }}
356-
357- - name : Check location of self-hosted runner and define license server accordingly
358- if : runner.name == 'pygeometry-ci-2'
359- run :
360- echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
361-
362- - name : Stop any running containers
340+ - name : Pull and launch geometry service
363341 run : |
364- $dockerContainers = docker ps -a -q
365- if (-not [string]::IsNullOrEmpty($dockerContainers)) {
366- docker stop $dockerContainers
367- docker rm $dockerContainers
368- }
369-
370- - name : Start Geometry service and verify start
371- run : docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_DOCS_TAG }}
342+ docker pull ${{ env.ANSRV_GEO_IMAGE_DOCS_TAG }}
343+ docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_DOCS_TAG }}
372344
373345 - name : Run Ansys documentation building action
374346 uses : ansys/actions/doc-build@v8
375347 with :
376348 python-version : ${{ env.MAIN_PYTHON_VERSION }}
377349 add-pdf-html-docs-as-assets : true
378350 needs-quarto : true
351+ dependencies : ' pandoc'
352+ sphinxopts : ' -j 1 -W --color'
379353
380354 - name : Stop the Geometry service
381355 if : always()
@@ -384,15 +358,6 @@ jobs:
384358 docker logs ${{ env.GEO_CONT_NAME }}
385359 docker rm ${{ env.GEO_CONT_NAME }}
386360
387- - name : Stop any remaining containers
388- if : always()
389- run : |
390- $dockerContainers = docker ps -a -q
391- if (-not [string]::IsNullOrEmpty($dockerContainers)) {
392- docker stop $dockerContainers
393- docker rm $dockerContainers
394- }
395-
396361
397362# =================================================================================================
398363# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -471,6 +436,7 @@ jobs:
471436 with :
472437 python-version : ${{ env.MAIN_PYTHON_VERSION }}
473438 checkout : false
439+ randomize : true
474440
475441 - name : Upload integration test logs
476442 if : always()
@@ -602,12 +568,17 @@ jobs:
602568 name : Package library
603569 needs : [testing-windows, testing-linux, testing-min-reqs, testing-no-graphics, docs]
604570 runs-on : ubuntu-latest
571+ permissions :
572+ attestations : write
573+ contents : read
574+ id-token : write
605575 steps :
606576 - name : Build library source and wheel artifacts
607577 uses : ansys/actions/build-library@v8
608578 with :
609579 library-name : ${{ env.PACKAGE_NAME }}
610580 python-version : ${{ env.MAIN_PYTHON_VERSION }}
581+ attest-provenance : true
611582
612583# =================================================================================================
613584# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
@@ -633,7 +604,6 @@ jobs:
633604 - name : Download binaries (if conditions met)
634605 if : env.REUSE_LAST_ARTIFACTS == 'false'
635606 run : |
636- curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerWindows.zip --output windows-dms-binaries.zip
637607 curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerCoreWindows.zip --output windows-core-binaries.zip
638608 curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerCoreLinux.zip --output linux-core-binaries.zip
639609
@@ -654,17 +624,9 @@ jobs:
654624 git lfs fetch origin --include="$env:PREVIOUS_VERSION/*"
655625 git lfs checkout $env:PREVIOUS_VERSION
656626 # Copy the binaries from the previous version
657- cp ./$env:PREVIOUS_VERSION/windows-dms-binaries.zip windows-dms-binaries.zip
658627 cp ./$env:PREVIOUS_VERSION/windows-core-binaries.zip windows-core-binaries.zip
659628 cp ./$env:PREVIOUS_VERSION/linux-core-binaries.zip linux-core-binaries.zip
660629
661- - name : Upload DMS Windows binaries as workflow artifacts
662- uses : actions/upload-artifact@v4
663- with :
664- name : windows-dms-binaries.zip
665- path : windows-dms-binaries.zip
666- retention-days : 1
667-
668630 - name : Upload Linux Core service binaries as workflow artifacts
669631 uses : actions/upload-artifact@v4
670632 with :
@@ -686,7 +648,6 @@ jobs:
686648 $env:VERSION=$env:VERSION_WITH_PREFIX.substring(1)
687649 mkdir $env:VERSION -ErrorAction SilentlyContinue
688650 Remove-Item -Recurse -Force .\$env:VERSION\*
689- mv windows-dms-binaries.zip .\$env:VERSION\
690651 mv windows-core-binaries.zip .\$env:VERSION\
691652 mv linux-core-binaries.zip .\$env:VERSION\
692653 git config user.email ${{ secrets.BINARIES_EMAIL }}
@@ -703,9 +664,6 @@ jobs:
703664 fail-fast : false
704665 matrix :
705666 include :
706- - mode : " dms"
707- docker-file : " windows-dms-dockerfile.zip"
708- zip-file : " windows-dms-binaries.zip"
709667 - mode : " coreservice"
710668 docker-file : " windows-core-dockerfile.zip"
711669 zip-file : " windows-core-binaries.zip"
@@ -847,6 +805,7 @@ jobs:
847805 pytest-extra-args : " --use-existing-service=yes"
848806 checkout : false
849807 requires-xvfb : true
808+ randomize : true
850809
851810 - name : " Compressing Linux Dockerfile"
852811@@ -888,8 +847,11 @@ jobs:
888847 - name : Release to GitHub
889848 uses : ansys/actions/release-github@v8
890849 with :
850+ token : ${{ secrets.GITHUB_TOKEN }}
891851 library-name : ${{ env.PACKAGE_NAME }}
892- additional-artifacts : windows-dms-dockerfile.zip windows-core-dockerfile.zip linux-core-dockerfile.zip
852+ additional-artifacts : windows-core-dockerfile.zip linux-core-dockerfile.zip
853+ add-artifact-attestation-notes : true
854+ changelog-release-notes : true
893855
894856 upload_dev_docs :
895857 name : Upload dev documentation
@@ -918,3 +880,25 @@ jobs:
918880 token : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
919881 bot-user : ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
920882 bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
883+
884+ automerge-prs :
885+ name : Automerge PRs (dependabot and pre-commit.ci only)
886+ runs-on : ubuntu-latest
887+ needs : [package]
888+ if : github.event_name == 'pull_request'
889+ permissions :
890+ contents : write
891+ pull-requests : write
892+ steps :
893+ - name : Automerge PRs
894+ uses : ansys/actions/hk-automerge-prs@v8
895+ with :
896+ approver : ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
897+ approver-token : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
898+
899+ - name : If pre-commit PR, add assignee
900+ if : startsWith(github.head_ref, 'pre-commit-ci-update-config')
901+ run : gh pr edit --add-assignee pyansys-ci-bot "$PR_URL"
902+ env :
903+ PR_URL : ${{github.event.pull_request.html_url}}
904+ GH_TOKEN : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
0 commit comments