forked from tropicsquare/ts-spect-compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
139 lines (118 loc) · 3.47 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
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- doc
- build_and_test
- deploy
- publish
.junit-artifacts: &junit-artifacts
artifacts:
when: always
paths:
- sim/sim_logs/ts_sim_junit_out.xml
reports:
junit: sim/sim_logs/ts_sim_junit_out.xml
.coverage-and-junit-artifacts: &coverage-and-junit-artifacts
artifacts:
when: always
paths:
- sim/sim_logs/ts_sim_junit_out.xml
- sim/coverage_output/
reports:
junit: sim/sim_logs/ts_sim_junit_out.xml
build_programmer_guide:
stage: doc
tags:
- shell
script:
- source ./setup_env
- cd doc/programmer_guide
- ts_latex_build.py spect_programmer_guide.tex
artifacts:
when: always
paths:
- doc/programmer_guide/build/pdf/spect_programmer_guide.pdf
build_isa_v0.1:
stage: doc
tags:
- shell
script:
- source ./setup_env
- cd doc/ISAv0.1
- ts_latex_build.py isav0.1.tex
artifacts:
when: always
paths:
- doc/ISAv0.1/build/pdf/isav0.1.pdf
build_isa_v0.2:
stage: doc
tags:
- shell
script:
- source ./setup_env
- cd doc/ISAv0.2
- ts_latex_build.py isav0.2.tex
artifacts:
when: always
paths:
- doc/ISAv0.2/build/pdf/isav0.2.pdf
###################################################################################################
# Build compiler and test it
###################################################################################################
build_and_test_compiler:
stage: build_and_test
tags:
- shell
script:
- source ./setup_env
- ./build.sh
- cd build
- make test
artifacts:
when: always
paths:
- build/src/apps/spect_*
- build/src/cosim/libspect_iss_dpi.so
- src/cosim/spect_iss_dpi_pkg.sv
- src/cosim/spect_instr_gen_coverage.svh
###################################################################################################
# Deploy the compiler
###################################################################################################
deploy_compiler:
stage: deploy
only:
- tags
when: manual
tags:
- shell
script:
- export VERSION=`git describe --tags --abbrev=0`
- export DEST_FOLDER=/tools/tropic/ts-spect-compiler
# Will fail if concrete version directory already exists. This will avoid
# re-placing older version with new if we forget to add new tag!
- mkdir -p $DEST_FOLDER
- mkdir $DEST_FOLDER/$VERSION
- cp build/src/apps/spect_* $DEST_FOLDER/$VERSION
- cp build/src/cosim/libspect_iss_dpi.so $DEST_FOLDER/$VERSION
- cp src/cosim/spect_iss_dpi_pkg.sv $DEST_FOLDER/$VERSION
- cp src/cosim/spect_instr_gen_coverage.svh $DEST_FOLDER/$VERSION
- cp doc/programmer_guide/build/pdf/spect_programmer_guide.pdf $DEST_FOLDER/$VERSION
- cp doc/ISAv0.1/build/pdf/isav0.1.pdf $DEST_FOLDER/$VERSION
- cp doc/ISAv0.2/build/pdf/isav0.2.pdf $DEST_FOLDER/$VERSION
###################################################################################################
# Publish built documentation
###################################################################################################
pages:
tags:
- shell
stage: publish
when: always
script:
- echo "Publishing pages..."
- mkdir -p public
- cp doc/programmer_guide/build/pdf/spect_programmer_guide.pdf public
- cp doc/ISAv0.1/build/pdf/isav0.1.pdf public
- cp doc/ISAv0.2/build/pdf/isav0.2.pdf public
artifacts:
paths:
- public