2222
2323env :
2424 MAIN_PYTHON_VERSION : ' 3.12'
25- ANSRV_GEO_IMAGE_WINDOWS_TAG : ghcr.io/ansys/geometry:windows-latest-unstable
2625 ANSRV_GEO_IMAGE_WINDOWS_CORE_TAG : ghcr.io/ansys/geometry:core-windows-latest-unstable
2726 ANSRV_GEO_IMAGE_LINUX_CORE_TAG : ghcr.io/ansys/geometry:core-linux-latest-unstable
2827 ANSRV_GEO_PORT : 710
@@ -39,16 +38,11 @@ jobs:
3938 name : Check Docker manifests
4039 runs-on : ubuntu-latest
4140 outputs :
42- skip_dms : ${{ steps.services.outputs.skip_dms }}
4341 skip_core_windows : ${{ steps.services.outputs.skip_core_windows }}
4442 skip_core_linux : ${{ steps.services.outputs.skip_core_linux }}
4543 strategy :
4644 matrix :
4745 include :
48- - container-stable : " windows-latest"
49- container-unstable : " windows-latest-unstable"
50- service : " dms"
51- service-name : " Windows DMS"
5246 - container-stable : " core-windows-latest"
5347 container-unstable : " core-windows-latest-unstable"
5448 service : " core_windows"
@@ -90,113 +84,7 @@ jobs:
9084# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9185# =================================================================================================
9286
93- windows-dms-tests :
94- name : Windows DMS
95- needs : manifests
96- if : needs.manifests.outputs.skip_dms == 0
97- runs-on : [self-hosted, Windows, pygeometry]
98- env :
99- PYVISTA_OFF_SCREEN : true
100- steps :
101- - uses : actions/checkout@v4
102-
103- - name : Set up Python
104- uses : actions/setup-python@v5
105- with :
106- python-version : ${{ env.MAIN_PYTHON_VERSION }}
107-
108- - name : Set up headless display
109- uses : pyvista/setup-headless-display-action@v3
110- with :
111- pyvista : false
112-
113- - name : Create Python venv
114- run : |
115- python -m venv .venv
116- .\.venv\Scripts\Activate.ps1
117-
118- - name : Install packages for testing
119- run : |
120- .\.venv\Scripts\Activate.ps1
121- pip install --upgrade build
122- pip install .[tests]
123-
124- - name : Login to GitHub Container Registry
125- uses : docker/login-action@v3
126- with :
127- registry : ghcr.io
128- username : ${{ github.actor }}
129- password : ${{ secrets.GITHUB_TOKEN }}
130-
131- - name : Download Geometry service container (always latest version)
132- run : |
133- docker image rm ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}
134- docker pull ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}
135-
136- - name : Check location of self-hosted runner and define license server accordingly
137- if : runner.name == 'pygeometry-ci-2'
138- run :
139- echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
140-
141- - name : Start Geometry service and verify start
142- run : |
143- .\.venv\Scripts\Activate.ps1
144- 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_WINDOWS_TAG }}
145- python -c "from ansys.geometry.core.connection.validate import validate; validate()"
146-
147- - name : Run PyAnsys Geometry tests
148- run : |
149- .\.venv\Scripts\Activate.ps1
150- pytest -v
151-
152- - name : Stop the Geometry service
153- if : always()
154- run : |
155- docker stop ${{ env.GEO_CONT_NAME }}
156- docker logs ${{ env.GEO_CONT_NAME }}
157- docker rm ${{ env.GEO_CONT_NAME }}
158-
159- - name : Stop any remaining containers
160- if : always()
161- run : |
162- $dockerContainers = docker ps -a -q
163- if (-not [string]::IsNullOrEmpty($dockerContainers)) {
164- docker stop $dockerContainers
165- docker rm $dockerContainers
166- }
167-
168- - name : Clean all Docker dangling images
169- if : always()
170- run : docker image prune -f
171-
172- - name : Microsoft Teams Notification
173- uses : skitionek/notify-microsoft-teams@master
174- if : failure()
175- with :
176- webhook_url : ${{ secrets.MSTEAMS_WEBHOOK }}
177- # Message to send to Teams as a webhook notification in JSON Payload format
178- raw : >-
179- {
180- "@type": "MessageCard",
181- "@context": "http://schema.org/extensions",
182- "summary": "Unstable build tests for Windows DMS failing",
183- "themeColor": "f44336",
184- "title": "PyAnsys Geometry unstable build tests - Windows DMS failing",
185- "sections": [
186- {
187- "activityTitle": "Windows DMS unstable build tests are failing",
188- "activitySubtitle": "Check the run for more details: https://github.com/ansys/pyansys-geometry/actions/runs/${{ github.run_id }}",
189- "facts": [
190- {
191- "name": "Status",
192- "value": "Failed"
193- }
194- ]
195- }
196- ]
197- }
198-
199- windows-core-tests :
87+ windows-tests :
20088 name : Windows Core Service
20189 needs : manifests
20290 if : needs.manifests.outputs.skip_core_windows == 0
@@ -368,33 +256,8 @@ jobs:
368256 ]
369257 }
370258
371- promote-windows-dms :
372- needs : windows-dms-tests
373- runs-on : windows-latest
374- name : Promote Windows DMS container
375- if : ${{ github.event.inputs.promote == 'true' || github.event_name == 'schedule' }}
376- env :
377- WINDOWS_UNSTABLE : ghcr.io/ansys/geometry:windows-latest-unstable
378- WINDOWS_STABLE_GHCR : ghcr.io/ansys/geometry:windows-latest
379- steps :
380- - name : Login in Github Container registry
381- uses : docker/login-action@v3
382- with :
383- registry : ghcr.io
384- username : ${{ github.actor }}
385- password : ${{ secrets.GITHUB_TOKEN }}
386-
387- - name : Pull Windows latest unstable container
388- run : docker pull ${{ env.WINDOWS_UNSTABLE }}
389-
390- - name : Tag container as latest (stable) for Github Container registry
391- run : docker tag ${{ env.WINDOWS_UNSTABLE }} ${{ env.WINDOWS_STABLE_GHCR }}
392-
393- - name : Publish latest stable container in ghcr.io
394- run : docker push ${{ env.WINDOWS_STABLE_GHCR }}
395-
396- promote-windows-core :
397- needs : windows-core-tests
259+ promote-windows :
260+ needs : windows-tests
398261 runs-on : windows-latest
399262 name : Promote Windows Core Service container
400263 if : ${{ github.event.inputs.promote == 'true' || github.event_name == 'schedule' }}
0 commit comments