diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 7ee46c61..cbedf79b 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -9,7 +9,7 @@ steps: - "src/**" - "ext/HierarchicalEOM_CUDAExt.jl" - "test/runtests.jl" - - "test/CUDAExt.jl" + - "test/gpu/**" - "Project.toml" target: ".buildkite/CUDA_Ext.yml" agents: diff --git a/Project.toml b/Project.toml index a2590e6e..389d256f 100644 --- a/Project.toml +++ b/Project.toml @@ -26,9 +26,11 @@ CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" HierarchicalEOM_CUDAExt = "CUDA" [compat] +Aqua = "0.8" CUDA = "5" DiffEqCallbacks = "2 - 4" FastExpm = "1.1" +JET = "0.9" JLD2 = "0.4.31 - 0.5" LinearAlgebra = "1" LinearSolve = "2.4.2 - 2" @@ -45,7 +47,9 @@ Test = "1" julia = "1.10" [extras] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test"] +test = ["Aqua", "JET", "Test"] diff --git a/test/code_quality.jl b/test/code_quality.jl index 2e42500e..55a9c21b 100644 --- a/test/code_quality.jl +++ b/test/code_quality.jl @@ -1,6 +1,3 @@ -import Aqua -import JET - @testset "Code quality" verbose = true begin @testset "Aqua.jl" begin Aqua.test_all(HierarchicalEOM; ambiguities = false) diff --git a/test/CUDAExt.jl b/test/gpu/CUDAExt.jl similarity index 97% rename from test/CUDAExt.jl rename to test/gpu/CUDAExt.jl index 18bb8e07..db0ff4c5 100644 --- a/test/CUDAExt.jl +++ b/test/gpu/CUDAExt.jl @@ -1,9 +1,3 @@ -using LinearSolve -using CUDA -CUDA.allowscalar(false) # Avoid unexpected scalar indexing - -CUDA.versioninfo() - CUDA.@time @testset "CUDA Extension" begin # re-define the bath (make the matrix smaller) diff --git a/test/gpu/Project.toml b/test/gpu/Project.toml new file mode 100644 index 00000000..63ad2aa7 --- /dev/null +++ b/test/gpu/Project.toml @@ -0,0 +1,6 @@ +[deps] +CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" +QuantumToolbox = "6c2fb7c5-b903-41d2-bc5e-5a7c320b9fab" + +[compat] +CUDA = "5" \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index db4316ca..ef3d1904 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,14 +1,10 @@ using Pkg using Test -using HierarchicalEOM -import JLD2: jldopen const GROUP = get(ENV, "GROUP", "All") const testdir = dirname(@__FILE__) -include("test_utils.jl") - # Put Core tests in alphabetical order core_tests = [ "ADOs.jl", @@ -28,22 +24,37 @@ core_tests = [ ] if (GROUP == "All") || (GROUP == "Code_Quality") - Pkg.add(["Aqua", "JET"]) + using HierarchicalEOM + using Aqua, JET - HierarchicalEOM.about() include(joinpath(testdir, "code_quality.jl")) end if (GROUP == "All") || (GROUP == "Core") - GROUP == "All" ? nothing : HierarchicalEOM.about() + using HierarchicalEOM + import JLD2: jldopen + + HierarchicalEOM.about() + + include(joinpath(testdir, "test_utils.jl")) + for test in core_tests include(joinpath(testdir, test)) end end if (GROUP == "CUDA_Ext")# || (GROUP == "All") - Pkg.add("CUDA") + Pkg.activate("gpu") + Pkg.develop(PackageSpec(path = dirname(@__DIR__))) + Pkg.instantiate() + + using HierarchicalEOM + using CUDA, LinearSolve + CUDA.allowscalar(false) # Avoid unexpected scalar indexing HierarchicalEOM.about() - include(joinpath(testdir, "CUDAExt.jl")) + CUDA.versioninfo() + + include(joinpath(testdir, "test_utils.jl")) + include(joinpath(testdir, "gpu", "CUDAExt.jl")) end