forked from black-parrot-sdk/black-parrot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
149 lines (131 loc) · 2.88 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
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: none
default:
image: registry.gitlab.com/dpetrisko/black-parrot-sdk:latest
stages:
- tools
- linker
- perch
- prog
- zip
- publish
.job_template: &job_definition
only:
- pushes
before_script:
- make checkout -j ${CI_NUM_CORES} | tee checkout.log
artifacts:
when: always
paths:
- "*.log"
- include/
- lib/
- linker/
- install/
- prog/
- ucode/
expire_in: "1 day"
build_bedrock:
<<: *job_definition
stage: tools
script:
- make bedrock -j1 | tee bedrock.log
build_dromajo:
<<: *job_definition
stage: tools
script:
- make dromajo -j ${CI_NUM_CORES} | tee dromajo.log
# Clean the gnu toolchain first, for some reason caching is not great about it
# Don't know why the job says failure, everything seems to be fine
build_gnu:
<<: *job_definition
allow_failure: true
stage: tools
script:
- git submodule deinit -f riscv-gnu-toolchain
- make checkout
- make gnudramfs -j ${CI_NUM_CORES} | tee gnudramfs.log
- make gnulinux -j ${CI_NUM_CORES} | tee gnulinux.log
build_linker:
<<: *job_definition
stage: linker
script:
- make linker -j1 | tee linker.log
build_perch:
<<: *job_definition
stage: perch
script:
- make perch -j1 | tee perch.log
build_bootrom:
<<: *job_definition
stage: prog
script:
- make bootrom -j1 | tee bootrom.log
build_bp-demos:
<<: *job_definition
stage: prog
script:
- make bp-demos -j1 | tee bp-demos.log
build_bp-tests:
<<: *job_definition
stage: prog
script:
- make bp-tests -j1 | tee bp-tests.log
build_riscv-tests:
<<: *job_definition
stage: prog
script:
- make riscv-tests -j1 | tee riscv-tests.log
build_coremark:
<<: *job_definition
stage: prog
script:
- make coremark -j1 | tee coremark.log
build_beebs:
<<: *job_definition
stage: prog
script:
- make beebs -j1 | tee beebs.log
zip_tools:
stage: zip
script:
- tar -czvf tools.tar.gz include/ lib/ install/ | tee zip_tools.log
artifacts:
when: on_success
paths:
- "*.log"
- tools.tar.gz
expire_in: "1 day"
dependencies:
- build_bedrock
- build_dromajo
- build_gnu
zip_prog:
stage: zip
script:
- tar -czvf prog.tar.gz prog/ linker/ ucode/ | tee zip_prog.log
artifacts:
when: on_success
paths:
- "*.log"
- prog.tar.gz
dependencies:
- build_perch
- build_linker
- build_bootrom
- build_bp-demos
- build_bp-tests
- build_riscv-tests
- build_coremark
- build_beebs
publish_tag:
stage: publish
when: manual
script:
- gh config set prompt disabled
- if [ "$CI_RELEASE_TAG" == "" ]; then echo "Please set CI_RELEASE_TAG"; exit 1; fi
- gh release create v0.1-alpha tools.tar.gz prog.tar.gz --repo black-parrot-sdk/black-parrot-sdk
dependencies:
- zip_tools
- zip_prog