Skip to content

Commit 5f8a472

Browse files
authored
Merge branch 'main' into feat/stitch_bodies
2 parents 77adf4b + 99370ab commit 5f8a472

File tree

8 files changed

+98
-96
lines changed

8 files changed

+98
-96
lines changed

.github/workflows/backwards_compatibility.yml

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
3131
# =================================================================================================
3232

33-
testing-backwards-compatibility-windows:
33+
testing-backwards-compatibility-windows-old-images:
3434
name: Windows ${{ matrix.backend-version }}
3535
runs-on: [self-hosted, Windows, pygeometry]
3636
strategy:
@@ -43,8 +43,7 @@ jobs:
4343
backend-version: "24.2"
4444
- image-tag: "windows-25.1"
4545
backend-version: "25.1"
46-
- image-tag: "core-windows-25.2"
47-
backend-version: "25.2"
46+
4847
steps:
4948
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5049
with:
@@ -155,3 +154,82 @@ jobs:
155154
# =================================================================================================
156155
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
157156
# =================================================================================================
157+
158+
159+
testing-backwards-compatibility-windows:
160+
name: Windows ${{ matrix.backend-version }}
161+
runs-on: ${{ matrix.windows-runner }}
162+
strategy:
163+
fail-fast: false
164+
matrix:
165+
include:
166+
- image-tag: "core-windows-25.2"
167+
backend-version: "25.2"
168+
windows-runner: "windows-2025"
169+
steps:
170+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
171+
with:
172+
persist-credentials: false
173+
174+
- name: Set up Python
175+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
176+
with:
177+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
178+
179+
- name: Set up headless display
180+
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
181+
182+
- name: Login to GitHub Container Registry
183+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
184+
with:
185+
registry: ghcr.io
186+
username: ${{ github.actor }}
187+
password: ${{ secrets.GITHUB_TOKEN }}
188+
189+
- name: Install packages for testing
190+
run: |
191+
python -m pip install --upgrade pip
192+
pip install --upgrade build wheel
193+
pip install -e .[tests]
194+
195+
- name: Download Geometry service container (if needed)
196+
env:
197+
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.image-tag }}"
198+
run: |
199+
Write-Host "Pulling Docker image: $env:FULL_IMAGE_NAME"
200+
docker pull $env:FULL_IMAGE_NAME
201+
202+
- name: Start Geometry service and verify start
203+
env:
204+
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.image-tag }}"
205+
PORT_MAPPING: "${{ env.ANSRV_GEO_PORT }}:50051"
206+
TRANSPORT_MODE_SELECTION: ${{ secrets.TRANSPORT_MODE_SELECTION }}
207+
run: |
208+
# Write command to file launch.txt for sanitizing purposes
209+
echo "docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER $env:SERVER_ENDPOINT -p $env:PORT_MAPPING $env:FULL_IMAGE_NAME $env:TRANSPORT_MODE_SELECTION" | Out-File -FilePath launch.txt
210+
# Read the file and execute the command
211+
$command = Get-Content -Path launch.txt | Select-String -Pattern "docker run"
212+
Invoke-Expression $command.Line
213+
Start-Sleep -Seconds 10
214+
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
215+
216+
- name: Testing
217+
timeout-minutes: 20 # Sometimes hangs...
218+
env:
219+
BACKEND_VERSION: ${{ matrix.backend-version }}
220+
run: |
221+
pytest -v --backwards-compatibility=yes --backend-version=$env:BACKEND_VERSION -rf
222+
223+
- name: Upload coverage to Codecov
224+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
225+
env:
226+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
227+
with:
228+
files: .cov/xml
229+
230+
- name: Stop the Geometry service
231+
if: always()
232+
run: |
233+
docker stop $env:GEO_CONT_NAME
234+
docker logs $env:GEO_CONT_NAME
235+
docker rm $env:GEO_CONT_NAME

.github/workflows/ci_cd.yml

Lines changed: 7 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
ANSRV_GEO_PORT: 700
1818
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
1919
GEO_CONT_NAME: ans_geo
20-
RESET_IMAGE_CACHE: 10
20+
RESET_IMAGE_CACHE: 0
2121
IS_WORKFLOW_RUNNING: True
2222
ARTIFACTORY_VERSION: v261
2323

@@ -167,14 +167,10 @@ jobs:
167167
echo "skip_${SERVICE}=0" >> "$GITHUB_OUTPUT"
168168
fi
169169
170-
# =================================================================================================
171-
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
172-
# =================================================================================================
173-
174170
testing-windows:
175171
name: Testing and coverage (Windows)
176172
needs: [smoke-tests, manifests]
177-
runs-on: [self-hosted, Windows, pygeometry]
173+
runs-on: windows-latest
178174
continue-on-error: ${{ matrix.experimental }}
179175
env:
180176
SKIP_UNSTABLE: false
@@ -228,19 +224,12 @@ jobs:
228224
if: env.SKIP_UNSTABLE == 'false'
229225
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
230226

