diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 000000000..6c414a31b --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,44 @@ +env: + SECRET_CODECOV_TOKEN: "IAcIDwEfSDEfjfVOQ5VI9apT8mLPcJDIRoZa+D0GvUB6HyEjemG+mZD8uzLbQ0OD7cokQyIO+XpuGCh6wzGCb1Ma2xnqXgTXAKLkMceVm/RVlA80vlo0kjeBjx1h2j2oQeXTsTIt+EWAeKgw3bgZ69vdATgG52JY/z9ia/OhJ7LFMMkEQvXXiKMp0AU5JC+nl/HHgLARb70qqCuPEdCPZa2LZzRfr4D02Rf3/UqAcPXj7KYzw0sxD8R+g6onvqmE2E3OkmpGPQgFXrGrYw9p+PUJqjeXSkZrC1pe1wDh8ge4YXJhHm44M+9XaPlK4IYGA0PJbfaFGMpIhN+5GJlauQ==;U2FsdGVkX1+F3w+O36dLAUvzVtMF7G+WAdqcL4pcsE/vtyTsjXZvpAv/iT1H32gNRNE9f7OjS9pke092rCDZpw==" + +steps: + - label: "Julia {{matrix.julia}} -- CUDA" + plugins: + - JuliaCI/julia#v1: + version: "{{matrix.julia}}" + - JuliaCI/julia-test#v1: ~ + - JuliaCI/julia-coverage#v1: + dirs: + - src + - ext + agents: + queue: "juliagpu" + cuda: "*" + if: build.message !~ /\[skip tests\]/ + timeout_in_minutes: 30 + matrix: + setup: + julia: + - "1.10" + - "1.11" + + - label: "Julia {{matrix.julia}} -- AMDGPU" + plugins: + - JuliaCI/julia#v1: + version: "{{matrix.julia}}" + - JuliaCI/julia-test#v1: ~ + - JuliaCI/julia-coverage#v1: + dirs: + - src + - ext + agents: + queue: "juliagpu" + rocm: "*" + rocmgpu: "*" + if: build.message !~ /\[skip tests\]/ + timeout_in_minutes: 30 + matrix: + setup: + julia: + - "1.10" + - "1.11" diff --git a/test/runtests.jl b/test/runtests.jl index 9e44b8a3a..9fafa1d9f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -15,6 +15,10 @@ const TK = TensorKit Random.seed!(1234) +# don't run all tests on GPU, only the GPU +# specific ones +is_buildkite = get(ENV, "BUILDKITE", "false") == "true" + smallset(::Type{I}) where {I<:Sector} = take(values(I), 5) function smallset(::Type{ProductSector{Tuple{I1,I2}}}) where {I1,I2} iter = product(smallset(I1), smallset(I2)) @@ -112,24 +116,38 @@ VSU₂U₁ = (Vect[SU2Irrep ⊠ U1Irrep]((0, 0) => 1, (1 // 2, -1) => 1), # ℂ[SU3Irrep]((1, 0, 0) => 1, (2, 0, 0) => 1), # ℂ[SU3Irrep]((0, 0, 0) => 1, (1, 0, 0) => 1, (1, 1, 0) => 1)') -Ti = time() -include("fusiontrees.jl") -include("spaces.jl") -include("tensors.jl") -include("diagonal.jl") -include("planar.jl") -# TODO: remove once we know AD is slow on macOS CI -if !(Sys.isapple() && get(ENV, "CI", "false") == "true") && isempty(VERSION.prerelease) - include("ad.jl") -end -include("bugfixes.jl") -Tf = time() -printstyled("Finished all tests in ", - string(round((Tf - Ti) / 60; sigdigits=3)), - " minutes."; bold=true, color=Base.info_color()) -println() - -@testset "Aqua" verbose = true begin - using Aqua - Aqua.test_all(TensorKit) +if !is_buildkite + Ti = time() + include("fusiontrees.jl") + include("spaces.jl") + include("tensors.jl") + include("diagonal.jl") + include("planar.jl") + # TODO: remove once we know AD is slow on macOS CI + if !(Sys.isapple() && get(ENV, "CI", "false") == "true") && isempty(VERSION.prerelease) + include("ad.jl") + end + include("bugfixes.jl") + Tf = time() + printstyled("Finished all tests in ", + string(round((Tf - Ti) / 60; sigdigits=3)), + " minutes."; bold=true, color=Base.info_color()) + println() + @testset "Aqua" verbose = true begin + using Aqua + Aqua.test_all(TensorKit) + end +else + Ti = time() + #=using CUDA + if CUDA.functional() + end + using AMDGPU + if AMDGPU.functional() + end=# + Tf = time() + printstyled("Finished all GPU tests in ", + string(round((Tf - Ti) / 60; sigdigits=3)), + " minutes."; bold=true, color=Base.info_color()) + println() end