Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 15 additions & 10 deletions .buildkite/downstream.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Tests of the packages that build on GPUCompiler, uploaded by `launch.sh`.
#
# The Julia version and the test selection of every step can be changed with the `[julia X]`
# and `[test_args ...]` commit message tags, which `launch.sh` exports for interpolation here.
#
# Each step's `if_changed` lists the files that can affect that package: everything in
# `src/` and `ext/`, `Project.toml` and the CI configuration, except the other back-ends'
# target files. The `if:` conditions implement the commit message tags documented in the
Expand All @@ -8,7 +11,7 @@ steps:
- label: "CUDA.jl"
plugins:
- JuliaCI/julia#v1:
version: "1.13"
version: "${DOWNSTREAM_JULIA:-1.13}"
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
Expand All @@ -20,7 +23,7 @@ steps:

julia -e 'println("+++ :julia: Running tests")
using Pkg
Pkg.test("CUDA"; coverage=true)'
Pkg.test("CUDA"; coverage=true, test_args=split(ENV["DOWNSTREAM_TEST_ARGS"]))'
agents:
queue: "cuda"
if_changed:
Expand All @@ -42,7 +45,7 @@ steps:
- label: "oneAPI.jl"
plugins:
- JuliaCI/julia#v1:
version: "1.13"
version: "${DOWNSTREAM_JULIA:-1.13}"
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
Expand All @@ -57,7 +60,7 @@ steps:

julia -e 'println("+++ :julia: Running tests")
using Pkg
Pkg.test("oneAPI"; coverage=true)'
Pkg.test("oneAPI"; coverage=true, test_args=split(ENV["DOWNSTREAM_TEST_ARGS"]))'
agents:
queue: "oneapi"
if_changed:
Expand All @@ -75,7 +78,7 @@ steps:
- label: "AMDGPU.jl"
plugins:
- JuliaCI/julia#v1:
version: "1.13"
version: "${DOWNSTREAM_JULIA:-1.13}"
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
Expand All @@ -86,7 +89,7 @@ steps:

julia -e 'println("+++ :julia: Running tests")
using Pkg
Pkg.test("AMDGPU"; coverage=true)'
Pkg.test("AMDGPU"; coverage=true, test_args=split(ENV["DOWNSTREAM_TEST_ARGS"]))'
agents:
queue: "rocm"
if_changed:
Expand All @@ -104,7 +107,7 @@ steps:
- label: "Metal.jl"
plugins:
- JuliaCI/julia#v1:
version: "1.13"
version: "${DOWNSTREAM_JULIA:-1.13}"
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
Expand All @@ -126,7 +129,7 @@ steps:

julia -e 'println("+++ :julia: Running tests")
using Pkg
Pkg.test("Metal"; coverage=true)'
Pkg.test("Metal"; coverage=true, test_args=split(ENV["DOWNSTREAM_TEST_ARGS"]))'
agents:
queue: "metal"
if_changed:
Expand All @@ -144,7 +147,7 @@ steps:
- label: "OpenCL.jl"
plugins:
- JuliaCI/julia#v1:
version: "1.13"
version: "${DOWNSTREAM_JULIA:-1.13}"
- JuliaCI/julia-coverage#v1:
codecov: true
command: |
Expand All @@ -156,7 +159,7 @@ steps:

julia -e 'println("+++ :julia: Running tests")
using Pkg
Pkg.test("OpenCL"; coverage=true)'
Pkg.test("OpenCL"; coverage=true, test_args=split(ENV["DOWNSTREAM_TEST_ARGS"]))'
agents:
# XXX: not on "juliaecosystem" because those workers don't have libc-dev
# see JuliaGPU/OpenCL.jl#303
Expand All @@ -175,3 +178,5 @@ steps:

env:
JULIA_PKG_SERVER: "" # it often struggles with our large artifacts
# set by `launch.sh` from the `[test_args ...]` commit message tag
DOWNSTREAM_TEST_ARGS: "${DOWNSTREAM_TEST_ARGS:-}"
12 changes: 12 additions & 0 deletions .buildkite/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,17 @@ elif [[ "${BUILDKITE_MESSAGE:-}" =~ \[(only\ |run\ all\]) ]]; then
export BUILDKITE_AGENT_APPLY_IF_CHANGED=false
fi

# `[julia X]` and `[test_args ...]` select the Julia version and the tests (passed as
# `test_args` to `Pkg.test`) of the downstream steps, e.g. `[julia nightly]` or
# `[test_args core/codegen gpuarrays/broadcasting]`.
if [[ "${BUILDKITE_MESSAGE:-}" =~ \[julia\ ([^]]+)\] ]]; then
export DOWNSTREAM_JULIA="${BASH_REMATCH[1]}"
echo "Testing downstream packages on Julia $DOWNSTREAM_JULIA"
fi
if [[ "${BUILDKITE_MESSAGE:-}" =~ \[test_args\ ([^]]+)\] ]]; then
export DOWNSTREAM_TEST_ARGS="${BASH_REMATCH[1]}"
echo "Running downstream tests: $DOWNSTREAM_TEST_ARGS"
fi

# fetch the base branch first, as a stale local ref would widen the diff
buildkite-agent pipeline upload --fetch-diff-base .buildkite/downstream.yml
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ last commit of a pull request:
| `[skip amdgpu]` | Do not test the listed back-ends, even when the changes affect them. |
| `[run all]` | Test all back-ends, regardless of the files changed. |
| `[skip tests]` | Do not test any back-end. |
| `[julia nightly]` | Test the back-ends on the given Julia version (default: the latest release), e.g. `nightly` or `1.10`. |
| `[test_args core]` | Only run the listed tests of each back-end, passed as `test_args` to `Pkg.test`, e.g. `[test_args core/codegen gpuarrays/broadcasting]`. |

Back-ends are named `cuda`, `amdgpu`, `metal`, `oneapi` and `opencl` (all lowercase), or by
their target: `ptx` for CUDA.jl, `gcn` for AMDGPU.jl, and `spirv` for both oneAPI.jl and
Expand Down
Loading