@@ -157,11 +157,11 @@ jobs:
157157 id : cache-api-code
158158 with :
159159 path : |
160- src/ansys/fluent/core/datamodel
161- src/ansys/fluent/core/fluent_version .py
162- src/ansys/fluent/core/meshing/tui .py
163- src/ansys/fluent/core/solver/settings
164- src/ansys/fluent/core/solver/tui .py
160+ src/ansys/fluent/core/datamodel_222
161+ src/ansys/fluent/core/fluent_version_222 .py
162+ src/ansys/fluent/core/meshing/tui_222 .py
163+ src/ansys/fluent/core/solver/settings_222
164+ src/ansys/fluent/core/solver/tui_222 .py
165165 doc/source/api/core/meshing/tui
166166 doc/source/api/core/meshing/datamodel
167167 doc/source/api/core/solver/tui
@@ -230,14 +230,10 @@ jobs:
230230 FOLDER : doc/_build/html
231231 CLEAN : true
232232
233- test :
233+ build- test :
234234 name : Unit Testing
235235 needs : test-import
236236 runs-on : ubuntu-latest
237- strategy :
238- fail-fast : false
239- matrix :
240- image-tag : [v22.2.0, v23.1.0]
241237
242238 steps :
243239 - uses : actions/checkout@v3
@@ -267,165 +263,103 @@ jobs:
267263 echo "PYFLUENT version is: $(python -c "from ansys.fluent.core import __version__; print(__version__)")"
268264 id : version
269265
270- - name : Cache API Code
266+ - name : Cache 22.2 API Code
271267 uses : actions/cache@v3
272- id : cache-api-code
268+ id : cache-222- api-code
273269 with :
274270 path :
275- src/ansys/fluent/core/datamodel
276- src/ansys/fluent/core/fluent_version .py
277- src/ansys/fluent/core/meshing/tui .py
278- src/ansys/fluent/core/solver/settings
279- src/ansys/fluent/core/solver/tui .py
271+ src/ansys/fluent/core/datamodel_222
272+ src/ansys/fluent/core/fluent_version_222 .py
273+ src/ansys/fluent/core/meshing/tui_222 .py
274+ src/ansys/fluent/core/solver/settings_222
275+ src/ansys/fluent/core/solver/tui_222 .py
280276 doc/source/api/core/meshing/tui
281277 doc/source/api/core/meshing/datamodel
282278 doc/source/api/core/solver/tui
283279 doc/source/api/core/solver/datamodel
284- key : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ matrix.image-tag }} -${{ hashFiles('codegen/**') }}
285- restore-keys : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ matrix.image-tag }}
280+ key : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v22.2.0 -${{ hashFiles('codegen/**') }}
281+ restore-keys : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v22.2.0
286282
287283 - name : Login to GitHub Container Registry
288- if : steps.cache-api-code.outputs.cache-hit != 'true'
289284 uses : docker/login-action@v2
290285 with :
291286 registry : ghcr.io
292287 username : ${{ secrets.GH_USERNAME }}
293288 password : ${{ secrets.REPO_DOWNLOAD_PAT }}
294289
295- - name : Pull Fluent docker image
296- if : steps.cache-api-code.outputs.cache-hit != 'true'
290+ - name : Pull 22.2 Fluent docker image
291+ if : steps.cache-222- api-code.outputs.cache-hit != 'true'
297292 run : make docker-pull
298293 env :
299- FLUENT_IMAGE_TAG : ${{ matrix.image-tag }}
294+ FLUENT_IMAGE_TAG : v22.2.0
300295
301- - name : Run API codegen
302- if : steps.cache-api-code.outputs.cache-hit != 'true'
296+ - name : Run 22.2 API codegen
297+ if : steps.cache-222- api-code.outputs.cache-hit != 'true'
303298 run : make api-codegen
304299 env :
305300 ANSYSLMD_LICENSE_FILE : ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
306301 PYFLUENT_START_INSTANCE : 0
307302 PYFLUENT_LAUNCH_CONTAINER : 1
308- FLUENT_IMAGE_TAG : ${{ matrix.image-tag }}
309-
310- - name : Install again after codegen
311- run : |
312- rm -rf dist
313- make install > /dev/null
314-
315- - name : Unit Testing
316- run : make unittest
317- env :
318- ANSYSLMD_LICENSE_FILE : ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
319- PYFLUENT_START_INSTANCE : 0
320- FLUENT_IMAGE_TAG : ${{ matrix.image-tag }}
321-
322- - name : Upload Coverage Results
323- if : matrix.image-tag == 'v22.2.0'
324- uses : actions/upload-artifact@v3
325- with :
326- name : HTML-Coverage-tag-${{ matrix.image-tag }}
327- path : cov_html
328- retention-days : 7
329-
330- - name : Check package
331- if : github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/v')
332- run : |
333- pip install twine
334- twine check dist/*
335-
336- - name : Upload package
337- if : github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/v')
338- uses : actions/upload-artifact@v3
339- with :
340- name : PyFluent-packages
341- path : |
342- dist/*.whl
343- dist/*.tar.gz
344- retention-days : 7
345-
346- build :
347- name : Build for release
348- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
349- needs : test-import
350- runs-on : ubuntu-latest
351- strategy :
352- fail-fast : false
353- matrix :
354- image-tag : [v22.2.0]
355-
356- steps :
357- - uses : actions/checkout@v3
358-
359- - name : Setup Python
360- uses : actions/setup-python@v4
361- with :
362- python-version : 3.9
303+ FLUENT_IMAGE_TAG : v22.2.0
363304
364- - name : Cache pip
305+ - name : Cache 23.1 API Code
365306 uses : actions/cache@v3
366- with :
367- path : ~/.cache/pip
368- key : Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements/requirements_*.txt') }}
369- restore-keys : |
370- Python-${{ runner.os }}-${{ matrix.python-version }}
371-
372- - name : Add version information
373- run : make version-info
374-
375- - name : Install pyfluent
376- run : make install
377-
378- - name : Retrieve PyFluent version
379- run : |
380- echo "::set-output name=PYFLUENT_VERSION::$(python -c "from ansys.fluent.core import __version__; print(__version__)")"
381- echo "PYFLUENT version is: $(python -c "from ansys.fluent.core import __version__; print(__version__)")"
382- id : version
383-
384- - name : Cache API Code
385- uses : actions/cache@v3
386- id : cache-api-code
307+ id : cache-231-api-code
387308 with :
388309 path :
389- src/ansys/fluent/core/datamodel
390- src/ansys/fluent/core/fluent_version .py
391- src/ansys/fluent/core/meshing/tui .py
392- src/ansys/fluent/core/solver/settings
393- src/ansys/fluent/core/solver/tui .py
310+ src/ansys/fluent/core/datamodel_231
311+ src/ansys/fluent/core/fluent_version_231 .py
312+ src/ansys/fluent/core/meshing/tui_231 .py
313+ src/ansys/fluent/core/solver/settings_231
314+ src/ansys/fluent/core/solver/tui_231 .py
394315 doc/source/api/core/meshing/tui
395316 doc/source/api/core/meshing/datamodel
396317 doc/source/api/core/solver/tui
397318 doc/source/api/core/solver/datamodel
398- key : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ matrix.image-tag }}-${{ hashFiles('codegen/**') }}
399- restore-keys : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ matrix.image-tag }}
400-
401- - name : Login to GitHub Container Registry
402- if : steps.cache-api-code.outputs.cache-hit != 'true'
403- uses : docker/login-action@v2
404- with :
405- registry : ghcr.io
406- username : ${{ secrets.GH_USERNAME }}
407- password : ${{ secrets.REPO_DOWNLOAD_PAT }}
319+ key : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.1.0-${{ hashFiles('codegen/**') }}
320+ restore-keys : API-Code-v${{ env.API_CODE_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-v23.1.0
408321
409- - name : Pull Fluent docker image
410- if : steps.cache-api-code.outputs.cache-hit != 'true'
322+ - name : Pull 23.1 Fluent docker image
323+ if : steps.cache-231- api-code.outputs.cache-hit != 'true'
411324 run : make docker-pull
412325 env :
413- FLUENT_IMAGE_TAG : ${{ matrix.image-tag }}
326+ FLUENT_IMAGE_TAG : v23.1.0
414327
415- - name : Run API codegen
416- if : steps.cache-api-code.outputs.cache-hit != 'true'
328+ - name : Run 23.1 API codegen
329+ if : steps.cache-231- api-code.outputs.cache-hit != 'true'
417330 run : make api-codegen
418331 env :
419332 ANSYSLMD_LICENSE_FILE : ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
420333 PYFLUENT_START_INSTANCE : 0
421334 PYFLUENT_LAUNCH_CONTAINER : 1
422- FLUENT_IMAGE_TAG : ${{ matrix.image-tag }}
335+ FLUENT_IMAGE_TAG : v23.1.0
423336
424337 - name : Install again after codegen
425338 run : |
426339 rm -rf dist
427340 make install > /dev/null
428341
342+ - name : 22.2 Unit Testing
343+ run : make unittest
344+ env :
345+ ANSYSLMD_LICENSE_FILE : ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
346+ PYFLUENT_START_INSTANCE : 0
347+ FLUENT_IMAGE_TAG : v22.2.0
348+
349+ - name : Upload Coverage Results
350+ uses : actions/upload-artifact@v3
351+ with :
352+ name : HTML-Coverage-tag-222
353+ path : cov_html
354+ retention-days : 7
355+
356+ - name : 23.1 Unit Testing
357+ run : make unittest
358+ env :
359+ ANSYSLMD_LICENSE_FILE : ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
360+ PYFLUENT_START_INSTANCE : 0
361+ FLUENT_IMAGE_TAG : v23.1.0
362+
429363 - name : Check package
430364 run : |
431365 pip install twine
@@ -443,7 +377,7 @@ jobs:
443377 release :
444378 name : Release
445379 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
446- needs : [test, build]
380+ needs : build-test
447381 runs-on : ubuntu-latest
448382 steps :
449383 - name : Set up Python
0 commit comments