Skip to content

Commit

Permalink
optimize precompilation during runtests
Browse files Browse the repository at this point in the history
  • Loading branch information
ytdHuang committed Nov 4, 2024
1 parent c63e627 commit f4187be
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ steps:
- "src/**"
- "ext/QuantumToolboxCUDAExt.jl"
- "test/runtests.jl"
- "test/ext-test/cuda_ext.jl"
- "test/ext-test/gpu/**"
- "Project.toml"
target: ".buildkite/CUDA_Ext.yml"
agents:
Expand Down
6 changes: 5 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
QuantumToolboxCUDAExt = "CUDA"

[compat]
Aqua = "0.8"
ArrayInterface = "6, 7"
CUDA = "5"
DiffEqBase = "6"
Expand All @@ -42,6 +43,7 @@ Distributed = "1"
FFTW = "1.5"
Graphs = "1.7"
IncompleteLU = "0.2"
JET = "0.9"
LinearAlgebra = "1"
LinearSolve = "2"
OrdinaryDiffEqCore = "1"
Expand All @@ -59,8 +61,10 @@ Test = "1"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Aqua", "JET", "Test"]
6 changes: 6 additions & 0 deletions test/ext-test/gpu/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
QuantumToolbox = "6c2fb7c5-b903-41d2-bc5e-5a7c320b9fab"

[compat]
CUDA = "5"
File renamed without changes.
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ using QuantumToolbox
using QuantumToolbox: position, momentum
using Random
using SciMLOperators
import SciMLOperators: ScaledOperator

const GROUP = get(ENV, "GROUP", "All")

Expand Down Expand Up @@ -32,7 +31,6 @@ core_tests = [
]

if (GROUP == "All") || (GROUP == "Code-Quality")
Pkg.add(["Aqua", "JET"])
include(joinpath(testdir, "core-test", "code_quality.jl"))
end

Expand All @@ -45,6 +43,8 @@ if (GROUP == "All") || (GROUP == "Core")
end

if (GROUP == "CUDA_Ext")# || (GROUP == "All")
Pkg.add("CUDA")
include(joinpath(testdir, "ext-test", "cuda_ext.jl"))
Pkg.activate("gpu")
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
Pkg.instantiate()
include(joinpath(testdir, "ext-test", "gpu", "cuda_ext.jl"))
end

0 comments on commit f4187be

Please sign in to comment.