Skip to content

Commit 16fe42d

Browse files
committed
Test subpackages from within the main CUDA.jl environment.
[skip cuda] [skip julia]
1 parent 4f12f01 commit 16fe42d

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

.buildkite/pipeline.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -107,27 +107,25 @@ steps:
107107
!build.pull_request.draft
108108
timeout_in_minutes: 120
109109
commands: |
110-
julia -e '
110+
julia --project -e '
111111
using Pkg
112-
Pkg.activate(joinpath(pwd(), "lib", lowercase("{{matrix.package}}")))
113112
114113
println("--- :julia: Instantiating project")
115114
withenv("JULIA_PKG_PRECOMPILE_AUTO" => 0) do
116-
pkgs = [PackageSpec(path=pwd())]
115+
Pkg.instantiate()
116+
117+
pkgs = [PackageSpec(path=joinpath(pwd(), "lib", lowercase("{{matrix.package}}")))]
117118
if "{{matrix.package}}" == "cuTensorNet"
118119
# cuTensorNet depends on a development version of cuTENSOR
119120
push!(pkgs, PackageSpec(path=joinpath(pwd(), "lib", "cutensor")))
120121
end
121122
Pkg.develop(pkgs)
122-
Pkg.instantiate()
123123
124-
Pkg.add("CUDA_Runtime_jll")
125-
write(joinpath(pwd(), "lib", lowercase("{{matrix.package}}"), "LocalPreferences.toml"),
126-
"[CUDA_Runtime_jll]\nversion = \"{{matrix.cuda}}\"")
124+
write("LocalPreferences.toml", "[CUDA_Runtime_jll]\nversion = \"{{matrix.cuda}}\"")
127125
end
128126
129127
println("+++ :julia: Running tests")
130-
Pkg.test(coverage=true)'
128+
Pkg.test("{{matrix.package}}"; coverage=true)'
131129
132130
- group: ":telescope: Downstream"
133131
depends_on: "cuda"
@@ -142,25 +140,21 @@ steps:
142140
- lib
143141
- examples
144142
command: |
145-
julia -e '
143+
julia --project -e '
146144
using Pkg
147145
148146
println("--- :julia: Instantiating project")
149147
withenv("JULIA_PKG_PRECOMPILE_AUTO" => 0) do
150-
Pkg.develop("NNlibCUDA")
151-
Pkg.activate("NNlibCUDA")
152-
153-
Pkg.develop([PackageSpec(path=pwd()),
154-
PackageSpec(path=joinpath(pwd(), "lib", "cudnn"))])
155148
Pkg.instantiate()
156149
157-
Pkg.add("CUDA_Runtime_jll")
158-
write(joinpath(Pkg.devdir(), "NNlibCUDA", "LocalPreferences.toml"),
159-
"[CUDA_Runtime_jll]\nversion = \"12.0\"")
150+
Pkg.develop("NNlibCUDA")
151+
Pkg.develop(path=joinpath(pwd(), "lib", "cudnn"))
152+
153+
write("LocalPreferences.toml", "[CUDA_Runtime_jll]\nversion = \"12.0\"")
160154
end
161155
162156
println("+++ :julia: Running tests")
163-
Pkg.test(coverage=true)'
157+
Pkg.test("NNlibCUDA"; coverage=true)'
164158
agents:
165159
queue: "juliagpu"
166160
cuda: "*"
@@ -292,10 +286,8 @@ steps:
292286
ENV["CODESPEED_ENVIRONMENT"] = ENV["BUILDKITE_AGENT_NAME"]
293287
294288
println("--- :julia: Instantiating project")
295-
Pkg.resolve()
296289
Pkg.instantiate()
297290
Pkg.activate("perf")
298-
Pkg.resolve()
299291
Pkg.instantiate()
300292
push!(LOAD_PATH, @__DIR__)
301293

0 commit comments

Comments
 (0)