@@ -73,34 +73,16 @@ jobs:
7373 with :
7474 python-version : ${{ inputs.python_version }}
7575
76- - name : " Create virtual environment in the current workspace"
77- shell : pwsh
78- run : python -m venv .venv --system-site-packages
79-
80- - name : " Update PATH for virtual environment"
81- run : |
82- echo "${{ github.workspace }}\.venv\Scripts" >> $env:GITHUB_PATH
83-
84- - name : " Update pip to the latest version"
76+ - name : " Update pip to the latest version and install tox"
8577 shell : pwsh
8678 run : |
8779 python -m pip install -U pip
88-
89- - name : " Install requirements"
90- shell : pwsh
91- run : |
92- python -m pip install -r requirements/requirements_build.txt
80+ python -m pip install tox tox-uv
9381
9482 - name : " Build the wheel"
9583 shell : pwsh
9684 run : |
97- $os = "${{ matrix.os }}"
98- if ($os -eq "ubuntu-latest") {
99- $platform = "manylinux_2_17"
100- } else {
101- $platform = "win"
102- }
103- python .ci/build_wheel.py -p $platform -w
85+ tox -e build-wheel
10486
10587 - name : " Expose the wheel"
10688 shell : bash
@@ -111,11 +93,6 @@ jobs:
11193 echo ${name}
11294 echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT
11395
114- - name : " Install package wheel"
115- shell : pwsh
116- run : |
117- python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}[plotting]
118-
11996 - name : " Install DPF"
12097 id : set-server-path
12198 uses :
ansys/pydpf-actions/[email protected] @@ -128,9 +105,9 @@ jobs:
128105 uses :
ansys/pydpf-actions/[email protected] 129106
130107 - name : " Test import"
131- shell : pwsh
132- working-directory : tests
108+ shell : bash
133109 run : |
110+ python -m pip install dist/${{ steps.wheel.outputs.wheel_name }}
134111 python -c "from ansys.dpf import core"
135112
136113 - name : " Setup headless display"
@@ -143,53 +120,10 @@ jobs:
143120 run : |
144121 choco install pandoc
145122
146- - name : " Install documentation packages for Python"
147- shell : pwsh
148- run : |
149- python -m pip install -r requirements/requirements_docs.txt
150-
151- - name : " Kill all servers"
152- uses :
ansys/pydpf-actions/[email protected] 153-
154- - name : " Ensure VTK compatibility"
155- shell : pwsh
156- run : |
157- python -m pip uninstall --yes vtk
158- python -m pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==${{ env.VTK_OSMESA_VERSION }}
159-
160- - name : " List installed packages"
161- shell : pwsh
162- run : |
163- python -m pip list
164-
165123 - name : " Build HTML Documentation"
166- shell : cmd /D /E:ON /V:OFF /C "CALL "{0}""
167- working-directory : .ci
168- run : |
169- build_doc.bat > ..\doc\log.txt && type ..\doc\log.txt 2>&1
170- timeout-minutes : 60
171- env :
172- MEILISEARCH_PUBLIC_API_KEY : ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
173-
174- - name : " Check for success"
175124 shell : bash
176- working-directory : doc
177125 run : |
178- case `grep -F "build succeeded" log.txt >/dev/null; echo $?` in
179- 0)
180- echo "Build succeeded!"
181- exit 0;;
182- 1)
183- echo "Documentation generation failed, please check previous step!"
184- exit 1;;
185- *)
186- echo "An error occurred while checking success of the previous step!"
187- exit 1;;
188- esac
189-
190- - name : " Kill all servers"
191- uses :
ansys/pydpf-actions/[email protected] 192- if : always()
126+ tox -e doc-html --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:doc-html.setenv+='VIRTUALENV_SYSTEM_SITE_PACKAGES=true'
193127
194128 - name : " Retrieve package version"
195129 shell : bash
0 commit comments