forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 18
/
.gitlab-ci.yml
231 lines (201 loc) · 6.81 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
image: "ubuntu:jammy"
variables:
RELEASE_VERSION: "0.14.0.4"
GIT_STRATEGY: "clone"
MAKEJOBS: "-j4"
CCACHE_SIZE: "100M"
CROWN_CONFIG_ALL: "--disable-reduced-exports --disable-dependency-tracking --prefix=$CI_PROJECT_DIR/depends/$HOST --bindir=$CI_PROJECT_DIR/$OUTDIR/bin --libdir=$CI_PROJECT_DIR/$OUTDIR/lib"
SDK_URL: "https://bitcoincore.org/depends-sources/sdks"
WINEDEBUG: "fixme-all"
cache:
paths:
- depends/built
- depends/sdk-sources
.job_template: &job_definition
stage: build
before_script:
- if [ -n "$PACKAGES" ]; then apt-get update; fi
- if [ -n "$PACKAGES" ]; then apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi
- unset CC; unset CXX
- mkdir -p depends/SDKs depends/sdk-sources out
- if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
- if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
- make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
script:
- ./autogen.sh
- mkdir build && cd build
- ../configure --cache-file=config.cache $CROWN_CONFIG_ALL $CROWN_CONFIG
- make distdir VERSION=$HOST
- cd crown-$HOST
- ./configure --cache-file=../config.cache $CROWN_CONFIG_ALL $CROWN_CONFIG
- make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
- if [ -n "$DMG" ]; then cp Crown-Qt.dmg ../../Crown-Qt.dmg; fi
.job_template: &win64_definition
tags:
- windows
variables:
CROWN_CONFIG: "--enable-mingw"
HOST: "x86_64-w64-mingw32"
GOAL: "install"
OUTDIR: "Crown-${RELEASE_VERSION}-Win64"
PACKAGES: "make curl ca-certificates bzip2 libc6-dev gobjc++ g++ pkg-config patch autoconf automake libtool bsdmainutils libleveldb-dev wget python3-dev libsnappy-dev nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 wine bc"
.job_template: &win32_definition
tags:
- windows
variables:
CROWN_CONFIG: ""
HOST: "i686-w64-mingw32"
GOAL: "install"
OUTDIR: "Crown-${RELEASE_VERSION}-Win32"
PACKAGES: "make curl ca-certificates bzip2 libc6-dev gobjc++ g++ pkg-config patch autoconf automake libtool bsdmainutils libleveldb-dev wget python3-dev libsnappy-dev nsis g++-mingw-w64-i686 gcc-mingw-w64-i686 binutils-mingw-w64-i686 wine bc"
.job_template: &linux64_definition
tags:
- linux64
variables:
CROWN_CONFIG: "--enable-glibc-back-compat"
HOST: "x86_64-unknown-linux-gnu"
GOAL: "install"
OUTDIR: "Crown-${RELEASE_VERSION}-Linux64"
DEP_OPTS: "USE_LINUX_STATIC_QT5=1"
PACKAGES: "make curl ca-certificates bzip2 libc6-dev gobjc++ g++ pkg-config patch autoconf automake libtool bsdmainutils libleveldb-dev wget python3-dev libsnappy-dev"
.job_template: &linux32_definition
tags:
- linux32
variables:
CROWN_CONFIG: "--enable-glibc-back-compat"
HOST: "i686-pc-linux-gnu"
GOAL: "install"
DEP_OPTS: "USE_LINUX_STATIC_QT5=1"
OUTDIR: "Crown-${RELEASE_VERSION}-Linux32"
PACKAGES: "make curl ca-certificates bzip2 libc6-dev gobjc++ g++ pkg-config patch autoconf automake libtool bsdmainutils libleveldb-dev wget python3-dev libsnappy-dev g++-multilib bc"
.job_template: &raspberrypi_definition
tags:
- raspi
variables:
CROWN_CONFIG: "--enable-glibc-back-compat"
HOST: "arm-linux-gnueabihf"
GOAL: "install"
OUTDIR: "Crown-${RELEASE_VERSION}-RaspberryPi"
PACKAGES: "make curl ca-certificates bzip2 libc6-dev gobjc++ g++ pkg-config patch autoconf automake libtool bsdmainutils libleveldb-dev wget python3-dev libsnappy-dev g++-arm-linux-gnueabihf"
.job_template: &osx_definition
tags:
- osx
variables:
CROWN_CONFIG: ""
HOST: "x86_64-apple-darwin14"
OSX_SDK: "10.8"
GOAL: "install"
OUTDIR: "Crown-${RELEASE_VERSION}-Osx"
PACKAGES: "make curl ca-certificates bzip2 patch pkg-config bsdmainutils autoconf automake libtool zlib1g-dev libncurses5-dev cmake gcc-multilib g++-multilib libcap-dev libbz2-dev xz-utils "
.job_template: &osx_dmg_definition
tags:
- osx
variables:
CROWN_CONFIG: ""
HOST: "x86_64-apple-darwin14"
OSX_SDK: "10.8"
DMG: "True"
GOAL: "deploy"
OUTDIR: "Crown-${RELEASE_VERSION}-Osx"
PACKAGES: "make curl ca-certificates bzip2 patch pkg-config bsdmainutils autoconf automake libtool zlib1g-dev libncurses5-dev cmake gcc-multilib g++-multilib libcap-dev libbz2-dev xz-utils "
# Artifact settings for releases and snapshots
.job_template: &release_definition
artifacts:
name: "$OUTDIR"
paths:
- $OUTDIR
.job_template: &snapshot_definition
artifacts:
name: "$OUTDIR"
paths:
- $OUTDIR
expire_in: 2 weeks
except:
- master
- tags
.job_template: &dmg_release_definition
artifacts:
name: "$OUTDIR-dmg"
paths:
- Crown-Qt.dmg
only:
- master
- tags
.job_template: &dmg_snapshot_definition
artifacts:
name: "$OUTDIR-dmg"
paths:
- Crown-Qt.dmg
expire_in: 2 weeks
except:
- master
- tags
# Job definitions for releases
Win64:
<<: *win64_definition
<<: *job_definition
<<: *release_definition
Win32:
<<: *win32_definition
<<: *job_definition
<<: *release_definition
Linux64:
<<: *linux64_definition
<<: *job_definition
<<: *release_definition
Linux32:
<<: *linux32_definition
<<: *job_definition
<<: *release_definition
RaspberryPi:
<<: *raspberrypi_definition
<<: *job_definition
<<: *release_definition
Osx:
image: "ubuntu:bionic"
<<: *osx_definition
<<: *job_definition
<<: *release_definition
#Osx-dmg:
# image: "ubuntu:bionic"
# <<: *osx_dmg_definition
# <<: *job_definition
# <<: *dmg_release_definition
# Job definitions for temporary builds (snapshots)
Win64-snapshot:
<<: *win64_definition
<<: *job_definition
<<: *snapshot_definition
Win32-snapshot:
<<: *win32_definition
<<: *job_definition
<<: *snapshot_definition
Linux64-snapshot:
<<: *linux64_definition
<<: *job_definition
<<: *snapshot_definition
Linux32-snapshot:
<<: *linux32_definition
<<: *job_definition
<<: *snapshot_definition
RaspberryPi-snapshot:
<<: *raspberrypi_definition
<<: *job_definition
<<: *snapshot_definition
Osx-snapshot:
image: "ubuntu:bionic"
<<: *osx_definition
<<: *job_definition
<<: *snapshot_definition
#Osx-dmg-snapshot:
# image: "ubuntu:bionic"
# <<: *osx_dmg_definition
# <<: *job_definition
# <<: *dmg_snapshot_definition
# Trigger the docker build and delivery
trigger_docker_build:
stage: deploy
script:
- curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master --form "variables[VERSION_TAG]=$CI_COMMIT_TAG" https://gitlab.crownplatform.com/api/v4/projects/17/trigger/pipeline
only:
- tags