3131 ANSYSLMD_LICENSE_FILE : ${{ format('1055@{0}', secrets.LICENSE_SERVER )}}
3232 PYANSYS_WORKFLOWS_CI : true
3333 ANSYS_RELEASE_FOR_DOCS : 25.1
34+ ANSYS_DPF_ACCEPT_LA : ' Y'
3435
3536jobs :
3637
@@ -130,8 +131,8 @@ jobs:
130131 docker rm -f $dockerContainers
131132 }
132133
133- mech-dpf :
134- name : Mechanical - Dpf
134+ mechanical :
135+ name : Mechanical
135136 runs-on : public-ubuntu-latest-8-cores
136137 needs : [geometry, is-only-docs-required]
137138 strategy :
@@ -183,20 +184,13 @@ jobs:
183184 xvfb-run mechanical-env python geometry-mechanical-dpf/wf_gmd_02_mechanical.py > pymechlogs${{ matrix.ansys-release }}.txt 2>&1 || true
184185 cat pymechlogs${{ matrix.ansys-release }}.txt
185186
186- - name : Run the PyDPF script
187- env :
188- ANSYS_DPF_ACCEPT_LA : ' Y'
189- run : |
190- . /.venv/bin/activate
191- xvfb-run mechanical-env python geometry-mechanical-dpf/wf_gmd_03_dpf.py > pydpflogs${{ matrix.ansys-release }}.txt 2>&1 || true
192- cat pydpflogs${{ matrix.ansys-release }}.txt
193-
194187 - name : Store the outputs
195188 uses : actions/upload-artifact@v4
196189 with :
197190 name : geometry-mechanical-dpf-workflow-mechanical-dpf-outputs-${{ matrix.ansys-release }}
198- path : geometry-mechanical-dpf/outputs
199-
191+ path : |
192+ geometry-mechanical-dpf/outputs/
193+ geometry-mechanical-dpf/outputs/**/*
200194 - name : (DOCS) Download the docs artifacts
201195 uses : actions/download-artifact@v5
202196 if : needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
@@ -218,6 +212,90 @@ jobs:
218212 uv pip install -r ./doc/requirements.txt
219213 xvfb-run mechanical-env make -C doc html > pymech-docs-logs${{ matrix.ansys-release }}.txt 2>&1 || true
220214 cat pymech-docs-logs${{ matrix.ansys-release }}.txt
215+ - name : (DOCS) Adapt the documentation paths
216+ if : needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
217+ run : |
218+ find . -type f -exec sed -i 's|/__w/pyansys-workflows/pyansys-workflows/doc/source/examples/geometry-mechanical-dpf/images|./images/|g' {} +
219+
220+ - name : (DOCS) Upload docs artifacts
221+ if : needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
222+ uses : actions/upload-artifact@v4
223+ with :
224+ name : geometry-mechanical-dpf-docs-stage-mechanical
225+ path : |
226+ outputs/
227+ doc/_build/
228+ doc/source/examples/geometry-mechanical-dpf/
229+ overwrite : true
230+
231+ dpf :
232+ name : Mechanical - Dpf
233+ runs-on : public-ubuntu-latest-8-cores
234+ needs : [geometry, is-only-docs-required]
235+ strategy :
236+ fail-fast : false
237+ matrix :
238+ ansys-release : ${{ needs.is-only-docs-required.outputs.only-docs == 'true' && fromJSON('[25.1]') || fromJSON('[24.1, 24.2, 25.1]') }}
239+ steps :
240+
241+ - name : Checkout code
242+ 243+ with :
244+ sparse-checkout : |
245+ geometry-mechanical-dpf
246+ doc
247+
248+ - name : " Set up Python and activate virtual environment"
249+ shell : bash
250+ run : |
251+ apt update
252+ apt install lsb-release xvfb git curl make -y
253+ curl -LsSf https://astral.sh/uv/install.sh | sh
254+ export PATH="$HOME/.local/bin:$PATH"
255+ uv python install python${{ env.MAIN_PYTHON_VERSION }}
256+ uv venv /.venv
257+
258+ - name : Install dependencies
259+ run : |
260+ . /.venv/bin/activate
261+ uv pip install --upgrade pip
262+ uv pip install -r geometry-mechanical-dpf/requirements_${{ matrix.ansys-release }}.txt
263+
264+ - name : Check out the mechanical outputs
265+ uses : actions/download-artifact@v5
266+ with :
267+ name : geometry-mechanical-dpf-workflow-mechanical-dpf-outputs-${{ matrix.ansys-release }}
268+ path : geometry-mechanical-dpf/outputs
269+
270+ - name : Set numeric ANSYS version
271+ run : echo "ANSYS_VERSION=${{ matrix.ansys-release }}" | tr -d '.' >> $GITHUB_ENV
272+
273+ - name : " Install DPF"
274+ id : set-server-path
275+ uses :
ansys/pydpf-actions/[email protected] 276+ with :
277+ dpf-standalone-TOKEN : ${{secrets.PYANSYS_CI_BOT_TOKEN}}
278+ ANSYS_VERSION : ${{ env.ANSYS_VERSION }}
279+
280+ - name : " Check licences of packages"
281+ uses :
ansys/pydpf-actions/[email protected] 282+ - name : Run the PyDPF script
283+ run : |
284+ . /.venv/bin/activate
285+ python geometry-mechanical-dpf/wf_gmd_02_mechanical.py
286+
287+ - name : Store the outputs
288+ uses : actions/upload-artifact@v4
289+ with :
290+ name : geometry-mechanical-dpf-workflow-mechanical-dpf-outputs-${{ matrix.ansys-release }}
291+ path : geometry-mechanical-dpf/outputs
292+
293+ - name : (DOCS) Download the docs artifacts
294+ uses : actions/download-artifact@v5
295+ if : needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
296+ with :
297+ name : geometry-mechanical-dpf-docs-stage-mechanical
298+ path : doc
221299
222300 - name : (DOCS) Build the documentation for the DPF script (only on ${{ env.ANSYS_RELEASE_FOR_DOCS }})
223301 if : needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
@@ -226,8 +304,7 @@ jobs:
226304 run : |
227305 . /.venv/bin/activate
228306 uv pip install -r ./doc/requirements.txt
229- xvfb-run make -C doc html > dpf-docs-logs${{ matrix.ansys-release }}.txt 2>&1 || true
230- cat dpf-docs-logs${{ matrix.ansys-release }}.txt
307+ xvfb-run make -C doc html
231308
232309 - name : (DOCS) Adapt the documentation paths
233310 if : needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
0 commit comments