-
Notifications
You must be signed in to change notification settings - Fork 15
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
install diff-filter-buildkite-plugin to only build when relevant files changed #400
base: main
Are you sure you want to change the base?
Conversation
e0bd514
to
36db0ee
Compare
I believe NEWS.md and HISTORY.md are in the docs, so I think it needs at least the docs to be built for those? |
9b18b56
to
df7d25c
Compare
617363c
to
014c2cc
Compare
e12afd6
to
9ccf4d5
Compare
I think I managed to implement a mechanism to override the filter using Github labels and the github-pr-labels-buildkite-plugin. I think the basic functionality is now there.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is what the ignore-list is for (it's quite short, so can't tell it's what I'm thinking of), but for changes which involve only any of
.devcontainer
.github
([GHA] Explicitly install Julia for whitespace workflow JuliaLang/julia#56468 shouldn't have run buildkite CI).clang-format
.clangd
.git-blame-ignore-revs
.gitignore
.mailmap
CITATION.bib
CITATION.cff
julia.spdx.json
typos.toml
shouldn't run any CI here at all. After this, for docs-related changes I think we need probably to build for all platforms but not run any test suites apart from the doctests? Not sure if this is what #400 (comment) was suggesting.
@@ -12,6 +12,25 @@ | |||
# and only need to touch the webui configuration when we need to alter | |||
# something about the privileged steps. | |||
|
|||
common: | |||
- diff-filter-build_plugin: &diff-filter-build | |||
https://github.com/fatteneder/diff-filter-buildkite-plugin#main: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should be moved to this organisation before merge.
This can likely be simplified to: apply the filter iff the repo is JuliaLang/julia and it is a PR. |
Following #400 (comment) we now always build |
Ok, I did not yet test how the plugin behaves once a PR is merged. About |
fc89bd0
to
8dbfb8d
Compare
I have not permissions on this repo/in this org. Can someone please add the |
Closing and reopening a PR doesn't retrigger build kite unfortunately. I asked Bill kite Support about that a while back, and they told me that was is the intended behavior. you'll need to go to the build kite build and click the rebuild button. |
0a47f16
to
d097c95
Compare
bcc5759
to
1993a32
Compare
1993a32
to
8df10ec
Compare
@@ -12,6 +12,24 @@ | |||
# and only need to touch the webui configuration when we need to alter | |||
# something about the privileged steps. | |||
|
|||
env: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only needed as this repo's main branch is called "main" whereas the one of the Julia repo is called "master".
Using a default of DIFF_FILTER_TARGET_BRANCH=""
tells the diff-filter-buildkite-plugin
to use a PR's merge base as the reference against which changes should be compared (https://github.com/fatteneder/diff-filter-buildkite-plugin/blob/7155804f7ba73a9798b4c4225613ca6a5d7d8c12/hooks/diff-filter-impl#L13-L38).
So if the pipeline run's on forks of Julia's repo, it should do the right thing (although untested) even when PRing against a branch other than master. For PRs against julia-buildkite
we always compare against Julia's master by manually setting it in .buildkite/hooks/post-checkout
.
Ok, now I am happy with the functionality, but I did not manage to reduce the level of code duplication. Happy to hear suggestions on that and other comments. |
Someone needs to re-sign the signed pipelines:
Probably we can wait until all the PR review is done, and then re-sign the signed pipelines. No real need to do it earlier. |
Fixes #243
This adds a filter that skips (most of the) build and test steps in the CI pipeline if a PR only changed files that are irrelevant for Julia's functionality.
In particular, changes to any of these files won't trigger a build (glob patterns as seen from the root of the Julia repo):
"*.md"
".*"
"julia.spdx.json"
"CITATION.*"
"typos.toml"
Note that we always build for
x86_64-linux-gnu
in order to generate the docs.The filter can be disabled on a PR basis by adding a label with the name
ci-force-build
to it.The addition of more fine grained filters is left for future PRs.