DOCS: Remove sphinxemoji extension as it is not used. (#145) #261
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Geometry Mesh Fluent Workflow | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| doc-build: | |
| required: false | |
| default: false | |
| type: boolean | |
| description: 'Whether to build the documentation' | |
| workflow_call: | |
| inputs: | |
| doc-build: | |
| required: false | |
| default: false | |
| type: boolean | |
| description: 'Whether to build the documentation' | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - 'geometry-mesh-fluent/**' | |
| env: | |
| MAIN_PYTHON_VERSION: '3.12' | |
| GEOMETRY_DOCKER_IMAGE: 'ghcr.io/ansys/geometry' | |
| FLUENT_DOCKER_IMAGE: 'ghcr.io/ansys/fluent' | |
| FLUENT_DOCKER_EXEC_COMMAND: ${{ secrets.FLUENT_DOCKER_EXEC_COMMAND }} | |
| ANSRV_GEO_PORT: 700 | |
| ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER )}} | |
| PYANSYS_WORKFLOWS_CI: true | |
| ANSYS_RELEASE_FOR_DOCS: 24.1 | |
| jobs: | |
| is-only-docs-required: | |
| uses: ./.github/workflows/check-docs-required.yml | |
| with: | |
| doc-build: ${{ inputs.doc-build || false }} | |
| geometry: | |
| name: Geometry | |
| runs-on: [self-hosted, Windows, pyansys-workflows] | |
| needs: is-only-docs-required | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # [24.1, 24.2, 25.1] -- HACK FOR FLUENT: 24.2 is in reality a 24.1 container, and 25.1 has issues with CAD import currently | |
| ansys-release: ${{ needs.is-only-docs-required.outputs.only-docs == 'true' && fromJSON('[24.1]') || fromJSON('[24.1]') }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| sparse-checkout: | | |
| geometry-mesh-fluent | |
| doc | |
| - name: Set up Python ${{ env.MAIN_PYTHON_VERSION }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
| - name: Setup headless display | |
| uses: pyvista/setup-headless-display-action@v4 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m venv .venv | |
| .venv/Scripts/activate | |
| pip install -r geometry-mesh-fluent/requirements_${{ matrix.ansys-release }}.txt | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download (if needed) and run Geometry service container | |
| run: | | |
| # If we are on 25.1 or above - the tag name is different - remember we are on powershell | |
| if (${{ matrix.ansys-release }} -ge 25.2) { | |
| $env:ANSYS_GEOMETRY_RELEASE = "${{ env.GEOMETRY_DOCKER_IMAGE }}:core-windows-${{ matrix.ansys-release }}" | |
| } else { | |
| $env:ANSYS_GEOMETRY_RELEASE = "${{ env.GEOMETRY_DOCKER_IMAGE }}:windows-${{ matrix.ansys-release }}" | |
| } | |
| Write-Host "Running Geometry service container: $env:ANSYS_GEOMETRY_RELEASE" | |
| # Pull the container image | |
| docker pull $env:ANSYS_GEOMETRY_RELEASE | |
| # Define the ANSYS_GEOMETRY_RELEASE environment variable to be used in the next stages | |
| echo "ANSYS_GEOMETRY_RELEASE=$env:ANSYS_GEOMETRY_RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| - name: Run the PyAnsys Geometry script | |
| run: | | |
| .venv/Scripts/activate | |
| python geometry-mesh-fluent/wf_gmf_01_geometry.py | |
| - name: Store the outputs | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: geometry-mesh-fluent-workflow-geometry-outputs-${{ matrix.ansys-release }} | |
| path: geometry-mesh-fluent/outputs | |
| - name: (DOCS) Build the documentation (only on ${{ env.ANSYS_RELEASE_FOR_DOCS}}) | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| env: | |
| BUILD_DOCS_SCRIPT: 'geometry-mesh-fluent/wf_gmf_01_geometry.py' | |
| run: | | |
| .venv/Scripts/activate | |
| cd doc | |
| pip install -r requirements.txt | |
| ./make.bat html | |
| - name: (DOCS) Upload docs artifacts | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: geometry-mesh-fluent-docs-stage-geometry | |
| path: | | |
| doc/_build/ | |
| doc/source/examples/geometry-mesh-fluent/ | |
| - name: Stop any remaining containers | |
| if: always() | |
| run: | | |
| $dockerContainers = docker ps -a -q | |
| if (-not [string]::IsNullOrEmpty($dockerContainers)) { | |
| docker rm -f $dockerContainers | |
| } | |
| fluent-mesh: | |
| name: Fluent Meshing | |
| runs-on: public-ubuntu-latest-8-cores | |
| needs: [geometry, is-only-docs-required] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # [24.1, 24.2, 25.1] -- HACK FOR FLUENT: 24.2 is in reality a 24.1 container, and 25.1 has issues with CAD import currently | |
| ansys-release: ${{ needs.is-only-docs-required.outputs.only-docs == 'true' && fromJSON('[24.1]') || fromJSON('[24.1]') }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| sparse-checkout: | | |
| geometry-mesh-fluent | |
| doc | |
| - name: Set up Python ${{ env.MAIN_PYTHON_VERSION }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r geometry-mesh-fluent/requirements_${{ matrix.ansys-release }}.txt | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Full Fluent image (name+tag) | |
| run: | | |
| if [[ "${{ matrix.ansys-release }}" == "24.1" || "${{ matrix.ansys-release }}" == "24.2" ]]; then | |
| IMAGE_TAG=v24.2.5 | |
| elif [[ "${{ matrix.ansys-release }}" == "25.1" ]]; then | |
| IMAGE_TAG=v25.1.4 | |
| else | |
| echo "Unsupported release: ${{ matrix.ansys-release }}" | |
| exit 1 | |
| fi | |
| echo "FLUENT_DOCKER_IMAGE=${{ env.FLUENT_DOCKER_IMAGE }}:${IMAGE_TAG}" >> $GITHUB_ENV | |
| - name: Download Fluent service container | |
| run: | | |
| echo "Pulling Fluent image: ${{ env.FLUENT_DOCKER_IMAGE }}" | |
| docker pull ${{ env.FLUENT_DOCKER_IMAGE }} | |
| - name: Check out the geometry outputs | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: geometry-mesh-fluent-workflow-geometry-outputs-${{ matrix.ansys-release }} | |
| path: geometry-mesh-fluent/outputs | |
| - name: Run the Fluent meshing script | |
| env: | |
| FLUENT_IMAGE_TAG: v${{ matrix.ansys-release }}.0 | |
| run: | | |
| python geometry-mesh-fluent/wf_gmf_02_fluent_meshing.py | |
| - name: Store the outputs | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: geometry-mesh-fluent-workflow-fluent-mesh-outputs-${{ matrix.ansys-release }} | |
| path: | | |
| geometry-mesh-fluent/outputs/NACA_Airfoil_*.pmdb | |
| geometry-mesh-fluent/outputs/NACA_Airfoil_*.msh.h5 | |
| - name: Stop all containers (if any) | |
| run: | | |
| if [ -n "$(docker ps -a -q)" ]; then | |
| docker rm -f $(docker ps -a -q) | |
| fi | |
| - name: (DOCS) Download the docs artifacts | |
| uses: actions/download-artifact@v7 | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| with: | |
| name: geometry-mesh-fluent-docs-stage-geometry | |
| path: doc | |
| - name: (DOCS) Build the documentation (only on ${{ env.ANSYS_RELEASE_FOR_DOCS}}) | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| env: | |
| FLUENT_IMAGE_TAG: v${{ matrix.ansys-release }}.0 | |
| BUILD_DOCS_SCRIPT: 'geometry-mesh-fluent/wf_gmf_02_fluent_meshing.py' | |
| run: | | |
| cd doc | |
| find . -type f -exec sed -i 's|C:\\Users\\ansys\\actions-runner\\_work\\pyansys-workflows\\pyansys-workflows\\doc\\source\\examples\\geometry-mesh-fluent\\images\\|./images/|g' {} + | |
| pip install -r requirements.txt | |
| make html | |
| - name: (DOCS) Upload docs artifacts | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: geometry-mesh-fluent-docs-stage-mesh | |
| path: | | |
| doc/_build/ | |
| doc/source/examples/geometry-mesh-fluent/ | |
| overwrite: true | |
| fluent-solve: | |
| name: Fluent Solver | |
| runs-on: public-ubuntu-latest-8-cores # Potential memory issues with 24.1 otherwise | |
| needs: [fluent-mesh, is-only-docs-required] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # [24.1, 24.2, 25.1] -- HACK FOR FLUENT: 24.2 is in reality a 24.1 container, and 25.1 has issues with CAD import currently | |
| ansys-release: ${{ needs.is-only-docs-required.outputs.only-docs == 'true' && fromJSON('[24.1]') || fromJSON('[24.1]') }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| sparse-checkout: | | |
| geometry-mesh-fluent | |
| doc | |
| - name: Set up Python ${{ env.MAIN_PYTHON_VERSION }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r geometry-mesh-fluent/requirements_${{ matrix.ansys-release }}.txt | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Full Fluent image (name+tag) | |
| run: | | |
| if [[ "${{ matrix.ansys-release }}" == "24.1" || "${{ matrix.ansys-release }}" == "24.2" ]]; then | |
| IMAGE_TAG=v24.2.5 | |
| elif [[ "${{ matrix.ansys-release }}" == "25.1" ]]; then | |
| IMAGE_TAG=v25.1.4 | |
| else | |
| echo "Unsupported release: ${{ matrix.ansys-release }}" | |
| exit 1 | |
| fi | |
| echo "FLUENT_DOCKER_IMAGE=${{ env.FLUENT_DOCKER_IMAGE }}:${IMAGE_TAG}" >> $GITHUB_ENV | |
| - name: Download Fluent service container | |
| run: | | |
| echo "Pulling Fluent image: ${{ env.FLUENT_DOCKER_IMAGE }}" | |
| docker pull ${{ env.FLUENT_DOCKER_IMAGE }} | |
| - name: Check out the meshing outputs | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: geometry-mesh-fluent-workflow-fluent-mesh-outputs-${{ matrix.ansys-release }} | |
| path: geometry-mesh-fluent/outputs | |
| - name: Run the Fluent solver script | |
| env: | |
| FLUENT_IMAGE_TAG: v${{ matrix.ansys-release }}.0 | |
| run: | | |
| python geometry-mesh-fluent/wf_gmf_03_fluent_solver.py | |
| - name: Store the outputs | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: geometry-mesh-fluent-workflow-fluent-solve-outputs-${{ matrix.ansys-release }} | |
| path: | | |
| geometry-mesh-fluent/outputs/NACA_Airfoil_*.pmdb | |
| geometry-mesh-fluent/outputs/NACA_Airfoil_*.msh.h5 | |
| geometry-mesh-fluent/outputs/NACA_Airfoil_*.cas.h5 | |
| geometry-mesh-fluent/outputs/NACA_Airfoil_*.dat.h5 | |
| - name: Stop all containers (if any) | |
| run: | | |
| if [ -n "$(docker ps -a -q)" ]; then | |
| docker rm -f $(docker ps -a -q) | |
| fi | |
| - name: (DOCS) Download the docs artifacts | |
| uses: actions/download-artifact@v7 | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| with: | |
| name: geometry-mesh-fluent-docs-stage-mesh | |
| path: doc | |
| - name: (DOCS) Build the documentation (only on ${{ env.ANSYS_RELEASE_FOR_DOCS}}) | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| env: | |
| FLUENT_IMAGE_TAG: v${{ matrix.ansys-release }}.0 | |
| BUILD_DOCS_SCRIPT: 'geometry-mesh-fluent/wf_gmf_03_fluent_solver.py' | |
| run: | | |
| cd doc | |
| pip install -r requirements.txt | |
| make html | |
| - name: (DOCS) Upload docs artifacts | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: geometry-mesh-fluent-docs | |
| path: | | |
| doc/_build/ | |
| doc/source/examples/geometry-mesh-fluent/ | |
| overwrite: true |