forked from pulp-platform/pulp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
194 lines (179 loc) · 5.35 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
# Copyright 2019 ETH Zurich and University of Bologna
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
before_script:
- pwd
# after_script:
# - echo "stage finished"
stages:
- fetch
- build
- test
fetch_tests:
stage: fetch
script:
- echo "Fetching tests"
- make test-checkout-gitlab
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- tests/*
fetch_ips:
stage: fetch
script:
- echo "Fetching IPs"
- make checkout
- echo "Fetching VIPs"
- ./rtl/vip/get-vips.sh --yes --gitlab
- echo "Generate scripts with DPI and VIP support"
- ./generate-scripts --rt-dpi --i2c-vip --flash-vip --i2s-vip
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- ips/*
- sim/*
- ipstools/*
- rtl/vip/*
- .cached_ipdb.json
# This jobs result is too large to produce an artifact
# fetch_sdk:
# stage: fetch
# script:
# - echo "Fetching SDK from releases and setting up paths"
# - make sdk-gitlab
# artifacts:
# paths:
# - pkg/
# - env/
build_rtl:
stage: build
before_script:
script:
- echo "Compiling RTL model and DPI libraries"
- make build
- echo "Installing scripts"
- make install
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- tests/*
- ips/*
- sim/*
- ipstools/*
# - install/* # we have to rebuild in test stage because rtl libraries are
# not relocatable (hardcoded paths)
- rtl/tb/remote_bitbang/* # we want to reuse bitbang lib
# - pkg/* # sdk is too large
# Use sdk-releases to run all tests
test_sw:
stage: test
before_script:
- echo "Fetching SDK from releases and setting up paths"
- make sdk-gitlab
- echo "Compiling RTL model and DPI libraries"
- make build
- echo "Installing scripts"
- make install
script:
- echo "Running software tests"
- make test-gitlab
- echo "Generating junit test results"
- /usr/sepp/bin/pip3.4 install --user junit2html
- /usr/sepp/bin/python3.4 -m junit2htmlreport tests/junit-reports/TEST-*.xml
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- tests/junit-reports/TEST-*.html
- tests/junit-reports/TEST-*.xml
reports:
junit: tests/junit-reports/TEST-*.xml
# Use simplified pulp-runtime to run a subset of tests
test_simplified_sw:
stage: test
before_script:
- echo "Fetching Runtime"
- make pulp-runtime
- echo "Compiling RTL model and DPI libraries"
- make build
- echo "Installing scripts"
- make install
script:
- echo "Running software test"
- make test-runtime-gitlab
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- tests/*.html
- tests/*.xml
reports:
junit: tests/*.xml
# Built SDK with the `make sdk` target and run all tests
# test_sw_build_sdk:
# variables:
# PULP_RISCV_GCC_TOOLCHAIN: your-compiler-path
# stage: test
# before_script:
# - echo "Compiling RTL model and DPI libraries"
# - make build
# - echo "Installing scripts" # don't call this, breaks build
# - make install
# - echo "Building SDK"
# - make sdk
# script:
# - echo "Running software tests with built SDK"
# - make test-gitlab2
# - echo "Generating junit test results"
# - /usr/sepp/bin/pip3.4 install --user junit2html
# - /usr/sepp/bin/python3.4 -m junit2htmlreport tests/junit-reports/TEST-*.xml
# artifacts:
# paths:
# - tests/junit-reports/TEST-*.html
# - tests/junit-reports/TEST-*.xml
# reports:
# junit: tests/junit-reports/TEST-*.xml
test_dm:
stage: test
before_script:
script:
- echo "(Re)generating scripts with DPI disabled"
- ./generate-scripts
- echo "Setting up vsim path"
- source setup/vsim.sh
- echo "Running debug module testbench"
- cd sim/ && make lib build opt simc VSIM_FLAGS=-gENABLE_DM_TESTS=1
fpga_synth:
stage: test
before_script:
script:
- echo "(Re)generating scripts" # because paths might have changed
- ./generate-scripts
- echo "Starting synthesis with vivado"
- cd fpga/ && make genesys2 VIVADO='vivado-2019.1.1 vivado'
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- fpga/pulpissimo_genesys2.bit
- fpga/pulpissimo_genesys2.bin
- fpga/*.jou
- fpga/*.log
- fpga/*.str
- fpga/pulpissimo-genesys2/reports
- fpga/pulpissimo-genesys2/rtl
- fpga/pulpissimo-genesys2/tcl
- fpga/pulpissimo-genesys2/pulpissimo_genesys2.xpr
- fpga/pulpissimo-genesys2/fpga-settings.mk
- fpga/pulpissimo-genesys2/*.log
- fpga/pulpissimo-genesys2/*.cfg
- fpga/pulpissimo-genesys2/*.gdb
- fpga/pulpissimo-genesys2/*.jou
- fpga/pulpissimo-genesys2/*.log