231-
- name: Create Python venv
232-
if: env.SKIP_UNSTABLE == 'false'
233-
run: |
234-
python -m venv .venv
235-
.\.venv\Scripts\Activate.ps1
236-
237227
- name: Install packages for testing
238228
if: env.SKIP_UNSTABLE == 'false'
239229
run: |
240-
.\.venv\Scripts\Activate.ps1
241230
python -m pip install --upgrade pip
242231
pip install --upgrade build wheel
243-
pip install .[tests]
232+
pip install -e .[tests]
244233
245234
- name: Login to GitHub Container Registry
246235
if: env.SKIP_UNSTABLE == 'false'
@@ -258,29 +247,13 @@ jobs:
258247
Write-Host "Pulling Docker image: $env:FULL_IMAGE_NAME"
259248
docker pull $env:FULL_IMAGE_NAME
260249
261-
- name: Check location of self-hosted runner and define license server accordingly
262-
if: env.SKIP_UNSTABLE == 'false' && runner.name == 'pygeometry-ci-2'
263-
env:
264-
LICENSE_SERVER_INTERNAL: ${{ secrets.LICENSE_SERVER_INTERNAL }}
265-
run:
266-
echo "ANSRV_GEO_LICENSE_SERVER=$env:LICENSE_SERVER_INTERNAL" | Out-File -FilePath $env:GITHUB_ENV -Append
267-
268-
- name: Stop any running containers
269-
run: |
270-
$dockerContainers = docker ps -a -q
271-
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
272-
docker stop $dockerContainers
273-
docker rm $dockerContainers
274-
}
275-
276250
- name: Start Geometry service and verify start
277251
if: env.SKIP_UNSTABLE == 'false'
278252
env:
279253
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.docker-image }}"
280254
PORT_MAPPING: "${{ env.ANSRV_GEO_PORT }}:50051"
281255
TRANSPORT_MODE_SELECTION: ${{ secrets.TRANSPORT_MODE_SELECTION }}
282256
run: |
283-
.\.venv\Scripts\Activate.ps1
284257
# Write command to file launch.txt for sanitizing purposes
285258
echo "docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:PORT_MAPPING $env:FULL_IMAGE_NAME $env:TRANSPORT_MODE_SELECTION" | Out-File -FilePath launch.txt
286259
# Read the file and execute the command
@@ -294,15 +267,14 @@ jobs:
294267
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
295268
with:
296269
path: .\tests\integration\image_cache
297-
key: pyvista-image-cache-${{ runner.name }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
298-
restore-keys: pyvista-image-cache-${{ runner.name }}-v-${{ env.RESET_IMAGE_CACHE }}
270+
key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
271+
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
299272
lookup-only: false # zizmor: ignore[cache-poisoning]
300273

301274
- name: Testing
302275
if: env.SKIP_UNSTABLE == 'false'
303-
timeout-minutes: 20 # On Windows self-hosted runners, sometimes hangs...
276+
timeout-minutes: 20 # Sometimes hangs...
304277
run: |
305-
.\.venv\Scripts\Activate.ps1
306278
pytest -v
307279
308280
- name: Upload integration test logs
@@ -348,19 +320,6 @@ jobs:
348320
docker rm $env:GEO_CONT_NAME
349321
}
350322
351-
- name: Stop any remaining containers
352-
if: always()
353-
run: |
354-
$dockerContainers = docker ps -a -q
355-
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
356-
docker stop $dockerContainers
357-
docker rm $dockerContainers
358-
}
359-
360-
# =================================================================================================
361-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
362-
# =================================================================================================
363-
364323
docs:
365324
name: Documentation
366325
needs: [docs-style]
@@ -661,7 +620,7 @@ jobs:
661620
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
662621
runs-on:
663622
group: ansys-network
664-
labels: [self-hosted, Windows, pygeometry]
623+
labels: [Windows, pygeometry]
665624
env:
666625
REUSE_LAST_ARTIFACTS: ${{ vars.REUSE_LAST_ARTIFACTS == 1 }}
667626

.github/workflows/nightly_docker_test.yml

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,11 @@ jobs:
9090
echo "skip_${SERVICE}=0" >> "$GITHUB_OUTPUT"
9191
fi
9292
93-
# =================================================================================================
94-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95-
# =================================================================================================
96-
9793
windows-tests:
9894
name: Windows Core Service
9995
needs: manifests
10096
if: needs.manifests.outputs.skip_core_windows == 0
101-
runs-on: [self-hosted, Windows, pygeometry]
97+
runs-on: windows-latest
10298
env:
10399
PYVISTA_OFF_SCREEN: true
104100
permissions:
@@ -117,16 +113,10 @@ jobs:
117113
- name: Set up headless display
118114
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
119115

