Update generated code for DPF 271_daily on main #10610
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches-ignore: | |
| - '*no-ci*' | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| ansys_version: | |
| description: "ANSYS version" | |
| required: false | |
| type: string | |
| standalone_branch_suffix: | |
| description: 'Suffix of the branch on standalone' | |
| required: false | |
| default: '' | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| DOCUMENTATION_CNAME: 'dpf.docs.pyansys.com' | |
| MAIN_PYTHON_VERSION: '3.10' | |
| jobs: | |
| debug: | |
| name: "Debug" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Show the GitHub context for the triggered event | |
| run: echo "$GITHUB_CONTEXT" | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| vulnerabilities: | |
| name: Vulnerabilities | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: PyAnsys Vulnerability check (on ${{ github.ref == 'refs/heads/main' && 'main' || 'dev mode' }}) | |
| uses: ansys/actions/check-vulnerabilities@571fb2b8c7d6ad8c8b18e50bd20fb00f125dcfb6 # v10.2.6 | |
| with: | |
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
| python-package-name: "ansys-dpf-core" | |
| token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| dev-mode: ${{ github.ref != 'refs/heads/main' }} | |
| check-actions-security: | |
| name: "Check Actions Security" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: ansys/actions/check-actions-security@1f4f0896a8e49d3aec2f02ced215b04a32c85f28 # v10.2.7 | |
| pick_server_suffix: | |
| name: "Pick Server Suffix" | |
| runs-on: ubuntu-latest | |
| outputs: | |
| suffix: ${{ steps.step1.outputs.suffix }} | |
| steps: | |
| - id: step1 | |
| name: Define server branch suffix to use | |
| env: | |
| EVENT_NAME: ${{ github.event_name }} | |
| STANDALONE_BRANCH_SUFFIX: ${{ github.event.inputs.standalone_branch_suffix }} | |
| HEAD_REF: ${{ github.head_ref }} | |
| BASE_REF: ${{ github.base_ref }} | |
| run: | | |
| if [[ "${EVENT_NAME}" == "push" ]]; then | |
| echo "suffix=" >> "$GITHUB_OUTPUT" | |
| elif [[ "${EVENT_NAME}" == "workflow_dispatch" ]]; then | |
| echo "suffix=${STANDALONE_BRANCH_SUFFIX}" >> "$GITHUB_OUTPUT" | |
| elif [[ "${EVENT_NAME}" == "pull_request" ]]; then | |
| # If the PR is server-sync then extract suffix from branch name | |
| sub='maint/update_code_for_' | |
| if [[ "${HEAD_REF}" == *"$sub"* ]]; then | |
| ref_name=${HEAD_REF} | |
| base_ref=${BASE_REF} | |
| suffix=${ref_name/$sub[0-9][0-9][0-9]/''} | |
| suffix=${suffix/_on_$base_ref/''} | |
| elif [[ "${BASE_REF}" == *"$sub"* ]]; then | |
| base_ref=${BASE_REF} | |
| suffix=${base_ref/$sub[0-9][0-9][0-9]/''} | |
| suffix=${suffix/_on_*/''} | |
| fi | |
| echo "suffix=$suffix" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo "branch suffix is: >$suffix<" | |
| style: | |
| name: "Style Check" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: ansys/actions/code-style@1f4f0896a8e49d3aec2f02ced215b04a32c85f28 # v10.2.7 | |
| with: | |
| use-python-cache: false | |
| build_linux1: | |
| name: "Build linux1 wheel" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: "Install requirements" | |
| run: | | |
| pip install -U pip | |
| pip install --group build | |
| - name: "Build the manylinux1 wheel" | |
| shell: bash | |
| id: wheel | |
| run: | | |
| python .ci/build_wheel.py -p manylinux1 | |
| cd dist | |
| export name=`ls ansys_dpf_core*.whl` | |
| echo ${name} | |
| echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT | |
| cd .. | |
| - name: "Upload wheel any as artifact" | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: ${{ steps.wheel.outputs.wheel_name }} | |
| path: dist/${{ steps.wheel.outputs.wheel_name }} | |
| tests-latest: | |
| name: "Test ${{ matrix.test-any == 'true' && 'any' || 'platform-specific' }} wheel against latest DPF version" | |
| permissions: | |
| contents: read # Required by tests.yml jobs | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-any: ['false', 'true'] | |
| 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: ${{ matrix.test-any }} | |
| DOCSTRING: ${{ matrix.test-any == 'false' }} | |
| secrets: | |
| LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
| PYANSYS_CI_BOT_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| docker_tests: | |
| name: "Build and Test on Docker" | |
| permissions: | |
| contents: read # Required by test_docker.yml jobs | |
| uses: ./.github/workflows/test_docker.yml | |
| needs: pick_server_suffix | |
| with: | |
| ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }} | |
| standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}} | |
| secrets: | |
| LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
| PYANSYS_CI_BOT_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| docker_examples: | |
| name: "Run examples on Docker" | |
| permissions: | |
| contents: read # Required by examples_docker.yml jobs | |
| uses: ./.github/workflows/examples_docker.yml | |
| needs: pick_server_suffix | |
| with: | |
| ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }} | |
| python_versions: '["3.10"]' | |
| standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}} | |
| secrets: | |
| LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
| PYANSYS_CI_BOT_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| docs: | |
| if: | | |
| (startsWith(github.head_ref, 'main') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft) | |
| permissions: | |
| contents: read # Required by docs.yml jobs | |
| pull-requests: write # Required by doc-style job | |
| uses: ./.github/workflows/docs.yml | |
| needs: pick_server_suffix | |
| with: | |
| ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }} | |
| standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}} | |
| event_name: ${{ github.event_name }} | |
| python_version: "3.11" | |
| secrets: | |
| LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
| PYANSYS_CI_BOT_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| doc-deploy-pr: | |
| name: "Deploy PR documentation" | |
| runs-on: ubuntu-latest | |
| needs: docs | |
| if: contains(github.event.pull_request.labels.*.name, 'deploy-pr-doc') | |
| permissions: | |
| contents: write # Required for pushing documentation to gh-pages | |
| pull-requests: write # Required for posting deployment status comments | |
| steps: | |
| - uses: ansys/actions/doc-deploy-pr@1f4f0896a8e49d3aec2f02ced215b04a32c85f28 # v10.2.7 | |
| with: | |
| cname: ${{ env.DOCUMENTATION_CNAME }} | |
| doc-artifact-name: HTML-doc-ansys-dpf-core.zip | |
| decompress-artifact: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | |
| bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} | |
| maximum-pr-doc-deployments: 10 | |
| upload-development-docs: | |
| name: "Upload Development Docs" | |
| runs-on: ubuntu-latest | |
| if: | | |
| (github.ref == 'refs/heads/main' && github.event_name == 'push') | |
| needs: [docs] | |
| permissions: | |
| contents: write # Required for pushing documentation to gh-pages | |
| pull-requests: write # Required for posting deployment status comments | |
| steps: | |
| - name: "Upload development documentation" | |
| uses: ansys/actions/doc-deploy-dev@1f4f0896a8e49d3aec2f02ced215b04a32c85f28 # v10.2.7 | |
| with: | |
| cname: ${{ env.DOCUMENTATION_CNAME }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| doc-artifact-name: HTML-doc-ansys-dpf-core.zip | |
| decompress-artifact: true | |
| bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | |
| bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} | |
| examples: | |
| if: | | |
| (startsWith(github.head_ref, 'main') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft) | |
| permissions: | |
| contents: read # Required by examples.yml jobs | |
| uses: ./.github/workflows/examples.yml | |
| needs: pick_server_suffix | |
| with: | |
| ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }} | |
| python_versions: '["3.10"]' | |
| standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}} | |
| secrets: | |
| LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
| PYANSYS_CI_BOT_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| pydpf-post: | |
| name: "PyDPF-Post" | |
| if: | | |
| (startsWith(github.head_ref, 'main') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft) | |
| permissions: | |
| contents: read # Required by pydpf-post.yml jobs | |
| pull-requests: write # Required for posting test outcome comments | |
| uses: ./.github/workflows/pydpf-post.yml | |
| needs: pick_server_suffix | |
| with: | |
| ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }} | |
| post_branch: "main" | |
| standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}} | |
| test_docstrings: "true" | |
| secrets: | |
| LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
| PYANSYS_CI_BOT_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| tests-retro: | |
| name: "Test DPF ${{ matrix.version.version }}${{ matrix.version.patch }} compatibility" | |
| if: | | |
| (startsWith(github.head_ref, 'main') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft) | |
| permissions: | |
| contents: read # Required by tests.yml jobs | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - ${{ fromJson(vars.ANSYS_VERSIONS_RETRO_WITH_PATCH) }} | |
| docstring: | |
| - "false" | |
| include: | |
| - version: ${{ fromJson(vars.ANSYS_VERSION_LAST_RELEASED_WITH_PATCH) }} | |
| docstring: "true" | |
| uses: ./.github/workflows/tests.yml | |
| with: | |
| ANSYS_VERSION: ${{ matrix.version.version }} | |
| python_versions: '["3.10"]' | |
| DOCSTRING: ${{ matrix.docstring }} | |
| standalone_suffix: ${{ matrix.version.patch }} | |
| secrets: | |
| LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
| PYANSYS_CI_BOT_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |