File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 1
1
using GPUArrays, Test
2
2
using GPUArrays. TestSuite
3
3
4
+ using Pkg
4
5
5
- @testset " Julia reference implementation: " begin
6
+ @testset " JLArray " begin
6
7
GPUArrays. test (JLArray)
7
8
end
9
+
10
+ function test_package (package)
11
+ mktempdir () do devdir
12
+ withenv (" JULIA_PKG_DEVDIR" => devdir) do
13
+ # try to install from the same branch of GPUArrays
14
+ try
15
+ branch = chomp (read (` git -C $(@__DIR__ ) rev-parse --abbrev-ref HEAD` , String))
16
+ Pkg. add (PackageSpec (name= package, rev= String (branch)))
17
+ @info " Installed $package from $branch branch"
18
+ catch ex
19
+ @warn " Could not install $package from same branch as GPUArrays, trying master branch" exception= ex
20
+ Pkg. add (PackageSpec (name= package, rev= " master" ))
21
+ end
22
+
23
+ Pkg. test (package)
24
+ end
25
+ end
26
+ end
27
+
28
+ if haskey (ENV , " GITLAB_CI" )
29
+ @testset " CuArray" begin
30
+ test_package (" CuArrays" )
31
+ end
32
+ end
You can’t perform that action at this time.
0 commit comments