120-
- name: Create Python venv
121-
run: |
122-
python -m venv .venv
123-
.\.venv\Scripts\Activate.ps1
124-
125116
- name: Install packages for testing
126117
run: |
127-
.\.venv\Scripts\Activate.ps1
128118
pip install --upgrade build
129-
pip install .[tests]
119+
pip install -e .[tests]
130120
131121
- name: Login to GitHub Container Registry
132122
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
@@ -135,24 +125,15 @@ jobs:
135125
username: ${{ github.actor }}
136126
password: ${{ secrets.GITHUB_TOKEN }}
137127

138-
- name: Download Geometry service container (always latest version)
128+
- name: Download Geometry service container
139129
run: |
140-
docker image rm $env:ANSRV_GEO_IMAGE_WINDOWS_CORE_TAG
141130
docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_CORE_TAG
142131
143-
- name: Check location of self-hosted runner and define license server accordingly
144-
if: runner.name == 'pygeometry-ci-2'
145-
env:
146-
LICENSE_SERVER_INTERNAL: ${{ secrets.LICENSE_SERVER_INTERNAL }}
147-
run:
148-
echo "ANSRV_GEO_LICENSE_SERVER=$env:LICENSE_SERVER_INTERNAL" | Out-File -FilePath $env:GITHUB_ENV -Append
149-
150132
- name: Start Geometry service and verify start
151133
env:
152134
TRANSPORT_MODE_SELECTION: ${{ secrets.TRANSPORT_MODE_SELECTION }}
153135
PORT_MAPPING: "${{ env.ANSRV_GEO_PORT }}:50051"
154136
run: |
155-
.\.venv\Scripts\Activate.ps1
156137
# Write command to file launch.txt for sanitizing purposes
157138
echo "docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:PORT_MAPPING $env:ANSRV_GEO_IMAGE_WINDOWS_CORE_TAG $env:TRANSPORT_MODE_SELECTION" | Out-File -FilePath launch.txt
158139
# Read the file and execute the command
@@ -162,9 +143,8 @@ jobs:
162143
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
163144
164145
- name: Run PyAnsys Geometry tests
165-
timeout-minutes: 20 # On Windows self-hosted runners, sometimes hangs...
146+
timeout-minutes: 20 # Sometimes hangs...
166147
run: |
167-
.\.venv\Scripts\Activate.ps1
168148
pytest -v
169149
170150
- name: Stop the Geometry service
@@ -174,19 +154,6 @@ jobs:
174154
docker logs $env:GEO_CONT_NAME
175155
docker rm $env:GEO_CONT_NAME
176156
177-
- name: Stop any remaining containers
178-
if: always()
179-
run: |
180-
$dockerContainers = docker ps -a -q
181-
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
182-
docker stop $dockerContainers
183-
docker rm $dockerContainers
184-
}
185-
186-
- name: Clean all Docker dangling images
187-
if: always()
188-
run: docker image prune -f
189-
190157
- name: Microsoft Teams Notification
191158
uses: skitionek/notify-microsoft-teams@11e40c38c3a629ae65a985b582eca4897b01e79e # v1.0.9
192159
if: failure()
@@ -215,11 +182,6 @@ jobs:
215182
]
216183
}
217184
218-
219-
# =================================================================================================
220-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221-
# =================================================================================================
222-
223185
linux-tests:
224186
name: Linux Core Service
225187
needs: manifests

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exclude: "tests/integration/files"
77
repos:
88

99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.13.2
10+
rev: v0.13.3
1111
hooks:
1212
- id: ruff-check
1313
- id: ruff-format
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump-ansys-tools-viz-interface
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Pre-commit automatic update
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Run on GitHub runners directly

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ all = [
5858
tests = [
5959
"ansys-platform-instancemanagement==1.1.2",
6060
"ansys-tools-path==0.7.3",
61-
"ansys-tools-visualization-interface==0.11.0",
61+
"ansys-tools-visualization-interface==0.12.1",
6262
"beartype==0.21.0",
6363
"docker==7.1.0",
6464
"geomdl==5.4.0",
@@ -89,7 +89,7 @@ tests-minimal = [
8989
doc = [
9090
"ansys-sphinx-theme[autoapi]==1.6.1",
9191
"ansys-tools-path==0.7.3",
92-
"ansys-tools-visualization-interface==0.11.0",
92+
"ansys-tools-visualization-interface==0.12.1",
9393
"beartype==0.21.0",
9494
"docker==7.1.0",
9595
"geomdl==5.4.0",

0 commit comments

Comments
 (0)