Skip to content

Commit

Permalink
Try using multiple workers to improve CI times
Browse files Browse the repository at this point in the history
Also see if this helps with the OOM errors we've been getting, as the
code generated should be split across multiple workers.
  • Loading branch information
staticfloat committed Mar 15, 2022
1 parent e9954bd commit 47d4902
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,20 @@ end
end
end

# Run all the LinearAlgebra stdlib tests
include(joinpath(Sys.STDLIB, "LinearAlgebra", "test", "runtests.jl"))
# Run all the LinearAlgebra stdlib tests, but with MKL. We still
# use `Base.runtests()` to get multithreaded, distributed execution
# to cut down on CI times, and also to restart workers that trip over
# the testing RSS limit. In order for distributed workers to use MKL,
# we'll modify the test source code so that it imports MKL:
mktempdir() do dir
cp(joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test"), dir; force=true)

# Prepend `using MKL` to `testdefs.jl`, so that all test workers load MKL
testdefs_content = String(read(joinpath(dir, "testdefs.jl")))
open(joinpath(dir, "testdefs.jl"), write=true) do io
println(io, "using MKL")
println(io, testdefs_content)
end

run(`$(Base.julia_cmd()) --project=$(Base.active_project()) $(dir)/runtests.jl LinearAlgebra`)
end

0 comments on commit 47d4902

Please sign in to comment.