forked from rapidsai/cugraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prune workflows based on changed files
Only run tests based on things that have actually changed. For example, if only Python files have changed, we don't need to run the C++ tests. Contributes to rapidsai/build-planning#94
- Loading branch information
1 parent
f7e1cea
commit f225033
Showing
1 changed file
with
65 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ concurrency: | |
jobs: | ||
pr-builder: | ||
needs: | ||
- changed-files | ||
- checks | ||
- conda-cpp-build | ||
- conda-cpp-tests | ||
|
@@ -35,6 +36,52 @@ jobs: | |
- devcontainer | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
if: always() | ||
with: | ||
needs: ${{ toJSON(needs) }} | ||
changed-files: | ||
runs-on: ubuntu-latest | ||
name: "Check changed files" | ||
outputs: | ||
test_cpp: ${{ steps.changed-files.outputs.cpp_any_changed == 'true' }} | ||
test_notebooks: ${{ steps.changed-files.outputs.notebooks_any_changed == 'true' }} | ||
test_python: ${{ steps.changed-files.outputs.python_any_changed == 'true' }} | ||
steps: | ||
- name: Get PR info | ||
id: get-pr-info | ||
uses: rapidsai/shared-actions/get-pr-info@main | ||
- name: Checkout code repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.sha }} | ||
fetch-depth: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).commits }} | ||
persist-credentials: false | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
base_sha: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.sha }} | ||
files_yaml: | | ||
cpp: | ||
- '**' | ||
- '!docs/**' | ||
- '!img/**' | ||
- '!notebooks/**' | ||
- '!python/**' | ||
# TODO: Remove this before merging | ||
- '!.github/**' | ||
notebooks: | ||
- '**' | ||
- '!docs/**' | ||
# TODO: Remove this before merging | ||
- '!.github/**' | ||
python: | ||
- '**' | ||
- '!docs/**' | ||
- '!img/**' | ||
- '!notebooks/**' | ||
# TODO: Remove this before merging | ||
- '!.github/**' | ||
checks: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
|
@@ -48,9 +95,10 @@ jobs: | |
build_type: pull-request | ||
node_type: cpu32 | ||
conda-cpp-tests: | ||
needs: conda-cpp-build | ||
needs: [conda-cpp-build, changed-files] | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
if: needs.changed-files.outputs.test_cpp == 'true' | ||
with: | ||
build_type: pull-request | ||
conda-cpp-checks: | ||
|
@@ -68,15 +116,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: needs.changed-files.outputs.test_python == 'true' | ||
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: needs.changed-files.outputs.test_notebooks == 'true' | ||
with: | ||
build_type: pull-request | ||
node_type: "gpu-v100-latest-1" | ||
|
@@ -105,9 +155,10 @@ jobs: | |
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY | ||
node_type: cpu32 | ||
wheel-tests-pylibcugraph: | ||
needs: wheel-build-pylibcugraph | ||
needs: [wheel-build-pylibcugraph, changed-files] | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
if: needs.changed-files.outputs.test_python == 'true' | ||
with: | ||
build_type: pull-request | ||
script: ci/test_wheel_pylibcugraph.sh | ||
|
@@ -122,9 +173,10 @@ jobs: | |
extra-repo-sha: branch-24.10 | ||
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY | ||
wheel-tests-cugraph: | ||
needs: wheel-build-cugraph | ||
needs: [wheel-build-cugraph, changed-files] | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
if: needs.changed-files.outputs.test_python == 'true' | ||
with: | ||
build_type: pull-request | ||
script: ci/test_wheel_cugraph.sh | ||
|
@@ -136,9 +188,10 @@ jobs: | |
build_type: pull-request | ||
script: ci/build_wheel_nx-cugraph.sh | ||
wheel-tests-nx-cugraph: | ||
needs: wheel-build-nx-cugraph | ||
needs: [wheel-build-nx-cugraph, changed-files] | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
if: needs.changed-files.outputs.test_python == 'true' | ||
with: | ||
build_type: pull-request | ||
script: ci/test_wheel_nx-cugraph.sh | ||
|
@@ -150,9 +203,10 @@ jobs: | |
build_type: pull-request | ||
script: ci/build_wheel_cugraph-dgl.sh | ||
wheel-tests-cugraph-dgl: | ||
needs: wheel-build-cugraph-dgl | ||
needs: [wheel-build-cugraph-dgl, changed-files] | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
if: needs.changed-files.outputs.test_python == 'true' | ||
with: | ||
build_type: pull-request | ||
script: ci/test_wheel_cugraph-dgl.sh | ||
|
@@ -165,9 +219,10 @@ jobs: | |
build_type: pull-request | ||
script: ci/build_wheel_cugraph-pyg.sh | ||
wheel-tests-cugraph-pyg: | ||
needs: wheel-build-cugraph-pyg | ||
needs: [wheel-build-cugraph-pyg, changed-files] | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
if: needs.changed-files.outputs.test_python == 'true' | ||
with: | ||
build_type: pull-request | ||
script: ci/test_wheel_cugraph-pyg.sh | ||
|
@@ -179,9 +234,10 @@ jobs: | |
build_type: pull-request | ||
script: ci/build_wheel_cugraph-equivariant.sh | ||
wheel-tests-cugraph-equivariant: | ||
needs: wheel-build-cugraph-equivariant | ||
needs: [wheel-build-cugraph-equivariant, changed-files] | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
if: needs.changed-files.outputs.test_python == 'true' | ||
with: | ||
build_type: pull-request | ||
script: ci/test_wheel_cugraph-equivariant.sh | ||
|