-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
277 lines (211 loc) · 11 KB
/
bitbucket-pipelines.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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
pipelines:
default:
- parallel:
- step:
name: Alpine
image: alpine:latest
script:
- apk update
- apk add alpine-sdk cmake gtest-dev pugixml-dev zstd
- build_directory=$PWD/build_Debug
- cmake -S $PWD -B $build_directory -DCMAKE_BUILD_TYPE=Debug
- cmake --build $build_directory --config Debug --parallel $(nproc)
- if [ -f "$build_directory/ant4c" ]; then $build_directory/ant4c -help; fi
- cd $build_directory
- ctest --build-config Debug --test-dir $build_directory --output-on-failure
- cd ..
- if [ ! -d "$PWD/test-results/Debug" ]; then mkdir -p $PWD/test-results/Debug; fi
- cp $build_directory/*-report.xml $PWD/test-results/Debug
- for i in $build_directory/*; do if [ -f "$i" ]; then zstd --ultra -22 $i -o $i.zst -f; fi; done
- build_directory=$PWD/build_Release
- cmake -S $PWD -B $build_directory -DCMAKE_BUILD_TYPE=Release
- cmake --build $build_directory --config Release --parallel $(nproc)
- if [ -f "$build_directory/ant4c" ]; then $build_directory/ant4c -help; fi
- cd $build_directory
- ctest --build-config Release --test-dir $build_directory --output-on-failure
- cd ..
- if [ ! -d "$PWD/test-results/Release" ]; then mkdir -p $PWD/test-results/Release; fi
- cp $build_directory/*-report.xml $PWD/test-results/Release
- for i in $build_directory/*; do if [ -f "$i" ]; then zstd --ultra -22 $i -o $i.zst -f; fi; done
artifacts:
- build*/*.zst
custom:
Arch:
- step:
name: Arch Linux
image: archlinux:base-devel
caches:
- archlinuxcachepacman
script:
- pacman-key --init
- pacman -Syyu --noconfirm cmake pugixml gtest
- build_directory=$PWD/build_Debug
- cmake -S $PWD -B $build_directory -DCMAKE_BUILD_TYPE=Debug
- cmake --build $build_directory --config Debug --parallel $(nproc)
- if [ -f "$build_directory/ant4c" ]; then $build_directory/ant4c -help; fi
- ctest --build-config Debug --test-dir $build_directory --output-on-failure
- if [ ! -d "$PWD/test-results/Debug" ]; then mkdir -p $PWD/test-results/Debug; fi
- cp $build_directory/*-report.xml $PWD/test-results/Debug
- for i in $build_directory/*; do if [ -f "$i" ]; then zstd --ultra -22 $i -o $i.zst -f; fi; done
- build_directory=$PWD/build_Release
- cmake -S $PWD -B $build_directory -DCMAKE_BUILD_TYPE=Release
- cmake --build $build_directory --config Release --parallel $(nproc)
- if [ -f "$build_directory/ant4c" ]; then $build_directory/ant4c -help; fi
- ctest --build-config Release --test-dir $build_directory --output-on-failure
- if [ ! -d "$PWD/test-results/Release" ]; then mkdir -p $PWD/test-results/Release; fi
- cp $build_directory/*-report.xml $PWD/test-results/Release
- for i in $build_directory/*; do if [ -f "$i" ]; then zstd --ultra -22 $i -o $i.zst -f; fi; done
artifacts:
- build*/*.zst
gcc:
- step:
name: gcc-latest
image: gcc:latest
script:
- apt update && apt -y install libgtest-dev libpugixml-dev cmake zstd
- build_directory=$PWD/build_Debug
- cmake -S $PWD -B $build_directory -DCMAKE_BUILD_TYPE=Debug
- cmake --build $build_directory --config Debug --parallel $(nproc)
- if [ -f "$build_directory/ant4c" ]; then $build_directory/ant4c -help; fi
- cd $build_directory
- ctest --build-config Debug --test-dir $build_directory --output-on-failure
- cd ..
- if [ ! -d "$PWD/test-results/Debug" ]; then mkdir -p $PWD/test-results/Debug; fi
- cp $build_directory/*-report.xml $PWD/test-results/Debug
- for i in $build_directory/*; do if [ -f "$i" ]; then zstd --ultra -22 $i -o $i.zst -f; fi; done
- build_directory=$PWD/build_Release
- cmake -S $PWD -B $build_directory -DCMAKE_BUILD_TYPE=Release
- cmake --build $build_directory --config Release --parallel $(nproc)
- if [ -f "$build_directory/ant4c" ]; then $build_directory/ant4c -help; fi
- cd $build_directory
- ctest --build-config Release --test-dir $build_directory --output-on-failure
- cd ..
- if [ ! -d "$PWD/test-results/Release" ]; then mkdir -p $PWD/test-results/Release; fi
- cp $build_directory/*-report.xml $PWD/test-results/Release
- for i in $build_directory/*; do if [ -f "$i" ]; then zstd --ultra -22 $i -o $i.zst -f; fi; done
artifacts:
- build*/*.zst
Mageia:
- step:
name: Mageia
image: mageia:8
script:
- dnf update -y
- dnf install rpmdevtools cmake gtest-devel pugixml-devel -y
- rpmdev-setuptree
- cat rpm/ant4c.spec | sed "s/%{_mandir}\/man1\/%{name}.1.gz/%{_mandir}\/man1\/%{name}.1.xz/" > ~/rpmbuild/SPECS/ant4c.spec
- rpmlint ~/rpmbuild/SPECS/ant4c.spec
- VERSION=2020.09
- mkdir v$VERSION
- cp *.c v$VERSION
- cp *.cmake v$VERSION
- cp *.cpp v$VERSION
- cp *.h v$VERSION
- cp CHANGELOG v$VERSION
- cp CMakeLists.txt v$VERSION
- cp help.adoc v$VERSION
- cp LICENSE v$VERSION
- cp MD5SUMS v$VERSION
- cp README.md v$VERSION
- cp SHA3-224SUMS v$VERSION
- cp tests.xml v$VERSION
- cp ant4c.1.gz v$VERSION
- cp help.html v$VERSION
- mkdir -p v$VERSION/modules
- cp modules/example.cmake v$VERSION/modules
- cp modules/example.c v$VERSION/modules
- cp modules/example.h v$VERSION/modules
- tar cvfz v$VERSION.tar.gz v$VERSION
- cp v$VERSION.tar.gz ~/rpmbuild/SOURCES/
- rpmbuild -ba -v ~/rpmbuild/SPECS/ant4c.spec
- mkdir build
- cp ~/rpmbuild/SRPMS/ant4c-*.rpm build/
- cp ~/rpmbuild/RPMS/x86_64/ant4c-*.rpm build/
- mkdir test-results
- cp ~/rpmbuild/BUILD/v$VERSION/**/ant4c_tests-report.xml test-results/
artifacts:
- build*/*
dotnet_sdk_6:
- step:
name: dotnet_sdk_6.0-jammy
image: mcr.microsoft.com/dotnet/sdk:6.0-jammy
script:
- apt update && apt -y install libgtest-dev libpugixml-dev cmake make gcc g++ zstd
- source_directory=$PWD/modules/net
- build_directory=$PWD/build_Debug
- redist_directory=$build_directory/Redist
- cmake -S $PWD -B $build_directory -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$redist_directory
- cmake --build $build_directory --config Debug --parallel $(nproc)
- cmake --build $build_directory --config Debug --parallel $(nproc) --target install
- if [ -f "$build_directory/CMakeCache.txt_" ]; then rm $build_directory/CMakeCache.txt_; fi
- mv $build_directory/CMakeCache.txt $build_directory/CMakeCache.txt_
- cmake -S $source_directory -B $build_directory -DCMAKE_BUILD_TYPE=Debug -DANT4C_PATH=$redist_directory
- cmake --build $build_directory --config Debug --parallel $(nproc)
# export COREHOST_TRACE="1"
# export COREHOST_TRACEFILE="$test_output.txt"
- ctest --build-config Debug --test-dir $build_directory --output-on-failure
- if [ ! -d "$PWD/test-results/Debug" ]; then mkdir -p $PWD/test-results/Debug; fi
- cp $build_directory/*-report.xml $PWD/test-results/Debug
- for i in $build_directory/*; do if [ -f "$i" ]; then zstd --ultra -22 $i -o $i.zst -f; fi; done
- build_directory=$PWD/build_Release
- redist_directory=$build_directory/Redist
- cmake -S $PWD -B $build_directory -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$redist_directory
- cmake --build $build_directory --config Release --parallel $(nproc)
- cmake --build $build_directory --config Release --parallel $(nproc) --target install
- if [ -f "$build_directory/CMakeCache.txt_" ]; then rm $build_directory/CMakeCache.txt_; fi
- mv $build_directory/CMakeCache.txt $build_directory/CMakeCache.txt_
- cmake -S $source_directory -B $build_directory -DCMAKE_BUILD_TYPE=Release -DANT4C_PATH=$redist_directory
- cmake --build $build_directory --config Release --parallel $(nproc)
- cd $build_directory
# export COREHOST_TRACE="1"
# export COREHOST_TRACEFILE="$test_output.txt"
- ctest --build-config Release --test-dir $build_directory --output-on-failure
- if [ ! -d "$PWD/test-results/Release" ]; then mkdir -p $PWD/test-results/Release; fi
- cp $build_directory/*-report.xml $PWD/test-results/Release
- for i in $build_directory/*; do if [ -f "$i" ]; then zstd --ultra -22 $i -o $i.zst -f; fi; done
artifacts:
- build*/*.zst
openSUSE:
- step:
name: openSUSE
image: opensuse/leap:15
# image: opensuse/tumbleweed
script:
# - zypper update -y
- zypper install -y rpmdevtools rpmlint tar gzip rpm-build cmake gcc-c++ gtest pugixml-devel
- rpmdev-setuptree
- cat rpm/ant4c.spec | sed "s/gtest-devel/gtest/" > ~/rpmbuild/SPECS/ant4c.spec
- rpmlint ~/rpmbuild/SPECS/ant4c.spec
- VERSION=2020.09
- mkdir v$VERSION
- cp *.c v$VERSION
- cp *.cmake v$VERSION
- cp *.cpp v$VERSION
- cp *.h v$VERSION
- cp CHANGELOG v$VERSION
- cp CMakeLists.txt v$VERSION
- cp help.adoc v$VERSION
- cp LICENSE v$VERSION
- cp MD5SUMS v$VERSION
- cp README.md v$VERSION
- cp SHA3-224SUMS v$VERSION
- cp tests.xml v$VERSION
- cp ant4c.1.gz v$VERSION
- cp help.html v$VERSION
- mkdir -p v$VERSION/modules
- cp modules/example.cmake v$VERSION/modules
- cp modules/example.c v$VERSION/modules
- cp modules/example.h v$VERSION/modules
- tar cvfz v$VERSION.tar.gz v$VERSION
- cp v$VERSION.tar.gz ~/rpmbuild/SOURCES/
- rpmbuild -ba -v ~/rpmbuild/SPECS/ant4c.spec
- mkdir build
- cp ~/rpmbuild/SRPMS/ant4c-*.rpm build/
- cp ~/rpmbuild/RPMS/x86_64/ant4c-*.rpm build/
- mkdir test-results
- cp ~/rpmbuild/BUILD/v$VERSION/**/ant4c_tests-report.xml test-results/
artifacts:
- build*/*
definitions:
caches:
archlinuxcachepacman: /var/cache/pacman