diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b6320e4d06..3d16eb0b598 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,7 +100,12 @@ jobs: name: ${{ steps.wheel.outputs.wheel_name }} path: dist/${{ steps.wheel.outputs.wheel_name }} - tests: + tests-latest: + name: "Test ${{ matrix.test-any == 'true' && 'any' || 'platform-specific' }} wheel against latest DPF version" + strategy: + fail-fast: false + matrix: + test-any: ['false', 'true'] uses: ./.github/workflows/tests.yml needs: pick_server_suffix with: @@ -109,18 +114,8 @@ jobs: wheel: true wheelhouse: false standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}} - secrets: inherit - - tests_any: - uses: ./.github/workflows/tests.yml - needs: pick_server_suffix - with: - ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }} - python_versions: '["3.10"]' - wheel: true - wheelhouse: false - standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}} - test_any: true + test_any: ${{ matrix.test-any }} + DOCSTRING: ${{ !matrix.test-any }} secrets: inherit docker_tests: @@ -190,77 +185,23 @@ jobs: test_docstrings: "true" secrets: inherit - retro_252: - name: "retro 252" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "252" - python_versions: '["3.10"]' - DOCSTRING: false - standalone_suffix: '' - secrets: inherit - - retro_251: - name: "retro 251" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "251" - python_versions: '["3.10"]' - DOCSTRING: false - standalone_suffix: '' - secrets: inherit - - retro_242: - name: "retro 242" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "242" - python_versions: '["3.10"]' - DOCSTRING: false - standalone_suffix: '' - secrets: inherit - - retro_241: - name: "retro 241" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "241" - python_versions: '["3.10"]' - DOCSTRING: false - standalone_suffix: '.sp01' - secrets: inherit - - retro_232: - name: "retro 232" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "232" - python_versions: '["3.10"]' - DOCSTRING: false - standalone_suffix: '' - secrets: inherit - - retro_231: - name: "retro 231" - if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "231" - python_versions: '["3.10"]' - DOCSTRING: false - secrets: inherit - - retro_222: - name: "retro 222" + tests-retro: + name: "Test DPF ${{ matrix.dpf.version }} compatibility" if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft + strategy: + fail-fast: false + matrix: + dpf: + - {"version": "251", "standalone-suffix": ""} + - {"version": "242", "standalone-suffix": ""} + - {"version": "241", "standalone-suffix": ".sp01"} + - {"version": "232", "standalone-suffix": ""} + - {"version": "231", "standalone-suffix": ""} + - {"version": "222", "standalone-suffix": ""} uses: ./.github/workflows/tests.yml with: - ANSYS_VERSION: "222" + ANSYS_VERSION: ${{ matrix.dpf.version }} python_versions: '["3.10"]' DOCSTRING: false + standalone_suffix: ${{ matrix.dpf.standalone-suffix }} secrets: inherit diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 7a8a2d16bdd..d603d910e03 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -73,48 +73,40 @@ jobs: name: ${{ steps.wheel.outputs.wheel_name }} path: dist/${{ steps.wheel.outputs.wheel_name }} - tests_3_10: - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: ${{ inputs.ansys_version || '251' }} - python_versions: '["3.10"]' - wheel: true - wheelhouse: true - standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - secrets: inherit - tests: + name: "Test ${{ matrix.test_any && 'any' || 'platform-specific' }} wheel" uses: ./.github/workflows/tests.yml + strategy: + matrix: + include: + - python_versions: '["3.10"]' + wheel: true + wheelhouse: true + DOCSTRING: true + test_any: false + - python_versions: '["3.11", "3.12", "3.13"]' + wheel: false + wheelhouse: true + DOCSTRING: false + test_any: false + - python_versions: '["3.10"]' + wheel: true + wheelhouse: false + DOCSTRING: false + test_any: true + - python_versions: '["3.11", "3.12", "3.13"]' + wheel: false + wheelhouse: false + DOCSTRING: false + test_any: true with: ANSYS_VERSION: ${{ inputs.ansys_version || '251' }} - python_versions: '["3.11", "3.12", "3.13"]' - DOCSTRING: false - wheel: false - wheelhouse: true - standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - secrets: inherit - - tests_any_3_10: - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: ${{ inputs.ansys_version || '251' }} - python_versions: '["3.10"]' - wheel: true - wheelhouse: false + python_versions: ${{ matrix.python_versions }} + wheel: ${{ matrix.wheel }} + wheelhouse: ${{ matrix.wheelhouse }} + DOCSTRING: ${{ matrix.DOCSTRING }} + test_any: ${{ matrix.test_any }} standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - test_any: true - secrets: inherit - - tests_any: - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: ${{ inputs.ansys_version || '251' }} - python_versions: '["3.11", "3.12", "3.13"]' - DOCSTRING: false - wheel: false - wheelhouse: false - standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - test_any: true secrets: inherit docs: @@ -133,94 +125,42 @@ jobs: standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} secrets: inherit - retro_242: - name: "retro 242" - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "242" - python_versions: '["3.10"]' - DOCSTRING: false - secrets: inherit - - retro_241: - name: "retro 241" - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "241" - python_versions: '["3.10"]' - standalone_suffix: '.sp01' - DOCSTRING: false - secrets: inherit - - retro_232: - name: "retro 232" - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "232" - python_versions: '["3.10"]' - DOCSTRING: false - secrets: inherit - - retro_231: - name: "retro 231" - uses: ./.github/workflows/tests.yml - with: - ANSYS_VERSION: "231" - python_versions: '["3.10"]' - DOCSTRING: false - secrets: inherit - - retro_222: - name: "retro 222" + tests-retro: + name: "Test DPF ${{ matrix.dpf.version }} compatibility" + strategy: + fail-fast: false + matrix: + dpf: + - {"version": "242", "standalone-suffix": ""} + - {"version": "241", "standalone-suffix": ".sp01"} + - {"version": "232", "standalone-suffix": ""} + - {"version": "231", "standalone-suffix": ""} + - {"version": "222", "standalone-suffix": ""} uses: ./.github/workflows/tests.yml with: - ANSYS_VERSION: "222" + ANSYS_VERSION: ${{ matrix.dpf.version }} python_versions: '["3.10"]' DOCSTRING: false - secrets: inherit - - pydpf-post_251: - name: "PyDPF-Post with 251" - uses: ./.github/workflows/pydpf-post.yml - with: - ANSYS_VERSION: ${{ inputs.ansys_version || '251' }} - standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} - test_docstrings: "true" - secrets: inherit - - pydpf-post_242: - name: "PyDPF-Post with 242" - uses: ./.github/workflows/pydpf-post.yml - with: - ANSYS_VERSION: "242" - secrets: inherit - - pydpf-post_241: - name: "PyDPF-Post with 241" - uses: ./.github/workflows/pydpf-post.yml - with: - ANSYS_VERSION: "241" - secrets: inherit - - pydpf-post_232: - name: "PyDPF-Post with 232" - uses: ./.github/workflows/pydpf-post.yml - with: - ANSYS_VERSION: "232" - secrets: inherit - - pydpf-post_231: - name: "PyDPF-Post with 231" - uses: ./.github/workflows/pydpf-post.yml - with: - ANSYS_VERSION: "231" - secrets: inherit - - pydpf-post_222: - name: "PyDPF-Post with 222" + standalone_suffix: ${{ matrix.dpf.standalone-suffix }} + secrets: inherit + + tests-pydpf-post: + name: "Test PyDPF-Post with ${{ matrix.dpf.version}}" + strategy: + fail-fast: false + matrix: + dpf: + - {"version": "251", "standalone-suffix": "${{ github.event.inputs.standalone_branch_suffix || '' }}", "test_docstrings": "true"} + - {"version": "242", "standalone-suffix": "", "test_docstrings": "false"} + - {"version": "241", "standalone-suffix": "", "test_docstrings": "false"} + - {"version": "232", "standalone-suffix": "", "test_docstrings": "false"} + - {"version": "231", "standalone-suffix": "", "test_docstrings": "false"} + - {"version": "222", "standalone-suffix": "", "test_docstrings": "false"} uses: ./.github/workflows/pydpf-post.yml with: - ANSYS_VERSION: "222" + ANSYS_VERSION: ${{ matrix.dpf.version }} + standalone_suffix: ${{ matrix.dpf.standalone-suffix }} + test_docstrings: ${{ matrix.dpf.test_docstrings }} secrets: inherit docker_tests: @@ -243,7 +183,7 @@ jobs: draft_release: name: "Draft Release" if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') - needs: [style, tests, tests_3_10, tests_any, tests_any_3_10, docs, examples, retro_232, retro_231, retro_222, docker_tests] + needs: [style, tests, docs, examples, tests-retro, docker_tests] runs-on: ubuntu-latest steps: - name: "Download artifacts" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 755009416ef..46c3d733592 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -209,7 +209,7 @@ jobs: DEBUG: true - name: "Test Docstrings" - if: (inputs.DOCSTRING == 'true') && !((inputs.test_any == 'true') && (matrix.os == 'ubuntu-latest')) + if: (inputs.DOCSTRING == 'true') uses: ansys/pydpf-actions/test_docstrings@v2.3 with: MODULE: ${{env.MODULE}}