-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
203 lines (171 loc) · 4.31 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
# Definition for CI within GitLab
# Note:
# Prefix any job name with a '.' to disable.
#
# Enable submodules
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: none
# Common definitions for the jobs
.common: &common
before_script:
- git submodule sync ci
- git submodule update --init ci
artifacts: &artifacts
when: always
paths:
- artifacts
- test-output
- ci-logs
dependencies: []
.common-cross: &common-cross
<<: *common
artifacts:
<<: *artifacts
# reports:
# junit:
# - artifacts/results.xml
#### Test examples
test-examples:
<<: *common-cross
stage: test
script:
# Build the examples first, as if it fails we'll then not upload the results.
- crosscompile/build-examples.sh
tags:
- linux
# A collection of tests for different platforms
p:ubuntu-18.04:
image: ubuntu:18.04
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux
p:ubuntu-20.04:
image: ubuntu:20.04
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux
p:ubuntu-22.04:
image: ubuntu:22.04
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux
p:centos-7:
image: centos:7
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux
p:centos-8:
image: centos:8
stage: platforms
needs: ['test-examples']
script:
- echo "Fixing up centos 8 being EOL'd"
- for i in /etc/yum.repos.d/* ; do sed -i 's/mirrorlist/#mirrorlist/' $i ; done
- for i in /etc/yum.repos.d/* ; do sed -i 's!#baseurl=http://mirror.!baseurl=http://vault.!' $i ; done
- echo "Now building"
- crosscompile/build-examples.sh
tags:
- linux
p:debian-10:
image: debian:10
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux
p:mint-18:
image: linuxmintd/mint18-amd64
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux
p:mint-20:
image: linuxmintd/mint20-amd64
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux
p:mint-21:
image: linuxmintd/mint20-amd64
stage: platforms
needs: ['test-examples']
script:
- crosscompile/build-examples.sh
tags:
- linux
# Test by running this on build.riscos.online
# Note: This only runs some simple tests - it doesn't build the examples.
.p:riscos:
stage: platforms
script:
- |
# Ensure we have the RISC OS bits downloaded and usable
crosscompile/setup-riscos-tests.sh
# Zip up the source to send to robuild
zip -q9r /tmp/source-archive.zip riscos-bits ROTest,feb .robuild.yaml
# Fetch the build client
curl -s -L -o riscos-build-online https://github.com/gerph/robuild-client/releases/download/v0.05/riscos-build-online && chmod +x riscos-build-online
# Send the archive file to build service
./riscos-build-online -i /tmp/source-archive.zip -a off -o /tmp/built
# If it didn't report an error, the test was successful.
tags:
- linux
#### Exports ####
export-linux:
<<: *common-cross
stage: export-cross
script:
# Build and upload the binary to Artifactory.
# We upload both the master branch and the HTML 5 branch.
- if [[ "$CI_COMMIT_BRANCH" = 'master' || "$CI_COMMIT_BRANCH" = 'html5-css' ]] ; then upload=--upload ; else upload= ; fi
- ci/build.sh native install ${upload}
tags:
- linux
export-macos:
<<: *common-cross
stage: export-cross
script:
- if [[ "$CI_COMMIT_BRANCH" = 'master' || "$CI_COMMIT_BRANCH" = 'html5-css' ]] ; then upload=--upload ; else upload= ; fi
- ci/build.sh native install ${upload}
tags:
- macos
export-riscos:
<<: *common-cross
stage: export-cross
script:
# Ensure we have the RISC OS bits downloaded and usable
- mkdir -p artifacts
- eval "$(crosscompile/ci-vars)"
- crosscompile/build-riscos-archive.sh artifacts/prminxml-${CI_BRANCH_VERSION:-UNKNOWN}.zip
tags:
- macos
.build-command-riscos:
<<: *common
stage: build-riscos
script:
- ci/build.sh install
#### Stages to execute ####
stages:
# - build
- test
- platforms
- export-cross
# - build-riscos