File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,9 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
10
10
Serialization = " 9e88b42a-f829-5b0c-bbe9-9e923198166b"
11
11
StaticArrays = " 90137ffa-7385-5640-81b9-e52037218182"
12
12
Test = " 8dfed614-e22c-5e08-85e1-65c5234f0b40"
13
+
14
+ [extras ]
15
+ Pkg = " 44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
16
+
17
+ [targets ]
18
+ test = [" Pkg" ]
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, branch= nothing )
11
+ mktempdir () do devdir
12
+ withenv (" JULIA_PKG_DEVDIR" => devdir) do
13
+ # try to install from the same branch of GPUArrays
14
+ try
15
+ if branch === nothing
16
+ branch = chomp (read (` git -C $(@__DIR__ ) rev-parse --abbrev-ref HEAD` , String))
17
+ branch == " HEAD" && error (" in detached HEAD state" )
18
+ end
19
+ Pkg. add (PackageSpec (name= package, rev= String (branch)))
20
+ @info " Installed $package from $branch branch"
21
+ catch ex
22
+ @warn " Could not install $package from same branch as GPUArrays, trying master branch" exception= ex
23
+ Pkg. add (PackageSpec (name= package, rev= " master" ))
24
+ end
25
+
26
+ Pkg. test (package)
27
+ end
28
+ end
29
+ end
30
+
31
+ if haskey (ENV , " GITLAB_CI" )
32
+ branch = ENV [" CI_COMMIT_REF_NAME" ]
33
+ @testset " CuArray" begin
34
+ test_package (" CuArrays" , branch)
35
+ end
36
+ end
You can’t perform that action at this time.
0 commit comments