Skip to content

Commit c29dc5e

Browse files
committed
Switch CI to DistributedNext and threads
1 parent 8dc94b6 commit c29dc5e

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.buildkite/pipeline.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ steps:
2727
- JuliaCI/julia#v1:
2828
version: "1.9"
2929
- JuliaCI/julia-test#v1:
30-
julia_args: "--threads=1"
30+
julia_args: "--threads=2"
3131
- JuliaCI/julia-coverage#v1:
3232
codecov: true
33+
env:
34+
JULIA_DAGGER_DISTRIBUTED_CHOICE: "DistributedNext"
35+
JULIA_NUM_THREADS: "2"
3336

3437
- label: Julia 1.10
3538
timeout_in_minutes: 90

src/Dagger.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,14 @@ function __init__()
204204
catch err
205205
@warn "Error parsing JULIA_DAGGER_DEBUG" exception=err
206206
end
207+
208+
# Enable Distributed/DistributedNext, if specified
209+
if haskey(ENV, "JULIA_DAGGER_DISTRIBUTED_CHOICE")
210+
choice = ENV["JULIA_DAGGER_DISTRIBUTED_CHOICE"]
211+
if choice != @load_preference("distributed-package")
212+
set_distributed_package!(choice)
213+
end
214+
end
207215
end
208216

209217
end # module

test/runtests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ all_test_names = map(test -> replace(last(test), ".jl"=>""), tests)
5454

5555
additional_workers::Int = 3
5656

57+
if haskey(ENV, "JULIA_DAGGER_DISTRIBUTED_CHOICE")
58+
choice = ENV["JULIA_DAGGER_DISTRIBUTED_CHOICE"]
59+
@assert choice == @load_preference("distributed-package") "Please reload Julia to switch to $choice distributed backend"
60+
end
61+
5762
if PROGRAM_FILE != "" && realpath(PROGRAM_FILE) == @__FILE__
5863
pushfirst!(LOAD_PATH, @__DIR__)
5964
pushfirst!(LOAD_PATH, joinpath(@__DIR__, ".."))

0 commit comments

Comments
 (0)