-
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
Open
fatteneder
wants to merge
20
commits into
JuliaCI:main
Choose a base branch
from
fatteneder:fa/diff-filter-build
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
6d9e107
install diff-filter-build
fatteneder e535e47
add diff-filter-doc
fatteneder fa2823c
update *upload_jobs.yml
fatteneder 55bfc6a
rm diff-filter-doc, but build at least x86_64-linux
fatteneder b4e235a
add option to force build using a PR label
fatteneder 1a2ac8f
rename trigger variable
fatteneder bdf3c1a
update ignore list
fatteneder e46f441
add missing BUILD exports
fatteneder 4f5f000
provide bash script as string for docker plugin command
fatteneder c10892f
fix an if condition
fatteneder b954379
can we use the step's command instead of docker's?
fatteneder 16f7be9
try without multiline strings
fatteneder 4ab79d4
try with cmd.exe if
fatteneder 0d9c02a
set diff-filter's target_branch option conditionally using environmen…
fatteneder 398dce6
use grep -E everywhere for compatability reasons
fatteneder 5ca0b2c
add an env var for the target branch
fatteneder f300c57
forward env vars to upload script
fatteneder 5456f8e
fix varname
fatteneder 809798b
also trigger build if PR gets merged
fatteneder 7627e90
Revert "forward env vars to upload script"
fatteneder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,24 @@ | |
# and only need to touch the webui configuration when we need to alter | ||
# something about the privileged steps. | ||
|
||
env: | ||
DIFF_FILTER_TARGET_BRANCH: "" | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. I guess this should be moved to this organisation before merge. |
||
name: "TRIGGER_BUILD" | ||
ignore: | ||
- "*.md" | ||
- ".*" | ||
- "julia.spdx.json" | ||
- "CITATION.*" | ||
- "typos.toml" | ||
target_branch: "${DIFF_FILTER_TARGET_BRANCH?}" | ||
- pr-labels_plugin: &pr-labels | ||
sv-oss/github-pr-labels#v0.0.2: | ||
publish-env-var: PULL_REQUEST_LABELS | ||
|
||
steps: | ||
- group: "Build" | ||
notify: | ||
|
@@ -33,35 +51,45 @@ steps: | |
# that this script doesn't suddenly break when a new patch release of Julia | ||
# is released. | ||
version: '1.10.6' | ||
- *diff-filter-build | ||
- *pr-labels | ||
commands: | | ||
### Launch Linux build jobs. | ||
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0) | ||
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0) | ||
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED})) | ||
### Launch Linux build jobs | ||
# Regular: | ||
GROUP="Build" \ | ||
ALLOW_FAIL="false" \ | ||
BUILD="$${BUILD}" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/build_linux.arches \ | ||
.buildkite/pipelines/main/platforms/build_linux.yml | ||
# PowerPC (only for Julia prior to 1.12): | ||
GROUP="Build" \ | ||
ALLOW_FAIL="false" \ | ||
BUILD="$${BUILD}" \ | ||
julia .buildkite/pipelines/main/platforms/launch_powerpc.jl \ | ||
.buildkite/pipelines/main/platforms/build_linux.powerpc.arches \ | ||
.buildkite/pipelines/main/platforms/build_linux.yml | ||
### Launch macOS build jobs: | ||
### Launch macOS packaging jobs | ||
GROUP="Build" \ | ||
ALLOW_FAIL="false" \ | ||
BUILD="$${BUILD}" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/build_macos.arches \ | ||
.buildkite/pipelines/main/platforms/build_macos.yml | ||
### Launch FreeBSD build jobs: | ||
GROUP="Build" \ | ||
ALLOW_FAIL="false" \ | ||
BUILD="$${BUILD}" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/build_freebsd.arches \ | ||
.buildkite/pipelines/main/platforms/build_freebsd.yml | ||
### Launch Windows build jobs: | ||
GROUP="Build" \ | ||
ALLOW_FAIL="false" \ | ||
BUILD="$${BUILD}" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/build_windows.arches \ | ||
.buildkite/pipelines/main/platforms/build_windows.yml | ||
|
@@ -79,17 +107,24 @@ steps: | |
- JuliaCI/external-buildkite#v1: | ||
version: "./.buildkite-external-version" | ||
repo_url: "https://github.com/JuliaCI/julia-buildkite" | ||
- *diff-filter-build | ||
- *pr-labels | ||
commands: | | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/analyzegc.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/doctest.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/pdf_docs/build_pdf_docs.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/embedding.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/trimming.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/llvmpasses.yml | ||
# buildkite-agent pipeline upload .buildkite/pipelines/main/misc/whitespace.yml # Currently runs in GitHub Actions instead of Buildkite | ||
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0) | ||
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0) | ||
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED})) | ||
if [[ $${BUILD} == 1 ]]; then | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/analyzegc.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/embedding.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/trimming.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/llvmpasses.yml | ||
# buildkite-agent pipeline upload .buildkite/pipelines/main/misc/whitespace.yml # Currently runs in GitHub Actions instead of Buildkite | ||
|
||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/sanitizers/asan.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/sanitizers/tsan.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/sanitizers/asan.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/sanitizers/tsan.yml | ||
fi | ||
agents: | ||
queue: "julia" | ||
os: "linux" | ||
|
@@ -103,37 +138,43 @@ steps: | |
- JuliaCI/external-buildkite#v1: | ||
version: "./.buildkite-external-version" | ||
repo_url: "https://github.com/JuliaCI/julia-buildkite" | ||
- *diff-filter-build | ||
- *pr-labels | ||
commands: | | ||
export ALLOW_FAIL="false" | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/gcext.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/test_revise.yml | ||
|
||
### Launch Linux test jobs. | ||
# Regular: | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_linux.arches \ | ||
.buildkite/pipelines/main/platforms/test_linux.yml | ||
# i686-linux-gnu: | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_linux.i686.arches \ | ||
.buildkite/pipelines/main/platforms/test_linux.i686.yml | ||
### Launch macOS test jobs: | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_macos.arches \ | ||
.buildkite/pipelines/main/platforms/test_macos.yml | ||
### Launch FreeBSD test jobs: | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_freebsd.arches \ | ||
.buildkite/pipelines/main/platforms/test_freebsd.yml | ||
### Launch Windows test jobs: | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_windows.arches \ | ||
.buildkite/pipelines/main/platforms/test_windows.yml | ||
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0) | ||
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0) | ||
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED})) | ||
if [[ $${BUILD} == 1 ]]; then | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/gcext.yml | ||
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/test_revise.yml | ||
### Launch Linux test jobs. | ||
# Regular: | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_linux.arches \ | ||
.buildkite/pipelines/main/platforms/test_linux.yml | ||
# i686-linux-gnu: | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_linux.i686.arches \ | ||
.buildkite/pipelines/main/platforms/test_linux.i686.yml | ||
### Launch macOS test jobs | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_macos.arches \ | ||
.buildkite/pipelines/main/platforms/test_macos.yml | ||
### Launch FreeBSD test jobs | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_freebsd.arches \ | ||
.buildkite/pipelines/main/platforms/test_freebsd.yml | ||
### Launch windows test jobs | ||
GROUP="Test" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_windows.arches \ | ||
.buildkite/pipelines/main/platforms/test_windows.yml | ||
fi | ||
agents: | ||
queue: "julia" | ||
os: "linux" | ||
|
@@ -144,15 +185,22 @@ steps: | |
- JuliaCI/external-buildkite#v1: | ||
version: "./.buildkite-external-version" | ||
repo_url: "https://github.com/JuliaCI/julia-buildkite" | ||
- *diff-filter-build | ||
- *pr-labels | ||
commands: | | ||
export ALLOW_FAIL="true" | ||
# Launch Linux allowed-to-fail build jobs: | ||
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0) | ||
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0) | ||
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED})) | ||
# Launch Linux allowed-to-fail build jobs | ||
GROUP="Allow Fail" \ | ||
BUILD="$${BUILD}" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/build_linux.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/build_linux.yml | ||
# Launch macOS allowed-to-fail build jobs: | ||
# Launch macOS allowed-to-fail build jobs | ||
GROUP="Allow Fail" \ | ||
BUILD="$${BUILD}" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/build_macos.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/build_macos.yml | ||
|
@@ -174,35 +222,41 @@ steps: | |
# that this script doesn't suddenly break when a new patch release of Julia | ||
# is released. | ||
version: '1.10.6' | ||
- *diff-filter-build | ||
- *pr-labels | ||
commands: | | ||
export ALLOW_FAIL="true" | ||
|
||
### Launch Linux allowed-to-fail test jobs. | ||
# Regular: | ||
GROUP="Allow Fail" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_linux.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_linux.yml | ||
# PowerPC (only for Julia prior to 1.12): | ||
GROUP="Test" \ | ||
julia .buildkite/pipelines/main/platforms/launch_powerpc.jl \ | ||
.buildkite/pipelines/main/platforms/test_linux.powerpc.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_linux.yml | ||
### Launch macOS allowed-to-fail test jobs: | ||
GROUP="Allow Fail" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_macos.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_macos.yml | ||
### Launch FreeBSD allowed-to-fail jobs: | ||
GROUP="Allow Fail" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_freebsd.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_freebsd.yml | ||
### Launch Windows allowed-to-fail test jobs: | ||
GROUP="Allow Fail" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_windows.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_windows.yml | ||
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0) | ||
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0) | ||
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED})) | ||
if [[ $${BUILD} == 1 ]]; then | ||
### Launch Linux allowed-to-fail test jobs. | ||
# Regular: | ||
GROUP="Allow Fail" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_linux.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_linux.yml | ||
# PowerPC (only for Julia prior to 1.12): | ||
GROUP="Test" \ | ||
julia .buildkite/pipelines/main/platforms/launch_powerpc.jl \ | ||
.buildkite/pipelines/main/platforms/test_linux.powerpc.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_linux.yml | ||
### Launch macOS allowed-to-fail test jobs | ||
GROUP="Allow Fail" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_macos.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_macos.yml | ||
### Launch FreeBSD allowed-to-fail jobs | ||
GROUP="Allow Fail" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_freebsd.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_freebsd.yml | ||
### Launch windows allowed-to-fail test jobs | ||
GROUP="Allow Fail" \ | ||
bash .buildkite/utilities/arches_pipeline_upload.sh \ | ||
.buildkite/pipelines/main/platforms/test_windows.soft_fail.arches \ | ||
.buildkite/pipelines/main/platforms/test_windows.yml | ||
fi | ||
agents: | ||
queue: "julia" | ||
os: "linux" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thediff-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
.