-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
178 lines (155 loc) · 3.43 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#default image (docker best practices advice against using :latest tags, be advised)
image: gcc:7
stages:
- build
- test
#
## stage: build
#
.job_build_template: &build_cpu_tdef
stage: build
variables:
version: "3.7"
build: "2"
before_script:
- wget https://cmake.org/files/v$version/cmake-$version.$build-Linux-x86_64.sh
- sh ./cmake-$version.$build-Linux-x86_64.sh --prefix=/usr/local --skip-license
script:
- mkdir build
- cd build
- cmake ../C -DENABLE_ERROR_INJECTION=ON
- make
- make install
tags:
- cpu
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}_build"
when: on_success
expire_in: 1h
paths:
- build/MemoryReliability
dependencies: []
.job_build_cuda_template: &build_gpu_tdef
stage: build
variables:
version: "3.7"
build: "2"
before_script:
- apt update && apt install -y --no-install-recommends wget ca-certificates
- wget https://cmake.org/files/v$version/cmake-$version.$build-Linux-x86_64.sh
- sh ./cmake-$version.$build-Linux-x86_64.sh --prefix=/usr/local --skip-license
script:
- mkdir build
- cd build
- cmake ../C -DENABLE_ERROR_INJECTION=ON -DENABLE_CUDA=ON
- make
- make install
tags:
- gpu
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}_build"
when: on_success
expire_in: 1h
paths:
- build/MemoryReliability
dependencies: []
build:gcc-7:
image: gcc:7
<<: *build_cpu_tdef
build:gcc-6:
image: gcc:6
<<: *build_cpu_tdef
build:gcc-5:
image: gcc:5
<<: *build_cpu_tdef
build:gcc-4:
image: gcc:4
<<: *build_cpu_tdef
build:cuda-8:
image: nvidia/cuda:8.0-devel
<<: *build_gpu_tdef
build:cuda-9:
image: nvidia/cuda:9.0-devel
<<: *build_gpu_tdef
#
## stage: test
#
##
## WARNING: MemoryReliability requires 'msr' kernel module!
##
.job_test__cpu_template: &test_cpu_tdef
stage: test
before_script:
- apt update
- apt install -y --no-install-recommends kmod
- lsmod | grep msr
- ls -la /dev/cpu/
- ls -la /usr/local
script:
- build/MemoryReliability -d --cpu -m 1024 -s 1 -o output.log -e output.err
- sleep 40
- build/MemoryReliability -c
- cat output.log
- cat output.err
tags:
- cpu
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}_test"
when: on_success
expire_in: 1h
paths:
- output.log
- output.err
.job_test_gpu_template: &test_gpu_tdef
stage: test
before_script:
- apt update
- apt install -y --no-install-recommends kmod
- lsmod | grep msr
- ls -la /dev/cpu/
- ls -la /usr/local
script:
- build/MemoryReliability -d --gpu -m 1024 -s 1 -o output.log -e output.err
- sleep 40
- build/MemoryReliability -c
- cat output.log
- cat output.err
tags:
- gpu
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}_test"
when: on_success
expire_in: 1h
paths:
- output.log
- output.err
test:gcc-7:
image: gcc:7
<<: *test_cpu_tdef
dependencies:
- build:gcc-7
test:gcc-6:
image: gcc:6
<<: *test_cpu_tdef
dependencies:
- build:gcc-6
test:gcc-5:
image: gcc:5
<<: *test_cpu_tdef
dependencies:
- build:gcc-5
test:gcc-4:
image: gcc:4
<<: *test_cpu_tdef
dependencies:
- build:gcc-4
test:cuda-8:
image: nvidia/cuda:8.0-devel
<<: *test_gpu_tdef
dependencies:
- build:cuda-8
test:cuda-9:
image: nvidia/cuda:9.0-devel
<<: *test_gpu_tdef
dependencies:
- build:cuda-9