CI #4366
This file contains 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: | |
- master | |
workflow_dispatch: | |
inputs: | |
standalone_branch_suffix: | |
description: 'Suffix of the branch on standalone' | |
required: false | |
default: '' | |
custom-requirements: | |
description: "Path to requirements.txt file to install" | |
required: false | |
type: string | |
default: 'requirements/requirements_dev.txt' | |
custom-wheels: | |
description: "extra pip --find-links argument to find custom dpf wheels" | |
required: false | |
type: string | |
default: './dpf-standalone/v241/dist' | |
custom-wheels-docker: | |
description: "extra pip --find-links argument to find custom dpf wheels" | |
required: false | |
type: string | |
default: './dpf-standalone/dist' | |
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.8' | |
jobs: | |
debug: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Show the Github context for the triggered event | |
run: echo "$GITHUB_CONTEXT" | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
style: | |
name: "Style Check" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Setup Python" | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: "Install pre-commit" | |
run: pip install pre-commit | |
- name: "Run pre-commit" | |
run: pre-commit run --all-files --show-diff-on-failure | |
tests: | |
uses: ./.github/workflows/tests.yml | |
with: | |
ANSYS_VERSION: "241" | |
python_versions: '["3.8"]' | |
wheel: true | |
wheelhouse: false | |
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} | |
custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} | |
custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v241/dist' }} | |
secrets: inherit | |
docker_tests: | |
name: "Build and Test on Docker" | |
uses: ./.github/workflows/test_docker.yml | |
with: | |
ANSYS_VERSION: "241" | |
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} | |
custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} | |
custom-wheels: ${{ github.event.inputs.custom-wheels-docker || './dpf-standalone/dist' }} | |
secrets: inherit | |
docker_examples: | |
name: "Run examples on Docker" | |
uses: ./.github/workflows/examples_docker.yml | |
with: | |
ANSYS_VERSION: "241" | |
python_versions: '["3.8"]' | |
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} | |
custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} | |
custom-wheels: ${{ github.event.inputs.custom-wheels-docker || './dpf-standalone/dist' }} | |
secrets: inherit | |
docs: | |
if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft | |
uses: ./.github/workflows/docs.yml | |
with: | |
ANSYS_VERSION: "241" | |
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} | |
custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} | |
custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v241/dist' }} | |
event_name: ${{ github.event_name }} | |
secrets: inherit | |
upload-development-docs: | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/master' }} | |
needs: [docs] | |
steps: | |
- name: "Upload development documentation" | |
uses: ansys/actions/doc-deploy-dev@v4 | |
with: | |
cname: ${{ env.DOCUMENTATION_CNAME }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
doc-artifact-name: HTML-doc-ansys-dpf-core.zip | |
decompress-artifact: true | |
examples: | |
if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft | |
uses: ./.github/workflows/examples.yml | |
with: | |
ANSYS_VERSION: "241" | |
python_versions: '["3.8"]' | |
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} | |
custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} | |
custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v241/dist' }} | |
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.8"]' | |
DOCSTRING: false | |
standalone_suffix: '' | |
custom-wheels: './dpf-standalone/v232/dist --pre' | |
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.8"]' | |
DOCSTRING: false | |
custom-wheels: './.github' | |
secrets: inherit | |
retro_222: | |
name: "retro 222" | |
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: "222" | |
python_versions: '["3.8"]' | |
DOCSTRING: false | |
custom-wheels: './.github' | |
secrets: inherit | |
retro_221: | |
name: "retro 221" | |
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: "221" | |
python_versions: '["3.8"]' | |
DOCSTRING: false | |
custom-wheels: './.github' | |
secrets: inherit | |
pydpf-post: | |
name: "PyDPF-Post" | |
if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft | |
uses: ./.github/workflows/pydpf-post.yml | |
with: | |
ANSYS_VERSION: "241" | |
post_branch: "master" | |
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }} | |
custom-requirements: ${{ github.event.inputs.custom-requirements || 'requirements/requirements_dev.txt' }} | |
custom-wheels: ${{ github.event.inputs.custom-wheels || './dpf-standalone/v241/dist' }} | |
test_docstrings: "true" | |
secrets: inherit |