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 22, 2024
1 parent d8dd061 commit f205bab
Showing 1 changed file with 43 additions and 5 deletions.
48 changes: 43 additions & 5 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-checks
Expand All @@ -28,6 +29,38 @@ jobs:
- devcontainer
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: always()
with:
needs: ${{ toJSON(needs) }}
changed-files:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
files_yaml: |
test_cpp:
- '**'
- '!.pre-commit-config.yaml'
- '!CONTRIBUTING.md'
- '!README.md'
- '!docs/**'
- '!java/**'
- '!notebooks/**'
- '!python/**'
# TODO: Remove this before merging
- '!.github/workflows/**'
test_notebooks:
- '**'
- '!.pre-commit-config.yaml'
- '!CONTRIBUTING.md'
- '!README.md'
test_python:
- '**'
- '!.pre-commit-config.yaml'
- '!CONTRIBUTING.md'
- '!README.md'
- '!docs/**'
- '!java/**'
- '!notebooks/**'
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
Expand All @@ -47,9 +80,10 @@ jobs:
build_type: pull-request
enable_check_symbols: true
conda-cpp-tests:
needs: conda-cpp-build
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
conda-python-build:
Expand All @@ -59,15 +93,17 @@ 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/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
conda-notebook-tests:
needs: conda-python-build
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_notebooks
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand Down Expand Up @@ -101,9 +137,10 @@ jobs:
build_type: pull-request
script: ci/build_wheel_cuspatial.sh
wheel-tests-cuspatial:
needs: wheel-build-cuspatial
needs: [wheel-build-cuspatial, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_cuspatial.sh
Expand All @@ -115,9 +152,10 @@ jobs:
build_type: pull-request
script: ci/build_wheel_cuproj.sh
wheel-tests-cuproj:
needs: [wheel-build-cuspatial, wheel-build-cuproj]
needs: [wheel-build-cuspatial, wheel-build-cuproj, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_cuproj.sh
Expand Down

0 comments on commit f205bab

Please sign in to comment.