forked from Blockstream/gdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
263 lines (232 loc) · 6.01 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
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
cache:
key: "9"
paths:
- subprojects/packagecache/
image: greenaddress/ci@sha256:bcf7f422c79b40127cf56f93184c7f8350aafe5de2ca2cfe7977c9b23c46f15c
.fedora_images:
image: greenaddress/fedora_ci@sha256:0eb9c1ba511b75e4ab901ab1df023ed270b4d0e082ed44a87458489514f10a75
tags:
- ga
.ndk_release:
tags:
- ga
artifacts:
expire_in: 1 day
when: on_success
paths:
- gdk-android-jni
.osx_test:
tags:
- osx
cache:
key: "$CI_JOB_NAME"
paths:
- subprojects/packagecache/
.py_release:
tags:
- ga
before_script:
- mkdir $CI_PROJECT_DIR/gdk-python
artifacts:
expire_in: 1 day
when: on_success
paths:
- gdk-python
test_gcc:
tags:
- ga
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --gcc
release_py3m_buster:
extends: .py_release
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --install $PWD/gdk-python --gcc --python-version 3.7
release_py3m_buster_debug:
extends: .py_release
when: manual
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --buildtype=debug --install $PWD/gdk-python --gcc --python-version 3.7
release_py3m_ubuntu_18.04:
image: greenaddress/ci@sha256:5b65c5766f5291b67902d9789923a99afcae669a00ef74412093a473699dae45
extends: .py_release
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --install $PWD/gdk-python --gcc --python-version 3.6
release_py3m_osx:
extends: .py_release
tags:
- osx
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --install $PWD/gdk-python --clang --python-version 3.7
test_fedora_gcc:
extends: .fedora_images
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --gcc
test_fedora_debug_gcc:
extends: .fedora_images
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --buildtype=debug --gcc
test_fedora_clang:
extends: .fedora_images
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --clang
test_clang:
tags:
- ga
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --clang-tidy-version=7 --clang
- ./tools/format.sh && git diff --exit-code
gdk_clang_ndk_armeabi-v7a:
extends: .ndk_release
script:
- cd $CI_PROJECT_DIR
- mkdir gdk-android-jni
- ANDROID_NDK=/android-ndk-r20 ./tools/build.sh --install $PWD/gdk-android-jni --ndk armeabi-v7a --lto=true
gdk_clang_ndk_arm64-v8a:
extends: .ndk_release
script:
- cd $CI_PROJECT_DIR
- mkdir gdk-android-jni
- ANDROID_NDK=/android-ndk-r20 ./tools/build.sh --install $PWD/gdk-android-jni --ndk arm64-v8a --lto=true
gdk_clang_ndk_arm64-v8a-debug:
extends: .ndk_release
when: manual
script:
- cd $CI_PROJECT_DIR
- mkdir gdk-android-jni
- ANDROID_NDK=/android-ndk-r20 ./tools/build.sh --buildtype=debug --install $PWD/gdk-android-jni --ndk arm64-v8a --lto=true
gdk_clang_ndk_x86:
extends: .ndk_release
script:
- cd $CI_PROJECT_DIR
- mkdir gdk-android-jni
- ANDROID_NDK=/android-ndk-r20 ./tools/build.sh --install $PWD/gdk-android-jni --ndk x86 --lto=true
gdk_clang_ndk_x86_64:
extends: .ndk_release
script:
- cd $CI_PROJECT_DIR
- mkdir gdk-android-jni
- ANDROID_NDK=/android-ndk-r20 ./tools/build.sh --install $PWD/gdk-android-jni --ndk x86_64 --lto=true
test_osx_clang:
extends: .osx_test
script:
- cd $CI_PROJECT_DIR
- ./tools/clean.sh dirs
- ./tools/build.sh --clang --lto=true
test_osx_ios:
extends: .osx_test
script:
- cd $CI_PROJECT_DIR
- ./tools/clean.sh dirs
- ./tools/build.sh --iphone static --lto=true
test_osx_ios_sim:
extends: .osx_test
script:
- cd $CI_PROJECT_DIR
- ./tools/clean.sh dirs
- ./tools/build.sh --iphonesim static --lto=true
test_osx_clang_ndk_armeabi-v7a:
extends: .osx_test
script:
- cd $CI_PROJECT_DIR
- ./tools/clean.sh dirs
- ./tools/build.sh --ndk armeabi-v7a
test_osx_clang_ndk_arm64-v8a:
extends: .osx_test
script:
- cd $CI_PROJECT_DIR
- ./tools/clean.sh dirs
- ./tools/build.sh --ndk arm64-v8a
test_osx_clang_ndk_x86:
extends: .osx_test
script:
- cd $CI_PROJECT_DIR
- ./tools/clean.sh dirs
- ./tools/build.sh --ndk x86
test_osx_clang_ndk_x86_64:
extends: .osx_test
script:
- cd $CI_PROJECT_DIR
- ./tools/clean.sh dirs
- ./tools/build.sh --ndk x86_64
test_freebsd_gcc:
tags:
- freebsd
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --gcc
test_freebsd_clang:
tags:
- freebsd
before_script:
- export PATH="/usr/local/llvm60/bin:$PATH"
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --clang
test_windows_mingw_w64_cross:
tags:
- ga
artifacts:
expire_in: 1 hour
when: on_success
paths:
- build-windows-mingw-w64/src/libgreenaddress*
script:
- cd $CI_PROJECT_DIR
- ./tools/build.sh --mingw-w64
apidocs:
tags:
- ga
artifacts:
expire_in: 14 days
when: on_success
paths:
- apidocs.tar.gz
script:
- cd $CI_PROJECT_DIR
- tools/clean.sh
- virtualenv -p python3 .venv
- source .venv/bin/activate
- pip3 install sphinx sphinx_rtd_theme
- sphinx-build -b html -a -c docs/source docs/source docs/build/html
- cd docs/build && tar czf ../../apidocs.tar.gz html/ && cd ../..
- deactivate
- tools/clean.sh
package_release:
tags:
- garelease
stage: deploy
artifacts:
expire_in: 14 days
paths:
- $CI_PROJECT_DIR/gdk_dist
when: on_success
script:
- cd $CI_PROJECT_DIR
- mkdir gdk-android-symbols
- mkdir gdk_dist
- find gdk-android-jni -name "*.syms" -type f -exec cp --parents {} gdk-android-symbols \;
- tar -czf gdk_dist/gdk-android-symbols.tar.gz gdk-android-symbols --remove-files
- find gdk-android-jni -name "*.a" -type f -delete
- find gdk-android-jni -name "*.syms" -type f -delete
- tar -czf gdk_dist/gdk-android-jni.tar.gz gdk-android-jni --remove-files
- mv gdk-python/*whl gdk_dist/
- cd gdk_dist
- /opt/process_release
dependencies:
- gdk_clang_ndk_armeabi-v7a
- gdk_clang_ndk_arm64-v8a
- gdk_clang_ndk_x86
- gdk_clang_ndk_x86_64
- release_py3m_buster
- release_py3m_ubuntu_18.04
- release_py3m_osx
- apidocs