Skip to content

Commit

Permalink
Prune workflows based on changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Oct 3, 2024
1 parent 473e537 commit bbb1054
Showing 1 changed file with 49 additions and 3 deletions.
52 changes: 49 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ concurrency:
jobs:
pr-builder:
needs:
- changed-files
- checks
- conda-cpp-build
- conda-cpp-tests
Expand All @@ -24,6 +25,48 @@ jobs:
- wheel-python-tests
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.12
if: always()
with:
needs: ${{ toJSON(needs) }}
changed-files:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@branch-24.12
with:
files_yaml: |
test_cpp:
- '**'
- '!.devcontainer/**'
- '!.pre-commit-config.yaml'
- '!CONTRIBUTING.md'
- '!README.md'
- '!docs/**'
- '!img/**'
- '!notebooks/**'
- '!python/**'
- '!thirdparty/LICENSES/**'
# TODO: Remove this before merging
- '!.github/workflows/**'
test_notebooks:
- '**'
- '!.devcontainer/**'
- '!.pre-commit-config.yaml'
- '!CONTRIBUTING.md'
- '!README.md'
- '!thirdparty/LICENSES/**'
# TODO: Remove this before merging
- '!.github/workflows/**'
test_python:
- '**'
- '!.devcontainer/**'
- '!.pre-commit-config.yaml'
- '!CONTRIBUTING.md'
- '!README.md'
- '!docs/**'
- '!img/**'
- '!notebooks/**'
- '!thirdparty/LICENSES/**'
# TODO: Remove this before merging
- '!.github/workflows/**'
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.12
Expand All @@ -34,9 +77,10 @@ jobs:
with:
build_type: pull-request
conda-cpp-tests:
needs: conda-cpp-build
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.12
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
conda-python-build:
Expand All @@ -46,9 +90,10 @@ jobs:
with:
build_type: pull-request
conda-python-tests:
needs: conda-python-build
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
docs-build:
Expand Down Expand Up @@ -86,9 +131,10 @@ jobs:
build_type: pull-request
script: ci/build_wheel_python.sh
wheel-python-tests:
needs: wheel-python-build
needs: [wheel-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel.sh

0 comments on commit bbb1054

Please sign in to comment.