Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prune workflows based on changed files #16642

Merged
merged 86 commits into from
Aug 27, 2024
Merged
Changes from 80 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
a6bcc44
Prune workflows based on changed files
KyleFromNVIDIA Aug 22, 2024
68891bf
Remove checkout step
KyleFromNVIDIA Aug 22, 2024
4c7b312
Workflow syntax
KyleFromNVIDIA Aug 22, 2024
d569bcf
Refactor
KyleFromNVIDIA Aug 22, 2024
bdbd6aa
Checkout
KyleFromNVIDIA Aug 22, 2024
a313414
pr-builder dependency
KyleFromNVIDIA Aug 22, 2024
9c0238d
Add rapids_config.cmake and build.sh
KyleFromNVIDIA Aug 22, 2024
3248631
Print outputs
KyleFromNVIDIA Aug 22, 2024
30f6482
Oops
KyleFromNVIDIA Aug 22, 2024
9174e2d
Add test job
KyleFromNVIDIA Aug 22, 2024
97c02c9
dep
KyleFromNVIDIA Aug 22, 2024
01b9764
test_cpp
KyleFromNVIDIA Aug 22, 2024
9a39bfc
==true
KyleFromNVIDIA Aug 22, 2024
15a1bb5
Dummy comment
KyleFromNVIDIA Aug 22, 2024
3716ab2
Debugging
KyleFromNVIDIA Aug 22, 2024
7553959
Re-run CI
KyleFromNVIDIA Aug 22, 2024
5ea7a8c
Test
KyleFromNVIDIA Aug 22, 2024
a7c2e7f
Dummy comment
KyleFromNVIDIA Aug 22, 2024
62e1ae9
Re-run CI
KyleFromNVIDIA Aug 22, 2024
61997ce
Remove dummy comment
KyleFromNVIDIA Aug 22, 2024
fa10f14
Debugging
KyleFromNVIDIA Aug 22, 2024
30c4ec0
Dummy comment
KyleFromNVIDIA Aug 22, 2024
f187145
More debugging
KyleFromNVIDIA Aug 22, 2024
5f97a6f
String style
KyleFromNVIDIA Aug 22, 2024
5e50398
Remove dummy comment
KyleFromNVIDIA Aug 22, 2024
fb5ab25
conditional
KyleFromNVIDIA Aug 22, 2024
f8c6a09
== true
KyleFromNVIDIA Aug 22, 2024
07fb6fa
Dummy comment
KyleFromNVIDIA Aug 22, 2024
62150b4
Remove test job, fix conditional
KyleFromNVIDIA Aug 22, 2024
fe508a1
Remove test job
KyleFromNVIDIA Aug 22, 2024
f1bc715
Broaden file checks
KyleFromNVIDIA Aug 22, 2024
42de87f
Add test job
KyleFromNVIDIA Aug 22, 2024
c049d1f
Quote wildcard
KyleFromNVIDIA Aug 22, 2024
ae50935
Re-run CI
KyleFromNVIDIA Aug 22, 2024
88344d1
Dummy comment
KyleFromNVIDIA Aug 22, 2024
9eb540c
Debug github context
KyleFromNVIDIA Aug 22, 2024
ffca924
toJSON()
KyleFromNVIDIA Aug 22, 2024
75dfc3c
Quote
KyleFromNVIDIA Aug 22, 2024
3ea3389
Get PR info
KyleFromNVIDIA Aug 22, 2024
b769771
pr-info
KyleFromNVIDIA Aug 22, 2024
f569079
Check against PR base sha
KyleFromNVIDIA Aug 22, 2024
c1571a4
Increase fetch depth
KyleFromNVIDIA Aug 22, 2024
452e765
Debugging
KyleFromNVIDIA Aug 22, 2024
d7843a5
More debugging
KyleFromNVIDIA Aug 22, 2024
2796540
Dummy comment
KyleFromNVIDIA Aug 22, 2024
3c49cdf
Revert "Dummy comment"
KyleFromNVIDIA Aug 22, 2024
fdfe3e0
Dummy comment
KyleFromNVIDIA Aug 22, 2024
2b3771d
Re-run CI
KyleFromNVIDIA Aug 22, 2024
547028a
Remove debugging
KyleFromNVIDIA Aug 22, 2024
a4e45c2
Filter Java and more Python jobs
KyleFromNVIDIA Aug 22, 2024
a33d312
Sort workflow jobs
KyleFromNVIDIA Aug 22, 2024
aefcee3
Test requiring a job that never runs
KyleFromNVIDIA Aug 22, 2024
bb4caa3
Run the never-run job
KyleFromNVIDIA Aug 22, 2024
1dab6f0
Revert "Run the never-run job"
KyleFromNVIDIA Aug 22, 2024
747de4c
Try conditional
KyleFromNVIDIA Aug 22, 2024
32e985a
exit 0
KyleFromNVIDIA Aug 22, 2024
4b9e366
false
KyleFromNVIDIA Aug 22, 2024
5ada0b9
if: always()
KyleFromNVIDIA Aug 22, 2024
4a37ddb
Run the never-run test
KyleFromNVIDIA Aug 22, 2024
1b26d70
Initial commit of fake-pr-builder
KyleFromNVIDIA Aug 22, 2024
feed025
Start using pr-builder-needs-check
KyleFromNVIDIA Aug 22, 2024
140f24c
Re-run CI
KyleFromNVIDIA Aug 22, 2024
173591a
Re-run CI
KyleFromNVIDIA Aug 22, 2024
9bbe5cc
Re-run CI
KyleFromNVIDIA Aug 22, 2024
a9f783a
Pass needs input
KyleFromNVIDIA Aug 22, 2024
c2dda97
Remove if: always()
KyleFromNVIDIA Aug 22, 2024
1ee9faa
Revert "Remove if: always()"
KyleFromNVIDIA Aug 22, 2024
09c86b7
Re-run CI
KyleFromNVIDIA Aug 22, 2024
023ec73
Re-run CI
KyleFromNVIDIA Aug 22, 2024
b7b578f
Re-run CI
KyleFromNVIDIA Aug 22, 2024
bbcd80f
Re-run CI
KyleFromNVIDIA Aug 22, 2024
e792537
Re-run CI
KyleFromNVIDIA Aug 22, 2024
79cca7e
Skip never-run
KyleFromNVIDIA Aug 22, 2024
1866baf
Run never-run
KyleFromNVIDIA Aug 22, 2024
39ba71a
Revert "Run never-run"
KyleFromNVIDIA Aug 22, 2024
fd06a97
Restore workflow and add if and needs to pr-builder
KyleFromNVIDIA Aug 23, 2024
875628c
Temporarily ignore .github changes for testing
KyleFromNVIDIA Aug 23, 2024
0761f04
Filter notebook tests
KyleFromNVIDIA Aug 23, 2024
acf2672
Add needs changed-files
KyleFromNVIDIA Aug 23, 2024
46d0706
Add needs changed-files
KyleFromNVIDIA Aug 23, 2024
0314fd6
Don't ignore docs for notebooks
KyleFromNVIDIA Aug 23, 2024
fa16682
Test a notebook failure
KyleFromNVIDIA Aug 23, 2024
91ae5c4
Merge branch 'branch-24.10' into test-pruning
KyleFromNVIDIA Aug 23, 2024
6f86576
Remove temporary testing modifications
KyleFromNVIDIA Aug 23, 2024
c4c68f5
Exclude README, CONTRIBUTING, and imgs
KyleFromNVIDIA Aug 26, 2024
1f49df5
Don't exclude imgs from notebooks
KyleFromNVIDIA Aug 26, 2024
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
86 changes: 76 additions & 10 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 @@ -36,6 +37,61 @@ jobs:
- pandas-tests-diff
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10
if: always()
with:
needs: ${{ toJSON(needs) }}
changed-files:
KyleFromNVIDIA marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
name: "Check changed files"
outputs:
test_cpp: ${{ steps.changed-files.outputs.cpp_any_changed == 'true' }}
test_java: ${{ steps.changed-files.outputs.java_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: |
KyleFromNVIDIA marked this conversation as resolved.
Show resolved Hide resolved
cpp:
KyleFromNVIDIA marked this conversation as resolved.
Show resolved Hide resolved
- '**'
- '!docs/**'
- '!java/**'
- '!notebooks/**'
- '!python/**'
# TODO: Remove this before merging
- '!.github/**'
KyleFromNVIDIA marked this conversation as resolved.
Show resolved Hide resolved
java:
- '**'
- '!docs/**'
- '!notebooks/**'
- '!python/**'
# TODO: Remove this before merging
- '!.github/**'
notebooks:
- '**'
- '!docs/**'
- '!java/**'
# TODO: Remove this before merging
- '!.github/**'
python:
- '**'
- '!docs/**'
- '!java/**'
- '!notebooks/**'
# TODO: Remove this before merging
- '!.github/**'
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.10
Expand All @@ -55,9 +111,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/conda-cpp-tests.yaml@branch-24.10
if: needs.changed-files.outputs.test_cpp == 'true'
KyleFromNVIDIA marked this conversation as resolved.
Show resolved Hide resolved
with:
build_type: pull-request
conda-python-build:
Expand All @@ -67,24 +124,27 @@ jobs:
with:
build_type: pull-request
conda-python-cudf-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.10
if: needs.changed-files.outputs.test_python == 'true'
with:
build_type: pull-request
script: "ci/test_python_cudf.sh"
conda-python-other-tests:
# Tests for dask_cudf, custreamz, cudf_kafka are separated for CI parallelism
needs: conda-python-build
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
if: needs.changed-files.outputs.test_python == 'true'
with:
build_type: pull-request
script: "ci/test_python_other.sh"
KyleFromNVIDIA marked this conversation as resolved.
Show resolved Hide resolved
conda-java-tests:
needs: conda-cpp-build
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
if: needs.changed-files.outputs.test_java == 'true'
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -102,9 +162,10 @@ jobs:
container_image: "rapidsai/ci-wheel:latest"
run_script: "ci/configure_cpp_static.sh"
conda-notebook-tests:
needs: conda-python-build
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
if: needs.changed-files.outputs.test_notebooks == 'true'
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand Down Expand Up @@ -136,9 +197,10 @@ jobs:
build_type: pull-request
script: "ci/build_wheel_cudf.sh"
wheel-tests-cudf:
needs: wheel-build-cudf
needs: [wheel-build-cudf, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
if: needs.changed-files.outputs.test_python == 'true'
with:
build_type: pull-request
script: ci/test_wheel_cudf.sh
Expand All @@ -152,9 +214,10 @@ jobs:
build_type: pull-request
script: "ci/build_wheel_cudf_polars.sh"
wheel-tests-cudf-polars:
needs: wheel-build-cudf-polars
needs: [wheel-build-cudf-polars, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
if: needs.changed-files.outputs.test_python == 'true'
with:
# This selects "ARCH=amd64 + the latest supported Python + CUDA".
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
Expand All @@ -172,9 +235,10 @@ jobs:
build_type: pull-request
script: "ci/build_wheel_dask_cudf.sh"
wheel-tests-dask-cudf:
needs: wheel-build-dask-cudf
needs: [wheel-build-dask-cudf, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
if: needs.changed-files.outputs.test_python == 'true'
with:
# This selects "ARCH=amd64 + the latest supported Python + CUDA".
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
Expand All @@ -191,19 +255,21 @@ jobs:
build-all -DBUILD_BENCHMARKS=ON --verbose;
sccache -s;
unit-tests-cudf-pandas:
needs: wheel-build-cudf
needs: [wheel-build-cudf, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
if: needs.changed-files.outputs.test_python == 'true'
with:
# This selects "ARCH=amd64 + the latest supported Python + CUDA".
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
build_type: pull-request
script: ci/cudf_pandas_scripts/run_tests.sh
pandas-tests:
# run the Pandas unit tests using PR branch
needs: wheel-build-cudf
needs: [wheel-build-cudf, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
if: needs.changed-files.outputs.test_python == 'true'
with:
# This selects "ARCH=amd64 + the latest supported Python + CUDA".
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
Expand Down
Loading