Skip to content

Commit 0297237

Browse files
Merge branch 'main' into feat/enhanced_beam_implementation
2 parents 78e159c + 2336977 commit 0297237

32 files changed

+529
-319
lines changed

.github/workflows/automerge_prs.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/ci_cd.yml

Lines changed: 34 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -633,7 +598,6 @@ jobs:
633598
- name: Download binaries (if conditions met)
634599
if: env.REUSE_LAST_ARTIFACTS == 'false'
635600
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
637601
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
638602
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
639603
@@ -654,17 +618,9 @@ jobs:
654618
git lfs fetch origin --include="$env:PREVIOUS_VERSION/*"
655619
git lfs checkout $env:PREVIOUS_VERSION
656620
# Copy the binaries from the previous version
657-
cp ./$env:PREVIOUS_VERSION/windows-dms-binaries.zip windows-dms-binaries.zip
658621
cp ./$env:PREVIOUS_VERSION/windows-core-binaries.zip windows-core-binaries.zip
659622
cp ./$env:PREVIOUS_VERSION/linux-core-binaries.zip linux-core-binaries.zip
660623
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-
668624
- name: Upload Linux Core service binaries as workflow artifacts
669625
uses: actions/upload-artifact@v4
670626
with:
@@ -686,7 +642,6 @@ jobs:
686642
$env:VERSION=$env:VERSION_WITH_PREFIX.substring(1)
687643
mkdir $env:VERSION -ErrorAction SilentlyContinue
688644
Remove-Item -Recurse -Force .\$env:VERSION\*
689-
mv windows-dms-binaries.zip .\$env:VERSION\
690645
mv windows-core-binaries.zip .\$env:VERSION\
691646
mv linux-core-binaries.zip .\$env:VERSION\
692647
git config user.email ${{ secrets.BINARIES_EMAIL }}
@@ -703,9 +658,6 @@ jobs:
703658
fail-fast: false
704659
matrix:
705660
include:
706-
- mode: "dms"
707-
docker-file: "windows-dms-dockerfile.zip"
708-
zip-file: "windows-dms-binaries.zip"
709661
- mode: "coreservice"
710662
docker-file: "windows-core-dockerfile.zip"
711663
zip-file: "windows-core-binaries.zip"
@@ -888,8 +840,9 @@ jobs:
888840
- name: Release to GitHub
889841
uses: ansys/actions/release-github@v8
890842
with:
843+
token: ${{ secrets.GITHUB_TOKEN }}
891844
library-name: ${{ env.PACKAGE_NAME }}
892-
additional-artifacts: windows-dms-dockerfile.zip windows-core-dockerfile.zip linux-core-dockerfile.zip
845+
additional-artifacts: windows-core-dockerfile.zip linux-core-dockerfile.zip
893846

894847
upload_dev_docs:
895848
name: Upload dev documentation
@@ -918,3 +871,25 @@ jobs:
918871
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
919872
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
920873
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
874+
875+
automerge-prs:
876+
name: Automerge PRs (dependabot and pre-commit.ci only)
877+
runs-on: ubuntu-latest
878+
needs: [package]
879+
if: github.event_name == 'pull_request'
880+
permissions:
881+
contents: write
882+
pull-requests: write
883+
steps:
884+
- name: Automerge PRs
885+
uses: ansys/actions/hk-automerge-prs@v8
886+
with:
887+
approver: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
888+
approver-token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
889+
890+
- name: If pre-commit PR, add assignee
891+
if: startsWith(github.head_ref, 'pre-commit-ci-update-config')
892+
run: gh pr edit --add-assignee pyansys-ci-bot "$PR_URL"
893+
env:
894+
PR_URL: ${{github.event.pull_request.html_url}}
895+
GH_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}

.github/workflows/docker_ansyslab_windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ permissions:
1212
packages: read
1313

1414
env:
15-
WINDOWS_STABLE_GHCR: ghcr.io/ansys/geometry:windows-latest
16-
WINDOWS_STABLE_FUJI: azwepsifujiaksacr.azurecr.io/ansys/discovery/geometry:windows-latest
15+
WINDOWS_STABLE_GHCR: ghcr.io/ansys/geometry:core-windows-latest
16+
WINDOWS_STABLE_FUJI: azwepsifujiaksacr.azurecr.io/ansys/discovery/geometry:core-windows-latest
1717

1818
jobs:
1919
windows-ansyslab:

0 commit comments

Comments
 (0)