Skip to content

Commit 9cc0ea3

Browse files
Use JuliaGPU's GitLab CI setup
1 parent a7618c4 commit 9cc0ea3

File tree

5 files changed

+29
-62
lines changed

5 files changed

+29
-62
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.DS_Store
2-
/Manifest.toml
2+
Manifest.toml
33
/dev/

.gitlab-ci.yml

Lines changed: 16 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,16 @@
1-
image: "julia:1"
2-
3-
variables:
4-
JULIA_DEPOT_PATH: "$CI_PROJECT_DIR/.julia/"
5-
JULIA_NUM_THREADS: '4'
6-
7-
cache:
8-
paths:
9-
- .julia/
10-
11-
stages:
12-
- build
13-
- test
14-
15-
build:
16-
stage: build
17-
tags:
18-
- 'p6000'
19-
script:
20-
- curl https://julialang-s3.julialang.org/bin/linux/x64/1.3/julia-1.3.0-linux-x86_64.tar.gz -o julia.tar.gz
21-
- unp julia.tar.gz
22-
- export PATH="$(pwd)/julia-1.3.0/bin:$PATH"
23-
- julia -e "using InteractiveUtils;
24-
versioninfo()"
25-
- julia --project -e "using Pkg; Pkg.build(); using SparseDiffTools"
26-
only:
27-
- master
28-
- tags
29-
- external
30-
- pushes
31-
artifacts:
32-
untracked: true
33-
paths:
34-
- .julia/**/*
35-
- julia-1.3.0/**/*
36-
37-
test-GPU:
38-
stage: test
39-
tags:
40-
- 'p6000'
41-
dependencies:
42-
- build
43-
variables:
44-
GROUP: "GPU"
45-
script:
46-
- export PATH="$(pwd)/julia-1.3.0/bin:$PATH"
47-
- julia -e "using InteractiveUtils;
48-
versioninfo()"
49-
- julia --project -e "using Pkg; Pkg.add(\"CuArrays\");
50-
Pkg.test(\"SparseDiffTools\"; coverage=true);"
51-
only:
52-
- master
53-
- tags
54-
- external
55-
- pushes
56-
artifacts:
57-
untracked: true
58-
paths:
59-
- .julia/**/*
60-
- julia-1.3.0/**/*
1+
include: https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v6.yml
2+
3+
variables:
4+
JULIA_NUM_THREADS: 4
5+
6+
.base:
7+
extends:
8+
- .julia:1.4
9+
- .test
10+
tags:
11+
- nvidia
12+
13+
test-GPU:
14+
extends: .base
15+
variables:
16+
GROUP: GPU

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ julia = "1.2"
3232
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
3333
BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0"
3434
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
35+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
3536
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3637
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
3738
SparsityDetection = "684fba80-ace3-11e9-3d08-3bc7ed6f96df"
@@ -40,4 +41,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4041
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
4142

4243
[targets]
43-
test = ["Test", "BandedMatrices", "BlockBandedMatrices", "IterativeSolvers", "Random", "SafeTestsets", "Zygote", "SparsityDetection", "StaticArrays"]
44+
test = ["Test", "BandedMatrices", "BlockBandedMatrices", "IterativeSolvers", "Pkg", "Random", "SafeTestsets", "Zygote", "SparsityDetection", "StaticArrays"]

test/gpu/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[deps]
2+
CuArrays = "3a865a2d-5b23-5a0f-bc46-62713ec82fae"

test/runtests.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
using Pkg
12
using SafeTestsets
23

34
const GROUP = get(ENV, "GROUP", "All")
45
const is_APPVEYOR = ( Sys.iswindows() && haskey(ENV,"APPVEYOR") )
56
const is_TRAVIS = haskey(ENV,"TRAVIS")
67

8+
function activate_gpu_env()
9+
Pkg.activate("gpu")
10+
Pkg.develop(PackageSpec(path=dirname(@__DIR__)))
11+
Pkg.instantiate()
12+
end
13+
714
if GROUP == "All"
815
@time @safetestset "Exact coloring via contraction" begin include("test_contraction.jl") end
916
@time @safetestset "Greedy distance-1 coloring" begin include("test_greedy_d1.jl") end
@@ -17,5 +24,6 @@ if GROUP == "All"
1724
end
1825

1926
if GROUP == "GPU"
27+
activate_gpu_env()
2028
@time @safetestset "GPU AD" begin include("test_gpu_ad.jl") end
2129
end

0 commit comments

Comments
 (0)