forked from pulp-platform/picobello
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
115 lines (99 loc) · 2.42 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
115 lines (99 loc) · 2.42 KB
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
# Copyright 2025 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
include:
- local: .gitlab/common.yml
- local: .gitlab/sw-tests.yml
stages:
- init
- build
- run
# Sources the environment variables for the IIS environment
.init-env:
before_script:
- source iis-env.sh
##################
# Initialization #
##################
init-deps:
stage: init
extends:
- .init-deps-tpl
artifacts:
paths:
- pd/ci.yml
########################################
# Generate RTL Sources and Addressmaps #
########################################
generate-rtl:
stage: build
extends:
- .generate-rtl-tpl
########################
# Build Software Tests #
########################
sn-sw:
stage: build
extends:
- .sn-sw-tpl
chs-sw:
stage: build
extends:
- .chs-sw-tpl
#####################
# Build Simulations #
#####################
vsim-compile:
stage: build
needs:
- generate-rtl
variables:
FLOO_GEN_ARGS: --no-format
script:
- make vsim-compile | tee compile.log 2>&1
- '! grep "\*\* Error" compile.log'
artifacts:
paths:
- target/sim/vsim/work
expire_in: 1 day
###################
# Run simulations #
###################
sim-vsim:
stage: run
extends:
- .cache-deps
- .init-env
- .sw-tests
variables:
LOG_FILE: target/sim/vsim/transcript
needs:
- chs-sw
- sn-sw
- vsim-compile
script:
# Run the simulation
- make vsim-run-batch
# Check either success or failure for non-zero exit codes
- 'if [ -z "${NZ_EXIT_CODE}" ]; then grep "] SUCCESS" transcript || (exit 1); else grep "] FAILED: return code ${NZ_EXIT_CODE}" transcript || (exit 1); fi'
# Check for UART output
- 'if [ ! -z "${USTR}" ]; then (grep " \[UART\] ${USTR}" transcript); fi'
# Check for any fatal errors
- 'if grep "Fatal:" transcript; then exit 1; fi'
# Check for any errors (except one for non-zero exit codes)
- 'if [ ! -z "${NZ_EXIT_CODE}" ]; then count=$(grep -c "Error:" transcript); if [ "$count" -ne 1 ]; then exit 1; fi; else if grep -q "Error:" transcript; then exit 1; fi; fi'
artifacts:
paths:
- transcript
###################
# Physical Design #
###################
subpipe:
stage: build
needs:
- init-deps
trigger:
include:
- artifact: pd/ci.yml
job: init-deps
strategy: depend