1717 ANSRV_GEO_PORT : 700
1818 ANSRV_GEO_LICENSE_SERVER : ${{ secrets.LICENSE_SERVER }}
1919 GEO_CONT_NAME : ans_geo
20- RESET_IMAGE_CACHE : 3
20+ RESET_IMAGE_CACHE : 6
2121 IS_WORKFLOW_RUNNING : True
2222 ARTIFACTORY_VERSION : v241
2323
6666 needs : [smoke-tests]
6767 runs-on : [self-hosted, Windows, pygeometry]
6868 continue-on-error : ${{ matrix.experimental }}
69+ env :
70+ SKIP_UNSTABLE : ${{ vars.SKIP_UNSTABLE_CONTAINERS_TEMPORARILY == 1 && matrix.experimental }}
6971 strategy :
7072 fail-fast : false
7173 matrix :
@@ -76,58 +78,67 @@ jobs:
7678 experimental : true
7779
7880 steps :
79-
8081 - uses : actions/checkout@v4
82+ if : env.SKIP_UNSTABLE == 'false'
8183
8284 - name : Set up Python
85+ if : env.SKIP_UNSTABLE == 'false'
8386 uses : actions/setup-python@v4
8487 with :
8588 python-version : ' 3.9' # use python3.9, self-hosted has an issue with 3.10
8689
8790 - name : Set up headless display
91+ if : env.SKIP_UNSTABLE == 'false'
8892 uses : pyvista/setup-headless-display-action@v2
8993
9094 - name : Create Python venv
95+ if : env.SKIP_UNSTABLE == 'false'
9196 run : |
9297 python -m venv .venv
9398 .\.venv\Scripts\Activate.ps1
9499
95100 - name : Install packages for testing
101+ if : env.SKIP_UNSTABLE == 'false'
96102 run : |
97103 .\.venv\Scripts\Activate.ps1
98104 python -m pip install --upgrade pip
99105 pip install --upgrade build wheel
100106 pip install .[tests]
101107
102108 - name : Login to GitHub Container Registry
103- uses : docker/login-action@v2
109+ if : env.SKIP_UNSTABLE == 'false'
110+ uses : docker/login-action@v3
104111 with :
105112 registry : ghcr.io
106113 username : ${{ github.actor }}
107114 password : ${{ secrets.GITHUB_TOKEN }}
108115
109116 - name : Download Geometry service container (if needed)
117+ if : env.SKIP_UNSTABLE == 'false'
110118 run : docker pull ${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.docker-image }}
111119
112120 - name : Check location of self-hosted runner and define license server accordingly
113- if : runner.name == 'pygeometry-ci-1' || runner.name == 'pygeometry-ci-2'
121+ if : env.SKIP_UNSTABLE == 'false' && ( runner.name == 'pygeometry-ci-1' || runner.name == 'pygeometry-ci-2')
114122 run :
115123 echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
116124
117125 - name : Start Geometry service and verify start
126+ if : env.SKIP_UNSTABLE == 'false'
118127 run : |
119128 .\.venv\Scripts\Activate.ps1
120129 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 }}:${{ matrix.docker-image }}
121130 python -c "from ansys.geometry.core.connection.validate import validate; validate()"
122131
123132 - name : Restore images cache
133+ if : env.SKIP_UNSTABLE == 'false'
124134 uses : actions/cache@v3
125135 with :
126136 path : .\tests\integration\image_cache
127137 key : pyvista-image-cache-${{ runner.name }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
128138 restore-keys : pyvista-image-cache-${{ runner.name }}-v-${{ env.RESET_IMAGE_CACHE }}
129139
130140 - name : Testing
141+ if : env.SKIP_UNSTABLE == 'false'
131142 run : |
132143 .\.venv\Scripts\Activate.ps1
133144 pytest -v
@@ -159,15 +170,20 @@ jobs:
159170 - name : Upload coverage to Codecov
160171 uses : codecov/codecov-action@v3
161172 if : matrix.docker-image == 'windows-latest'
173+ env :
174+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
162175 with :
163176 files : .cov/xml
164177
165178 - name : Stop the Geometry service
166179 if : always()
167180 run : |
168- docker stop $env:GEO_CONT_NAME
169- docker logs $env:GEO_CONT_NAME
170- docker rm $env:GEO_CONT_NAME
181+ if ( $env:SKIP_UNSTABLE -match 'false')
182+ {
183+ docker stop $env:GEO_CONT_NAME
184+ docker logs $env:GEO_CONT_NAME
185+ docker rm $env:GEO_CONT_NAME
186+ }
171187
172188 - name : Stop any remaining containers
173189 if : always()
@@ -204,12 +220,9 @@ jobs:
204220 python -m pip install --upgrade pip
205221 pip install --upgrade build wheel
206222 pip install .[doc]
207- # TODO - To be removed once it is published
208- pip uninstall --yes sphinx-autoapi
209- pip install "sphinx-autoapi @ git+https://github.com/jorgepiloto/sphinx-autoapi@feat/single-page-option"
210223
211224 - name : Login to GitHub Container Registry
212- uses : docker/login-action@v2
225+ uses : docker/login-action@v3
213226 with :
214227 registry : ghcr.io
215228 username : ${{ github.actor }}
@@ -280,6 +293,8 @@ jobs:
280293 needs : [smoke-tests]
281294 runs-on : ubuntu-latest
282295 continue-on-error : ${{ matrix.experimental }}
296+ env :
297+ SKIP_UNSTABLE : ${{ vars.SKIP_UNSTABLE_CONTAINERS_TEMPORARILY == 1 && matrix.experimental }}
283298 strategy :
284299 fail-fast : false
285300 matrix :
@@ -291,27 +306,33 @@ jobs:
291306
292307 steps :
293308 - name : Login in Github Container registry
294- uses : docker/login-action@v2
309+ if : env.SKIP_UNSTABLE == 'false'
310+ uses : docker/login-action@v3
295311 with :
296312 registry : ghcr.io
297313 username : ${{ github.actor }}
298314 password : ${{ secrets.GITHUB_TOKEN }}
299315
300316 - name : Pull and launch geometry service
317+ if : env.SKIP_UNSTABLE == 'false'
301318 run : |
302319 docker pull ${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.docker-image }}
303320 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 }}:${{ matrix.docker-image }}
321+
304322 - name : Checkout repository
323+ if : env.SKIP_UNSTABLE == 'false'
305324 uses : actions/checkout@v4
306325
307326 - name : Restore images cache
327+ if : env.SKIP_UNSTABLE == 'false'
308328 uses : actions/cache@v3
309329 with :
310330 path : tests/integration/image_cache
311331 key : pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
312332 restore-keys : pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
313333
314334 - name : Run pytest
335+ if : env.SKIP_UNSTABLE == 'false'
315336 uses : ansys/actions/tests-pytest@v4
316337 env :
317338 ALLOW_PLOTTING : true
@@ -339,9 +360,12 @@ jobs:
339360 - name : Stop the Geometry service
340361 if : always()
341362 run : |
342- docker stop ${{ env.GEO_CONT_NAME }}
343- docker logs ${{ env.GEO_CONT_NAME }}
344- docker rm ${{ env.GEO_CONT_NAME }}
363+ if [[ ${{ env.SKIP_UNSTABLE }} == 'false' ]];
364+ then
365+ docker stop ${{ env.GEO_CONT_NAME }}
366+ docker logs ${{ env.GEO_CONT_NAME }}
367+ docker rm ${{ env.GEO_CONT_NAME }}
368+ fi
345369
346370 package :
347371 name : Package library
@@ -439,6 +463,19 @@ jobs:
439463 .\.venv\Scripts\Activate.ps1
440464 pytest -v --use-existing-service=yes
441465
466+ - name : " Compressing Dockerfile.windows"
467+ 468+ with :
469+ files : docker/Dockerfile.windows
470+ dest : windows-dockerfile.zip
471+
472+ - name : Upload Windows Dockerfile
473+ uses : actions/upload-artifact@v3
474+ with :
475+ name : windows-dockerfile.zip
476+ path : windows-dockerfile.zip
477+ retention-days : 7
478+
442479 - name : Stop the Geometry service
443480 if : always()
444481 run : |
@@ -516,6 +553,19 @@ jobs:
516553 checkout : false
517554 requires-xvfb : true
518555
556+ - name : " Compressing Dockerfile.linux"
557+ 558+ with :
559+ files : docker/Dockerfile.linux
560+ dest : linux-dockerfile.zip
561+
562+ - name : Upload Linux Dockerfile
563+ uses : actions/upload-artifact@v3
564+ with :
565+ name : linux-dockerfile.zip
566+ path : linux-dockerfile.zip
567+ retention-days : 7
568+
519569 - name : Stop the Geometry service
520570 if : always()
521571 run : |
@@ -540,7 +590,7 @@ jobs:
540590 uses : ansys/actions/release-github@v4
541591 with :
542592 library-name : ${{ env.PACKAGE_NAME }}
543- additional-artifacts : windows-binaries.zip linux-binaries.zip
593+ additional-artifacts : windows-binaries.zip windows-dockerfile.zip linux-binaries.zip linux-dockerfile .zip
544594
545595 upload_dev_docs :
546596 name : Upload dev documentation
0 commit comments