forked from tum-ei-eda/etiss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
203 lines (186 loc) · 3.62 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# ------------------- ETISS CI flow --------------------------
# Build process is written in shell
# Testers are written in python for easily plugging in new tester
# All script is located in ./ci directory
# --------------------------------------------------------------
image: gitlab.lrz.de:5005/de-tum-ei-eda-esl/etiss:latest
stages:
- build
- test
- gdbtest
- deploy
#before_script:
Build:
stage: build
script:
- whoami
- echo $HOME
- sh ./ci/build.sh
cache:
key: build_cache
paths:
- "build_dir"
- "ci/tester.log"
# Manually re-build project in GitLab GUI
ReBuild:
stage: build
script:
- rm -rf build_dir
- sh ./ci/build.sh
cache:
key: build_cache
paths:
- "build_dir"
when: manual
FailuerHandling:
stage: test
script:
- rm -rf build_dir
when: manual
Or1kTester:
stage: test
script:
- cd ci
- python3 Tester.py -arch Or1k
- cd ..
# only:
# - master
# - '/.*[oO][rR]1[kK].*/'
cache:
key: build_cache
paths:
- "build_dir"
- "ci/tester.log"
dependencies:
- Build
artifacts:
paths:
- "ci/tester.log"
expire_in: 2 weeks
RiscvTester:
stage: test
script:
- cd ci
- python3 Tester.py -arch RISCV
- cd ..
# only:
# - master
# - '/.*[rR][iI][sS][cC]-?_?[vV].*/'
cache:
key: build_cache
paths:
- "build_dir"
- "ci/tester.log"
dependencies:
- Build
artifacts:
paths:
- "ci/tester.log"
expire_in: 2 weeks
# Testers in the following are architecture specific testers.
# Note: Use the following part for testing ARM if available
#Armv6MTester:
# stage: test
# script:
# - cd ci
# - python3 Tester.py -arch Armv6M
# - cd ..
# only:
# - master
# - '/.*[aA][rR][mM][vV]?6?[mM]?.*/'
# cache:
# key: build_cache
# paths:
# - "build_dir"
# - "ci/tester.log"
# dependencies:
# - Build
# artifacts:
# paths:
# - "ci/tester.log"
# expire_in: 2 weeks
Or1kGDBTester:
stage: gdbtest
script:
- cd ci
- python3 Tester.py -arch Or1k -gdb
- cd ..
cache:
key: build_cache
paths:
- "build_dir"
- "ci/tester.log"
# only:
# - master
# - '/.*[oO][rR]1[kK].*/'
dependencies:
- Or1kTester
RiscvGDBTester:
stage: gdbtest
script:
- cd ci
- python3 Tester.py -arch RISCV -gdb
cache:
key: build_cache
paths:
- "build_dir"
- "ci/tester.log"
# only:
# - master
# - '/.*[rR][iI][sS][cC]-?_?[vV].*/'
dependencies:
- RiscvTester
# Note: use this part for testing ARM if available.
#Armv6MGDBTester:
# stage: gdbtest
# script:
# - cd ci
# - python3 Tester.py -arch Armv6M -gdb
# - cd ..
# cache:
# key: build_cache
# paths:
# - "build_dir"
# - "ci/tester.log"
# only:
# - master
# - '/.*[aA][rR][mM][vV]?6?[mM]?.*/'
# dependencies:
# - Armv6MTester
CITester:
stage: test
script:
- cd ci
- python3 Tester.py
- cd ..
only:
- CI_dev
cache:
key: build_cache
paths:
- "build_dir"
- "ci/tester.log"
dependencies:
- Build
artifacts:
paths:
- "ci/tester.log"
expire_in: 2 weeks
Deploy:
stage: deploy
script:
- echo "Not implemented"
cache:
key: build_cache
paths:
- "build_dir"
- "ci/tester.log"
when: manual
deploy docker container:
stage: build
when: manual
script:
- cd ci
- docker build -t gitlab.lrz.de:5005/de-tum-ei-eda-esl/etiss .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab.lrz.de:5005/de-tum-ei-eda-esl/etiss
- docker push gitlab.lrz.de:5005/de-tum-ei-eda-esl/etiss