1- # azure pipelines build and test pymapdl
1+ # azure pipelines build and test pydpf
22
33variables :
44 ALLOW_PLOTTING : true
@@ -8,7 +8,8 @@ variables:
88trigger :
99 branches :
1010 include :
11- - ' *'
11+ - ' master*'
12+ - ' release-*'
1213 exclude :
1314 - gh-pages
1415 tags :
2627- job : Windows
2728 variables :
2829 python.version : ' 3.8'
30+ ANSYS_VERSION : 221
2931 DISPLAY : ' :99.0'
3032 PYANSYS_OFF_SCREEN : True
3133 DPF_PORT : 32772
34+ vstsPackageVersion : ' 22.1.1'
3235 pool :
3336 vmImage : ' windows-2019'
3437
@@ -42,50 +45,39 @@ jobs:
4245 ArtifactName : ' ansys_dpf_core_wheel'
4346 enabled : true
4447
48+ - template : templates\kill-servers-windows.yml
49+
4550 - script : |
51+ cd $(System.DefaultWorkingDirectory)
4652 pip install -r requirements_test.txt
4753 displayName: Install Test Environment
48-
49- - script : |
50- set THISDIR=$(System.DefaultWorkingDirectory)
51- cd tests
52- set AWP_ROOT212=%THISDIR%\server\v212
53- pytest -v --junitxml=junit/test-results.xml --cov ansys.dpf.core --cov-report=xml --reruns 3
54-
55- displayName: Test Core API
56- timeoutInMinutes: 10
57-
58- - task : PublishTestResults@2
59- inputs :
60- testResultsFormat : ' JUnit'
61- testResultsFiles : ' tests/junit/test-results.xml'
62- testRunTitle : ' windowsTests'
63- publishRunAttachments : true
6454 condition: always()
6555
6656 - script : |
67- set THISDIR=$(System.DefaultWorkingDirectory)
6857 cd $(System.DefaultWorkingDirectory)
69- set AWP_ROOT212=%THISDIR%\server\v212
70- pytest --doctest-modules --junitxml=junit/test-doctests-results.xml ansys\dpf\core
58+ pytest --doctest-modules --junitxml=junit/test-doctests-results.xml ansys/dpf/core
7159 condition: always()
7260 displayName: Test API Docstrings
73- timeoutInMinutes: 5
61+ timeoutInMinutes: 15
7462
7563 - task : PublishTestResults@2
7664 inputs :
7765 testResultsFormat : ' JUnit'
78- testResultsFiles : ' junit/test-doctests-results.xml'
66+ testResultsFiles : ' $(System.DefaultWorkingDirectory)/ junit/test-doctests-results.xml'
7967 testRunTitle : ' docTestsTests'
8068 publishRunAttachments : true
8169 condition : always()
8270
83- - script : |
84- set THISDIR=$(System.DefaultWorkingDirectory)
85- set AWP_ROOT212=%THISDIR%\server\v212
86- python .ci/run_examples.py
87- displayName: 'Run example scripts'
88- timeoutInMinutes: 5
71+ - template : templates\kill-servers-windows.yml
72+
73+ - script : |
74+ @echo on
75+ cd $(System.DefaultWorkingDirectory)
76+ rmdir /s /q .\ansys\
77+ displayName: Remove local copy of ansys-dpf-core
78+ condition: always()
79+
80+ - template : templates\run-unit-tests-windows.yml
8981
9082 - script : |
9183 pip install twine
@@ -100,48 +92,55 @@ jobs:
10092
10193
10294 - script : |
103- type $(System.DefaultWorkingDirectory)\server\v212 \aisol\bin\winx64\log.txt
95+ type $(System.DefaultWorkingDirectory)\server\v$(ANSYS_VERSION) \aisol\bin\winx64\log.txt
10496 displayName: 'Show DPF Server Logs'
105- condition: always()
97+ condition: always()
98+ continueOnError: true
10699
107100 - template : templates\kill-servers-windows.yml
108-
101+
102+
103+ - job : WindowsAnsys2021R2
104+ variables :
105+ python.version : ' 3.8'
106+ ANSYS_VERSION : 212
107+ DISPLAY : ' :99.0'
108+ PYANSYS_OFF_SCREEN : True
109+ DPF_PORT : 32772
110+ vstsPackageVersion : ' 21.2.3'
111+ pool :
112+ vmImage : ' windows-2019'
113+
114+ steps :
115+ - template : templates\prepare-environment-windows.yml
116+
117+ - script : |
118+ pip install ansys-grpc-dpf==0.3.0
119+ displayName: Install proper version of ansys-grpc-dpf
120+
121+ - script : |
122+ rmdir /s /q .\ansys\
123+ displayName: Remove local copy of ansys-dpf-core
124+
125+ - template : templates\run-unit-tests-windows.yml
126+
109127
110128- job : Linux
111129 variables :
112130 python.version : ' 3.7' # due to VTK 8.1.2 requirement for docbuild
113- DISPLAY : ' :99.0 '
131+ ANSYS_VERSION : 221
114132 PYANSYS_OFF_SCREEN : True
115133 DPF_PORT : 50055
116134 TEMP : $(System.DefaultWorkingDirectory)/temp
117- AWP_ROOT212 : $(System.DefaultWorkingDirectory)/server/v212
118-
135+ AWP_ROOT221 : $(System.DefaultWorkingDirectory)/server/v221
136+ vstsPackageVersion : " 22.1.1 "
119137 pool :
120138 vmImage : ' ubuntu-20.04'
121139 steps :
122140 - template : templates\prepare-environment-linux.yml
123141
124- - script : |
125- pip install -r requirements_test.txt
126- pip install pytest-azurepipelines
127- export AWP_ROOT212=${SYSTEM_DEFAULTWORKINGDIRECTORY}/server/v212
128- cd tests
129- export DPF_IP=$(hostname -i)
130- xvfb-run pytest -v --junitxml=junit/test-results.xml --cov ansys.dpf.core --cov-report=xml --reruns 3
131- export PATH=`pwd`
132- echo ${PATH}
133- displayName: Test Core API
134-
135- - task : PublishTestResults@2
136- inputs :
137- testResultsFormat : ' JUnit'
138- testResultsFiles : ' junit/test-results.xml'
139- testRunTitle : ' linuxTests'
140- publishRunAttachments : true
141- searchFolder : ' tests/'
142- condition : always()
143-
144-
142+ - template : templates\run-unit-tests-linux.yml
143+
145144 - script : |
146145 echo $0
147146 if pgrep -x "Ans.Dpf.Grpc" > /dev/null
@@ -155,12 +154,13 @@ jobs:
155154 - job : DocumentationLinux
156155 variables :
157156 python.version : ' 3.7' # due to VTK 8.1.2 requirement for docbuild
157+ ANSYS_VERSION : 221
158158 PYANSYS_OFF_SCREEN : True
159159 DPF_PORT : 50055
160160 TEMP : $(System.DefaultWorkingDirectory)/temp
161- AWP_ROOT212 : $(System.DefaultWorkingDirectory)/server/v212
161+ AWP_ROOT221 : $(System.DefaultWorkingDirectory)/server/v$(ANSYS_VERSION)
162162 GH_DOC_BRANCH : ' gh-pages'
163-
163+ vstsPackageVersion : " 22.1.1 "
164164 pool :
165165 vmImage : ' ubuntu-20.04'
166166 steps :
@@ -174,6 +174,7 @@ jobs:
174174 sphinx-apidoc -o docs/source/api ansys ansys/dpf/core/aeneid.py -f --implicit-namespaces --separate --no-headings
175175 xvfb-run make -C docs html SPHINXOPTS="-w build_errors.txt -N"
176176 displayName: Build Documentation
177+ retryCountOnTaskFailure: 1 # Max number of retries; default is zero
177178
178179 - task : ArchiveFiles@2
179180 inputs :
@@ -183,13 +184,15 @@ jobs:
183184 archiveFile : ' $(System.DefaultWorkingDirectory)/docs/archive/doc-ansys-dpf-core.zip'
184185 replaceExistingArchive : true
185186 displayName : ' DOCUMENTATION: zip artifacts'
187+ condition : always()
186188
187189 - task : PublishBuildArtifacts@1
188190 displayName : ' DOCUMENTATION: publish artifacts'
189191 inputs :
190192 PathtoPublish : ' $(System.DefaultWorkingDirectory)/docs/archive'
191193 ArtifactName : doc-ansys-dpf-core
192- enabled : true
194+ enabled : true
195+ condition : always()
193196
194197 - powershell : |
195198 git init
0 commit comments