22
33on :
44 pull_request :
5- types : [opened, synchronize, reopened, ready_for_review]
5+ types : [opened, synchronize, reopened, ready_for_review, closed ]
66 branches-ignore :
77 - ' *no-ci*'
88 push :
1414 description : " ANSYS version"
1515 required : false
1616 type : string
17- default : " 252"
1817 standalone_branch_suffix :
1918 description : ' Suffix of the branch on standalone'
2019 required : false
@@ -27,11 +26,12 @@ concurrency:
2726
2827env :
2928 DOCUMENTATION_CNAME : ' dpf.docs.pyansys.com'
30- MAIN_PYTHON_VERSION : ' 3.9 '
29+ MAIN_PYTHON_VERSION : ' 3.10 '
3130
3231jobs :
3332 debug :
3433 runs-on : ubuntu-latest
34+ if : github.event.action != 'closed'
3535 steps :
3636 - name : Show the Github context for the triggered event
3737 run : echo "$GITHUB_CONTEXT"
4040
4141 pick_server_suffix :
4242 runs-on : ubuntu-latest
43+ if : github.event.action != 'closed'
4344 outputs :
4445 suffix : ${{ steps.step1.outputs.suffix }}
4546 steps :
7071 style :
7172 name : " Style Check"
7273 runs-on : ubuntu-latest
74+ if : github.event.action != 'closed'
7375 steps :
7476 - uses : ansys/actions/code-style@v8
7577 with :
7880 build_linux1 :
7981 name : " Build linux1 wheel"
8082 runs-on : ubuntu-latest
83+ if : github.event.action != 'closed'
8184 steps :
8285 - uses : actions/checkout@v4
8386
@@ -101,62 +104,76 @@ jobs:
101104 name : ${{ steps.wheel.outputs.wheel_name }}
102105 path : dist/${{ steps.wheel.outputs.wheel_name }}
103106
104- tests :
107+ tests-latest :
108+ name : " Test ${{ matrix.test-any == 'true' && 'any' || 'platform-specific' }} wheel against latest DPF version"
109+ strategy :
110+ fail-fast : false
111+ matrix :
112+ test-any : ['false', 'true']
105113 uses : ./.github/workflows/tests.yml
114+ if : github.event.action != 'closed'
106115 needs : pick_server_suffix
107116 with :
108- ANSYS_VERSION : ${{ github.event. inputs.ansys_version || '252' }}
109- python_versions : ' ["3.9 "]'
117+ ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
118+ python_versions : ' ["3.10 "]'
110119 wheel : true
111120 wheelhouse : false
112121 standalone_suffix : ${{needs.pick_server_suffix.outputs.suffix}}
113- secrets : inherit
114-
115- tests_any :
116- uses : ./.github/workflows/tests.yml
117- needs : pick_server_suffix
118- with :
119- ANSYS_VERSION : ${{ github.event.inputs.ansys_version || '252' }}
120- python_versions : ' ["3.9"]'
121- wheel : true
122- wheelhouse : false
123- standalone_suffix : ${{needs.pick_server_suffix.outputs.suffix}}
124- test_any : true
122+ test_any : ${{ matrix.test-any }}
123+ DOCSTRING : ${{ !matrix.test-any }}
125124 secrets : inherit
126125
127126 docker_tests :
128127 name : " Build and Test on Docker"
129128 uses : ./.github/workflows/test_docker.yml
129+ if : github.event.action != 'closed'
130130 needs : pick_server_suffix
131131 with :
132- ANSYS_VERSION : ${{ github.event. inputs.ansys_version || '252' }}
132+ ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
133133 standalone_suffix : ${{needs.pick_server_suffix.outputs.suffix}}
134134 secrets : inherit
135135
136136 docker_examples :
137137 name : " Run examples on Docker"
138138 uses : ./.github/workflows/examples_docker.yml
139+ if : github.event.action != 'closed'
139140 needs : pick_server_suffix
140141 with :
141- ANSYS_VERSION : ${{ github.event. inputs.ansys_version || '252' }}
142- python_versions : ' ["3.9 "]'
142+ ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
143+ python_versions : ' ["3.10 "]'
143144 standalone_suffix : ${{needs.pick_server_suffix.outputs.suffix}}
144145 secrets : inherit
145146
146147 docs :
147- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
148+ if : github.event.action != 'closed' && ( startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
148149 uses : ./.github/workflows/docs.yml
149150 needs : pick_server_suffix
150151 with :
151- ANSYS_VERSION : ${{ github.event. inputs.ansys_version || '252' }}
152+ ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
152153 standalone_suffix : ${{needs.pick_server_suffix.outputs.suffix}}
153154 event_name : ${{ github.event_name }}
154155 python_version : " 3.11"
155156 secrets : inherit
156157
158+ doc-deploy-pr :
159+ name : " Deploy PR documentation"
160+ runs-on : ubuntu-latest
161+ needs : docs
162+ if : always() && (needs.docs.result == 'success' || needs.docs.result == 'skipped')
163+ steps :
164+ - uses : ansys/actions/doc-deploy-pr@v10
165+ with :
166+ cname : ${{ env.DOCUMENTATION_CNAME }}
167+ token : ${{ secrets.GITHUB_TOKEN }}
168+ doc-artifact-name : HTML-doc-ansys-dpf-core.zip
169+ decompress-artifact : true
170+ bot-user : ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
171+ bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
172+ maximum-pr-doc-deployments : 10
173+
157174 upload-development-docs :
158175 runs-on : ubuntu-latest
159- if : ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
176+ if : ${{ github.event.action != 'closed' && (github. ref == 'refs/heads/master' && github.event_name == 'push') }}
160177 needs : [docs]
161178 steps :
162179 - name : " Upload development documentation"
@@ -170,87 +187,45 @@ jobs:
170187 bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
171188
172189 examples :
173- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
190+ if : github.event.action != 'closed' && ( startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
174191 uses : ./.github/workflows/examples.yml
175192 needs : pick_server_suffix
176193 with :
177- ANSYS_VERSION : ${{ github.event. inputs.ansys_version || '252' }}
178- python_versions : ' ["3.9 "]'
194+ ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
195+ python_versions : ' ["3.10 "]'
179196 standalone_suffix : ${{needs.pick_server_suffix.outputs.suffix}}
180197 secrets : inherit
181198
182- retro_251 :
183- name : " retro 251"
184- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
185- uses : ./.github/workflows/tests.yml
186- with :
187- ANSYS_VERSION : " 251"
188- python_versions : ' ["3.9"]'
189- DOCSTRING : false
190- standalone_suffix : ' '
191- secrets : inherit
192-
193- retro_242 :
194- name : " retro 242"
195- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
196- uses : ./.github/workflows/tests.yml
197- with :
198- ANSYS_VERSION : " 242"
199- python_versions : ' ["3.9"]'
200- DOCSTRING : false
201- standalone_suffix : ' '
202- secrets : inherit
203-
204- retro_241 :
205- name : " retro 241"
206- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
207- uses : ./.github/workflows/tests.yml
208- with :
209- ANSYS_VERSION : " 241"
210- python_versions : ' ["3.9"]'
211- DOCSTRING : false
212- standalone_suffix : ' .sp01'
213- secrets : inherit
214-
215- retro_232 :
216- name : " retro 232"
217- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
218- uses : ./.github/workflows/tests.yml
219- with :
220- ANSYS_VERSION : " 232"
221- python_versions : ' ["3.9"]'
222- DOCSTRING : false
223- standalone_suffix : ' '
224- secrets : inherit
225-
226- retro_231 :
227- name : " retro 231"
228- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
229- uses : ./.github/workflows/tests.yml
230- with :
231- ANSYS_VERSION : " 231"
232- python_versions : ' ["3.9"]'
233- DOCSTRING : false
234- secrets : inherit
235-
236- retro_222 :
237- name : " retro 222"
238- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
239- uses : ./.github/workflows/tests.yml
240- with :
241- ANSYS_VERSION : " 222"
242- python_versions : ' ["3.9"]'
243- DOCSTRING : false
244- secrets : inherit
245-
246199 pydpf-post :
247200 name : " PyDPF-Post"
248- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
201+ if : github.event.action != 'closed' && ( startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
249202 uses : ./.github/workflows/pydpf-post.yml
250203 needs : pick_server_suffix
251204 with :
252- ANSYS_VERSION : ${{ github.event. inputs.ansys_version || '252' }}
205+ ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
253206 post_branch : " master"
254207 standalone_suffix : ${{needs.pick_server_suffix.outputs.suffix}}
255208 test_docstrings : " true"
256209 secrets : inherit
210+
211+ tests-retro :
212+ name : " Test DPF ${{ matrix.dpf.version }} compatibility"
213+ if : github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
214+ strategy :
215+ fail-fast : false
216+ matrix :
217+ dpf :
218+ - {"version": "252", "standalone-suffix": ""}
219+ - {"version": "251", "standalone-suffix": ""}
220+ - {"version": "242", "standalone-suffix": ""}
221+ - {"version": "241", "standalone-suffix": ".sp01"}
222+ - {"version": "232", "standalone-suffix": ""}
223+ - {"version": "231", "standalone-suffix": ""}
224+ - {"version": "222", "standalone-suffix": ""}
225+ uses : ./.github/workflows/tests.yml
226+ with :
227+ ANSYS_VERSION : ${{ matrix.dpf.version }}
228+ python_versions : ' ["3.10"]'
229+ DOCSTRING : false
230+ standalone_suffix : ${{ matrix.dpf.standalone-suffix }}
231+ secrets : inherit
0 commit comments