Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
types: [opened, synchronize, reopened, ready_for_review, closed]
branches-ignore:
- '*no-ci*'
push:
Expand Down Expand Up @@ -31,6 +31,7 @@ env:
jobs:
debug:
runs-on: ubuntu-latest
if: github.event.action != 'closed'
steps:
- name: Show the Github context for the triggered event
run: echo "$GITHUB_CONTEXT"
Expand All @@ -39,6 +40,7 @@ jobs:

pick_server_suffix:
runs-on: ubuntu-latest
if: github.event.action != 'closed'
outputs:
suffix: ${{ steps.step1.outputs.suffix }}
steps:
Expand Down Expand Up @@ -69,6 +71,7 @@ jobs:
style:
name: "Style Check"
runs-on: ubuntu-latest
if: github.event.action != 'closed'
steps:
- uses: ansys/actions/code-style@v8
with:
Expand All @@ -77,6 +80,7 @@ jobs:
build_linux1:
name: "Build linux1 wheel"
runs-on: ubuntu-latest
if: github.event.action != 'closed'
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -107,6 +111,7 @@ jobs:
matrix:
test-any: ['false', 'true']
uses: ./.github/workflows/tests.yml
if: github.event.action != 'closed'
needs: pick_server_suffix
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
Expand All @@ -121,6 +126,7 @@ jobs:
docker_tests:
name: "Build and Test on Docker"
uses: ./.github/workflows/test_docker.yml
if: github.event.action != 'closed'
needs: pick_server_suffix
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
Expand All @@ -130,6 +136,7 @@ jobs:
docker_examples:
name: "Run examples on Docker"
uses: ./.github/workflows/examples_docker.yml
if: github.event.action != 'closed'
needs: pick_server_suffix
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
Expand All @@ -138,7 +145,7 @@ jobs:
secrets: inherit

docs:
if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
if: github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
uses: ./.github/workflows/docs.yml
needs: pick_server_suffix
with:
Expand All @@ -148,9 +155,25 @@ jobs:
python_version: "3.11"
secrets: inherit

doc-deploy-pr:
name: "Deploy PR documentation"
runs-on: ubuntu-latest
needs: docs
if: always() && (needs.docs.result == 'success' || needs.docs.result == 'skipped')
steps:
- uses: ansys/actions/doc-deploy-pr@v10
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 }}
maximum-pr-doc-deployments: 10

upload-development-docs:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
if: ${{ github.event.action != 'closed' && (github.ref == 'refs/heads/master' && github.event_name == 'push') }}
needs: [docs]
steps:
- name: "Upload development documentation"
Expand All @@ -164,7 +187,7 @@ jobs:
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}

examples:
if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
if: github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
uses: ./.github/workflows/examples.yml
needs: pick_server_suffix
with:
Expand All @@ -175,7 +198,7 @@ jobs:

pydpf-post:
name: "PyDPF-Post"
if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
if: github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
uses: ./.github/workflows/pydpf-post.yml
needs: pick_server_suffix
with:
Expand All @@ -187,7 +210,7 @@ jobs:

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
if: github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
strategy:
fail-fast: false
matrix:
Expand Down