-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy path.onedev-buildspec.yml
211 lines (211 loc) · 9.84 KB
/
.onedev-buildspec.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
version: 20
jobs:
- name: Build
jobExecutor: DockerExecutor
steps:
- !CheckoutStep
name: Checkout
cloneCredential: !DefaultCredential {}
withLfs: false
withSubmodules: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !CommandStep
name: Build
runInContainer: true
image: ubuntu:18.04
interpreter: !DefaultInterpreter
commands:
- rm /etc/apt/apt.conf.d/docker-clean
- echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/98keep-debs
- echo 'APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/99keep-debs
- dpkg --add-architecture i386
- apt -y update
- apt -y install build-essential
- apt -y install gcc-8
- apt -y install g++-8
- apt -y install gcc-multilib
- apt -y install mingw-w64
- apt -y install make
- apt -y install zlib1g-dev
- apt -y install libpng-dev
- apt -y install libjpeg62-dev
- apt -y install libgif-dev
- apt -y install libncurses5-dev
- apt -y install libfreetype6-dev
- apt -y install libx11-dev
- apt -y install libxrender-dev
- apt -y install libgl1-mesa-dev
- apt -y install libxext-dev
- apt -y install libsqlite3-dev
- apt -y install libssl-dev
- apt -y install libffi-dev
- apt -y install libasound2-dev
- apt -y install libfontconfig1-dev
- apt -y install libnghttp2-dev
- apt -y install libbrotli-dev
- apt -y install libzstd-dev
- apt -y install libpsl-dev
- apt -y install libidn2-dev
- apt -y install zlib1g-dev:i386
- apt -y install libpng-dev:i386
- apt -y install libjpeg62-dev:i386
- apt -y install libncurses5-dev:i386
- apt -y install libfreetype6-dev:i386
- apt -y install libx11-dev:i386
- apt -y install libxrender-dev:i386
- apt -y install libgl1-mesa-dev:i386
- apt -y install libxext-dev:i386
- apt -y install libsqlite3-dev:i386
- apt -y install libssl-dev:i386 libnghttp2-dev:i386 libbrotli-dev:i386 libzstd-dev:i386 libpsl-dev:i386 libidn2-0-dev:i386
- apt -y install libffi-dev:i386
- apt -y install libasound2-dev:i386
- apt -y install libfontconfig1-dev:i386
- apt -y install git
- apt -y install python3-pip
- pip3 install cffi
- tar xf upx/*linux-x86_64.tar.gz -C /usr/bin &&
tar xf curl/curl*windows-x86_64.tar.gz -C $(pwd)/deps &&
tar xf curl/curl*windows-i686.tar.gz -C $(pwd)/deps &&
tar xf curl/curl*linux-x86_64.tar.gz -C $(pwd)/deps &&
tar xf curl/curl*linux-i686.tar.gz -C $(pwd)/deps &&
ln -sf $(pwd)/deps/curl-7.86.0/include/curl /usr/include/curl &&
ln -sf $(pwd)/deps/curl-7.86.0/obj/release.linux/libcurl.so.4 /usr/lib/x86_64-linux-gnu/ &&
ln -sf $(pwd)/deps/curl-7.86.0/obj/release.linux/libcurl.so /usr/lib/x86_64-linux-gnu/ &&
ln -sf $(pwd)/deps/curl-7.86.0/obj/release.linux.x32/libcurl.so.4 /usr/lib/i386-linux-gnu/ &&
ln -sf $(pwd)/deps/curl-7.86.0/obj/release.linux.x32/libcurl.so /usr/lib/i386-linux-gnu/ &&
make -j2 && mkdir output && make install DESTDIR=output &&
tar xf win32-patches/*.tar.gz &&
ln -sf $(pwd)/win32/regex/regex.h /usr/x86_64-w64-mingw32/include/ &&
ln -sf $(pwd)/win32/regex/gnurx-0.dll /usr/x86_64-w64-mingw32/lib/ &&
ln -sf $(pwd)/win32/regex/regex.h /usr/i686-w64-mingw32/include/ &&
ln -sf $(pwd)/win32/regex-x32/libgnurx-0.dll /usr/i686-w64-mingw32/lib/ &&
tar xf OpenSSL-win32/OpenSSL-win32*.tar.gz -C $(pwd)/win32 &&
rm /usr/bin/gcc && rm /usr/bin/g++ && ln -s /usr/bin/gcc-8 /usr/bin/gcc && ln -s /usr/bin/g++-8 /usr/bin/g++ &&
make bindings &&
rm /usr/bin/gcc && rm /usr/bin/g++ && ln -s /usr/bin/gcc-7 /usr/bin/gcc && ln -s /usr/bin/g++-7 /usr/bin/g++ &&
apt -y install libgif-dev:i386 &&
make ARCH=x32 -j2 && make ARCH=x32 install DESTDIR=output &&
tar czf @project_name@-@tag@-@branch@-@commit_hash@-@[email protected]
extras butterbur/src compiler/eccss ecere/src ecere/res ide/src/designer/SyntaxHighlighting.ec ide/src/designer/SyntaxColorScheme.ec
ide/res/actions default.cf crossplatform.mk &&
cd output && tar czf @project_name@-@tag@-@branch@-@commit_hash@-@[email protected] * &&
cd .. && cd obj && tar czf @project_name@-@tag@-@branch@-@commit_hash@-@build_number@-binaries-linux-x86_64.tar.gz
linux && tar czf @project_name@-@tag@-@branch@-@commit_hash@-@[email protected]
linux.x32 && cd .. && tar czf @project_name@-@tag@-@branch@-@commit_hash@-@build_number@-bindings-linux-x86_64.tar.gz bindings &&
apt -y install libgif-dev &&
make PLATFORM=win32 NOT_OPENSSL_CURL=y OPENSSL_CONF=$(pwd)/win32/openssl/bin/openssl.cfg &&
mkdir output-win32 &&
make PLATFORM=win32 OPENSSL_CONF=$(pwd)/win32/openssl/bin/openssl.cfg DESTDIR=output-win32 install &&
cd output-win32 &&
tar czf @project_name@-@tag@-@branch@-@commit_hash@-@build_number@-output-windows-x86_64.tar.gz * &&
cd .. && apt -y install libgif-dev:i386 && make PLATFORM=win32 ARCH=x32
OPENSSL_CONF=$(pwd)/win32/openssl-x32/bin/openssl.cfg && mkdir output-win32-x32 &&
make PLATFORM=win32 ARCH=x32 NOT_OPENSSL_CURL=y OPENSSL_CONF=$(pwd)/win32/openssl-x32/bin/openssl.cfg DESTDIR=output-win32-x32 install &&
cd output-win32-x32 && tar czf @project_name@-@tag@-@branch@-@commit_hash@-@[email protected] * &&
cd .. && make PLATFORM=win32 ARCH=x32 OPENSSL_CONF=$(pwd)/win32/openssl-x32/bin/openssl.cfg installer &&
tar czf @project_name@-@tag@-@branch@-@commit_hash@-@[email protected] deps &&
cd obj && tar czf @project_name@-@tag@-@branch@-@commit_hash@-@build_number@-binaries-windows-x86_64.tar.gz win32 &&
tar czf @project_name@-@tag@-@branch@-@commit_hash@-@[email protected] win32.x32 &&
cd .. && cp installer/obj/release.win32.x32/setup-ecere-0.44.16pre-win32.exe @project_name@-@tag@-@branch@-@commit_hash@-@[email protected]
useTTY: true
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsLinuxInstall
sourcePath: output
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@[email protected]'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsWindowsInstall
sourcePath: output-win32
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@build_number@-output-windows-x86_64.tar.gz'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsWindows32BitInstall
sourcePath: output-win32-x32
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@[email protected]'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsLinuxBinaries
sourcePath: obj
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@build_number@-binaries-linux-x86_64.tar.gz'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsLinux32BitBinaries
sourcePath: obj
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@[email protected]'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsLinuxBindings
sourcePath: .
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@build_number@-bindings-linux-x86_64.tar.gz'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsWindowsBinaries
sourcePath: obj
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@build_number@-binaries-windows-x86_64.tar.gz'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsWindows32BitBinaries
sourcePath: obj
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@[email protected]'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsDeps
sourcePath: .
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@[email protected]'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: ArtefactsExtrasButterburSource
sourcePath: .
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@[email protected]'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: WindowsInstaller
sourcePath: .
artifacts: '@project_name@-@tag@-@branch@-@commit_hash@-@[email protected]'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
triggers:
- !PullRequestUpdateTrigger
projects: ecere-sdk
- !BranchUpdateTrigger
projects: ecere-sdk
projectDependencies:
- projectPath: win32-patches
buildProvider: !LastFinishedBuild
jobName: Build
refName: refs/heads/master
artifacts: '**'
accessTokenSecret: ssl-access
destinationPath: win32-patches
- projectPath: OpenSSL-win32
buildProvider: !LastFinishedBuild
jobName: Build
refName: refs/heads/master
artifacts: '**'
accessTokenSecret: ssl-access
destinationPath: OpenSSL-win32
- projectPath: curl
buildProvider: !LastFinishedBuild
jobName: Build
refName: refs/heads/master
artifacts: '**'
accessTokenSecret: ssl-access
destinationPath: curl
- projectPath: upx
buildProvider: !LastFinishedBuild
jobName: Build
refName: refs/heads/master
artifacts: '**'
accessTokenSecret: ssl-access
destinationPath: upx
retryCondition: never
maxRetries: 3
retryDelay: 30
caches:
- key: AptCache
path: /var/cache/apt
- key: AptList
path: /var/lib/apt/lists
- key: pip
path: /root/.cache/pip
timeout: 3600