3333 vmImage : ' windows-2019'
3434
3535 steps :
36- - template : templates\prepare-environment-windows.yml
36+ - template : templates\prepare-environment-windows.yml
3737
3838 - task : PublishBuildArtifacts@1
3939 displayName : ' WHEEL: publish artifacts'
@@ -114,80 +114,20 @@ jobs:
114114 PYANSYS_OFF_SCREEN : True
115115 DPF_PORT : 50055
116116 TEMP : $(System.DefaultWorkingDirectory)/temp
117+ AWP_ROOT212 : $(System.DefaultWorkingDirectory)/server/v212
117118
118119 pool :
119120 vmImage : ' ubuntu-20.04'
120121 steps :
121- - task : UsePythonVersion@0
122- inputs :
123- versionSpec : ' $(python.version)'
124- displayName : ' Use Python $(python.version)'
125-
126- - task : PipAuthenticate@1
127- inputs :
128- artifactFeeds : ' pyansys'
129- onlyAddExtraIndex : true
130-
131- - script : |
132- .ci/setup_headless_display.sh
133- pip install -r .ci/requirements_test_xvfb.txt
134- python .ci/display_test.py
135- displayName: Install and start a virtual framebuffer
136-
137- - script : |
138- pip install -r requirements_build.txt
139- python setup.py bdist_wheel
140- export WHEELNAME=`ls dist/*.whl`
141- echo ${WHEELNAME}
142- pip install ${WHEELNAME}
143- cd tests
144- python -c "from ansys.dpf import core; print(core.Report())"
145- displayName: Install ansys-dpf-core
122+ - template : templates\prepare-environment-linux.yml
146123
147- - task : UniversalPackages@0
148- inputs :
149- command : ' download'
150- downloadDirectory : ' $(System.DefaultWorkingDirectory)'
151- feedsToUse : ' internal'
152- vstsFeed : ' 705e121a-9631-49f5-8aaf-c7142856f923'
153- vstsFeedPackage : ' dpf-linux' # TODO: update hash of packages
154- vstsPackageVersion : ' 21.2.5'
155-
156- - script : |
157- echo $0
158- if pgrep -x "Ans.Dpf.Grpc" > /dev/null
159- then
160- pkill -f Ans.Dpf.Grpc.exe
161- fi
162- displayName: 'Kill all servers'
163- condition: always()
164- continueOnError: true
165-
166- - script : |
167- env
168- displayName: Display env
169-
170- - script : |
171- echo $0
172- export THISDIR=${SYSTEM_DEFAULTWORKINGDIRECTORY}
173- echo ${THISDIR}
174- export AWP_ROOT212=${THISDIR}/server/v212
175- cd ${THISDIR}/server/v212/aisol/bin/linx64
176- pwd
177- chmod 755 Ans.Dpf.Grpc.sh
178- chmod 755 Ans.Dpf.Grpc.exe
179- ./Ans.Dpf.Grpc.sh --port 50054 & > log.txt
180- export DPF_IP=$(hostname -i)
181- python -c "from ansys.dpf import core; core.connect_to_server(ip= '${DPF_IP}', port=50054); print('Python Connected')"
182- displayName: Start DPF Server
183-
184124 - script : |
185125 pip install -r requirements_test.txt
186126 pip install pytest-azurepipelines
187127 export AWP_ROOT212=${SYSTEM_DEFAULTWORKINGDIRECTORY}/server/v212
188128 cd tests
189129 export DPF_IP=$(hostname -i)
190- pytest -v --junitxml=junit/test-results.xml --cov ansys.dpf.core --cov-report=xml --reruns 3
130+ xvfb-run pytest -v --junitxml=junit/test-results.xml --cov ansys.dpf.core --cov-report=xml --reruns 3
191131 export PATH=`pwd`
192132 echo ${PATH}
193133 displayName: Test Core API
@@ -212,46 +152,45 @@ jobs:
212152 condition: always()
213153 continueOnError: true
214154
215-
216- - job : DocumentationWindows
155+ - job : DocumentationLinux
217156 variables :
218- python.version : ' 3.8'
219- DISPLAY : ' :99.0'
157+ python.version : ' 3.7' # due to VTK 8.1.2 requirement for docbuild
220158 PYANSYS_OFF_SCREEN : True
221- DPF_PORT : 32772
159+ DPF_PORT : 50055
160+ TEMP : $(System.DefaultWorkingDirectory)/temp
161+ AWP_ROOT212 : $(System.DefaultWorkingDirectory)/server/v212
222162 GH_DOC_BRANCH : ' gh-pages'
163+
223164 pool :
224- vmImage : ' windows-2019'
165+ vmImage : ' ubuntu-20.04'
166+ steps :
167+ - template : templates\prepare-environment-linux.yml
225168
226- steps :
227- - template : templates\prepare-environment-windows.yml
228-
229169 - script : |
230- pip install -r requirements_docs.txt
231- cd .ci
232- dir
233- set THISDIR=$(System.DefaultWorkingDirectory)
234- set AWP_ROOT212=%THISDIR%\server\v212
235- ECHO %AWP_ROOT212%
236- build_doc.bat
170+ pip install -r requirements_docs.txt
171+ displayName: Install documentation packages for Python
172+
173+ - script : |
174+ sphinx-apidoc -o docs/source/api ansys ansys/dpf/core/aeneid.py -f --implicit-namespaces --separate --no-headings
175+ xvfb-run make -C docs html SPHINXOPTS="-w build_errors.txt -N"
237176 displayName: Build Documentation
238-
177+
239178 - task : ArchiveFiles@2
240179 inputs :
241- rootFolderOrFile : ' $(System.DefaultWorkingDirectory)\ docs\ build'
180+ rootFolderOrFile : ' $(System.DefaultWorkingDirectory)/ docs/ build'
242181 includeRootFolder : false
243182 archiveType : ' zip'
244- archiveFile : ' $(System.DefaultWorkingDirectory)\ docs\ archive\ doc-ansys-dpf-core.zip'
183+ archiveFile : ' $(System.DefaultWorkingDirectory)/ docs/ archive/ doc-ansys-dpf-core.zip'
245184 replaceExistingArchive : true
246185 displayName : ' DOCUMENTATION: zip artifacts'
247186
248187 - task : PublishBuildArtifacts@1
249188 displayName : ' DOCUMENTATION: publish artifacts'
250189 inputs :
251- PathtoPublish : ' $(System.DefaultWorkingDirectory)\ docs\ archive'
190+ PathtoPublish : ' $(System.DefaultWorkingDirectory)/ docs/ archive'
252191 ArtifactName : doc-ansys-dpf-core
253- enabled : true
254-
192+ enabled : true
193+
255194 - powershell : |
256195 git init
257196 git checkout -b $(GH_DOC_BRANCH)
@@ -261,15 +200,21 @@ jobs:
261200 git add .
262201 git commit -m "Documentation generated by $(Build.DefinitionName)"
263202 displayName: "Init git and add docs"
264- workingDirectory: docs\ build\ html
203+ workingDirectory: docs/ build/ html
265204
266205 - script : |
267206 git remote add origin https://$(GH_PAT)@github.com/pyansys/DPF-Core-docs
268207 git push -u origin $(GH_DOC_BRANCH) --force
269208 displayName: "Publish GitHub Pages merge commit"
270- workingDirectory: docs\ build\ html
209+ workingDirectory: docs/ build/ html
271210 condition: contains(variables['Build.SourceBranch'], 'refs/tags/')
272-
273- - template : templates\kill-servers-windows.yml
274-
275-
211+
212+ - script : |
213+ echo $0
214+ if pgrep -x "Ans.Dpf.Grpc" > /dev/null
215+ then
216+ pkill -f Ans.Dpf.Grpc.exe
217+ fi
218+ displayName: 'Kill all servers'
219+ condition: always()
220+ continueOnError: true
0 commit comments