From 1b6fad71f0bb1fa23e8ff5bd39f08f61fd04840a Mon Sep 17 00:00:00 2001 From: "Guillaume Dalle (bot)" <185490550+gdalle-bot@users.noreply.github.com> Date: Wed, 28 Oct 2026 12:38:43 +0000 Subject: [PATCH] test: skip SuiteSparse under PkgEval and install GPU deps on demand - Skip `suitesparse.jl` when `PKGEVAL=true`, since MatrixDepot cannot download matrices in the sandbox - Remove AMDGPU, CUDA and cuSPARSE from the test environment and `Pkg.add` them only for the GPU test group (compat bounds come from the weakdeps in the main Project.toml) Closes #356 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NohyV4La3BYBZ9XYQEGrfw --- test/Project.toml | 4 +--- test/runtests.jl | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/test/Project.toml b/test/Project.toml index 49e6de5f..50c15323 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,13 +1,11 @@ [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" -CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" Chairmarks = "0ca39b1e-fe0b-4e98-acfc-b1656634c4de" CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" @@ -19,12 +17,12 @@ JuMP = "4076af6c-e467-56ae-b986-b466b2749572" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MatrixDepot = "b51810bb-c9f3-55da-ae3c-350fc1fbce05" MiniZinc = "a7f392d2-6c35-496e-b8cc-0974fbfcbf91" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -cuSPARSE = "b26da814-b3bc-49ef-b0ee-c816305aa060" [compat] MiniZinc = "0.3.17" diff --git a/test/runtests.jl b/test/runtests.jl index 4223ab8e..1e730ee5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,3 +1,10 @@ +using Pkg + +# GPU packages are only installed for the GPU test group, so that CPU-only runs +# (including PkgEval) never need to precompile them +const GPU_TESTS = get(ENV, "JULIA_SMC_TEST_GROUP", nothing) == "GPU" +GPU_TESTS && Pkg.add(["AMDGPU", "CUDA", "cuSPARSE"]) + using Aqua using Documenter using JET @@ -8,7 +15,7 @@ using Test using Colors: Colors @testset verbose = true "SparseMatrixColorings" begin - if get(ENV, "JULIA_SMC_TEST_GROUP", nothing) == "GPU" + if GPU_TESTS @testset "CUDA" begin using CUDA, cuSPARSE if CUDA.functional() @@ -90,8 +97,11 @@ using Colors: Colors @testset "Instances with known colorings" begin include("theory.jl") end - @testset "SuiteSparse" begin - include("suitesparse.jl") + # MatrixDepot downloads are unavailable in the PkgEval sandbox + if get(ENV, "PKGEVAL", "false") != "true" + @testset "SuiteSparse" begin + include("suitesparse.jl") + end end end @testset verbose = true "Performance" begin