-
Notifications
You must be signed in to change notification settings - Fork 91
322 lines (322 loc) · 11.8 KB
/
build-factory.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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# Copyright (c) 2018-2019 The Veil developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
name: Github Actions CI for Veil
on: [push, pull_request]
env:
SOURCE_ARTIFACT: source
jobs:
create-source-distribution:
name: Create Source Distribution
runs-on: ubuntu-20.04
env:
ARTIFACT_DIR: source
steps:
- name: Checkout
uses: actions/checkout@v2
# Needs qt and protobuf to configure qt and include veil-qt.1 in distribution
- name: Install Required Packages
run: |
sudo apt update
sudo apt install -y libboost-all-dev libdb-dev libdb++-dev libevent-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
- name: Create Distribution Tarball
run: |
./autogen.sh
./configure --with-incompatible-bdb
make dist
- name: Download Dependencies
run: make -C depends download
- name: Create Dependencies Tarball
run: tar -czf depends.tar.gz depends
- name: Prepare Files for Artifact
run: |
mkdir -p $ARTIFACT_DIR
mv depends.tar.gz veil-*.tar.gz $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ env.SOURCE_ARTIFACT }}
path: ${{ env.ARTIFACT_DIR }}
build-x86_64-linux:
name: Build for x86 Linux 64bit
needs: create-source-distribution
runs-on: ubuntu-20.04
env:
ARTIFACT_DIR: x86_64-linux-binaries
TEST_LOG_ARTIFACT_DIR: test-logs
steps:
- name: Getting Source
uses: actions/download-artifact@v1
with:
name: ${{ env.SOURCE_ARTIFACT }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
tar -xzf veil-*.tar.gz --strip-components=1
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Install Required Packages
run: |
sudo apt update
sudo apt install -y python3-zmq
- name: Build Dependencies
run: make -C depends -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Build Veil
run: |
./configure --disable-jni --enable-tests --with-comparison-tool=no --prefix=$(realpath depends/x86_64-pc-linux-gnu)
make -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Prepare Files for Artifact
run: |
mkdir -p $ARTIFACT_DIR
strip $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt}
mv $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_DIR }}
path: ${{ env.ARTIFACT_DIR }}
build-win64:
name: Build for Win64
needs: create-source-distribution
runs-on: ubuntu-20.04
env:
ARTIFACT_DIR: win64-binaries
steps:
- name: Getting Source
uses: actions/download-artifact@v1
with:
name: ${{ env.SOURCE_ARTIFACT }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
tar -xzf veil-*.tar.gz --strip-components=1
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Install Required Packages
run: |
sudo apt update
sudo apt install -y g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64
- name: Switch MinGW GCC and G++ to POSIX Threading
run: |
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Build Dependencies
run: make -C depends -j$(nproc) HOST=x86_64-w64-mingw32
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Build Veil
run: |
./configure --disable-jni --prefix=$(realpath depends/x86_64-w64-mingw32)
make -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Prepare Files for Artifact
run: |
mkdir -p $ARTIFACT_DIR
strip $SOURCE_ARTIFACT/src/{veil-cli.exe,veil-tx.exe,veild.exe,qt/veil-qt.exe}
mv $SOURCE_ARTIFACT/src/{veil-cli.exe,veil-tx.exe,veild.exe,qt/veil-qt.exe} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_DIR }}
path: ${{ env.ARTIFACT_DIR }}
build-osx64:
name: Build for MacOSX
needs: create-source-distribution
runs-on: ubuntu-20.04
env:
ARTIFACT_DIR: macosx-binaries
steps:
- name: Getting Source
uses: actions/download-artifact@v1
with:
name: ${{ env.SOURCE_ARTIFACT }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
tar -xzf veil-*.tar.gz --strip-components=1
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Install Required Packages
run: |
sudo apt update
sudo apt install -y python3-setuptools libcap-dev zlib1g-dev cmake
sudo -H pip install setuptools
- name: Get macOS SDK
run: |
mkdir -p depends/sdk-sources
mkdir -p depends/SDKs
curl https://bitcoincore.org/depends-sources/sdks/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz -o depends/sdk-sources/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz
tar -C depends/SDKs -xf depends/sdk-sources/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Build Dependencies
run: make -C depends HOST=x86_64-apple-darwin18 -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Build Veil
run: |
./configure --enable-c++17 --disable-jni --prefix=$(realpath depends/x86_64-apple-darwin18)
make -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Prepare Files for Artifact
run: |
mkdir -p $ARTIFACT_DIR
# strip fails with "Unable to recognise the format of the input file"
#strip $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt}
mv $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_DIR }}
path: ${{ env.ARTIFACT_DIR }}
build-aarch64-linux:
name: Build for ARM Linux 64bit
needs: create-source-distribution
runs-on: ubuntu-20.04
env:
ARTIFACT_DIR: aarch64-linux-binaries
steps:
- name: Getting Source
uses: actions/download-artifact@v1
with:
name: ${{ env.SOURCE_ARTIFACT }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
tar -xzf veil-*.tar.gz --strip-components=1
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Install Required Packages
run: |
sudo apt update
sudo apt install -y python3-zmq libcap-dev cmake g++-aarch64-linux-gnu
- name: Build Dependencies
run: make -C depends HOST=aarch64-linux-gnu -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Build Veil
run: |
./configure --disable-jni --prefix=$(realpath depends/aarch64-linux-gnu)
make -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Prepare Files for Artifact
run: |
mkdir -p $ARTIFACT_DIR
# strip fails with "Unable to recognise the format of the input file"
# strip $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt}
mv $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_DIR }}
path: ${{ env.ARTIFACT_DIR }}
build-arm-linux-gnueabihf:
name: Build for ARM Linux 32bit
needs: create-source-distribution
runs-on: ubuntu-20.04
env:
ARTIFACT_DIR: arm32-binaries
steps:
- name: Getting Source
uses: actions/download-artifact@v1
with:
name: ${{ env.SOURCE_ARTIFACT }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
tar -xzf veil-*.tar.gz --strip-components=1
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Install Required Packages
run: |
sudo apt update
sudo apt install -y g++-arm-linux-gnueabihf libgmp-dev
- name: Build Dependencies
run: make -C depends -j$(nproc) HOST=arm-linux-gnueabihf
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Build Veil
run: |
./configure --disable-jni --prefix=$(realpath depends/arm-linux-gnueabihf) --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++
make -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Prepare Files for Artifact
run: |
mkdir -p $ARTIFACT_DIR
# strip fails with "Unable to recognise the format of the input file"
# strip $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt}
mv $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_DIR }}
path: ${{ env.ARTIFACT_DIR }}
build-i686-linux32:
name: Build for x86 Linux 32bit
needs: create-source-distribution
runs-on: ubuntu-20.04
env:
ARTIFACT_DIR: i686-linux32-binaries
steps:
- name: Getting Source
uses: actions/download-artifact@v1
with:
name: ${{ env.SOURCE_ARTIFACT }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
tar -xzf veil-*.tar.gz --strip-components=1
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Install Required Packages
run: |
sudo apt update
sudo apt install -y python3-zmq gcc-multilib g++-multilib
- name: Build Dependencies
run: make -C depends -j$(nproc) HOST=i686-linux-gnu
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Build Veil
run: |
./configure --disable-jni --prefix=$(realpath depends/i686-linux-gnu)
make -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Prepare Files for Artifact
run: |
mkdir -p $ARTIFACT_DIR
strip $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt}
mv $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild,qt/veil-qt} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_DIR }}
path: ${{ env.ARTIFACT_DIR }}
build-riscv64-linux:
name: Build for RISCV Linux 64bit
needs: create-source-distribution
runs-on: ubuntu-22.04
env:
ARTIFACT_DIR: riscv64-linux-binaries
steps:
- name: Getting Source
uses: actions/download-artifact@v1
with:
name: ${{ env.SOURCE_ARTIFACT }}
- name: Extract Archives
run: |
tar -xzf depends.tar.gz
tar -xzf veil-*.tar.gz --strip-components=1
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Install Required Packages
run: |
sudo apt update
sudo apt install -y python3-zmq libcap-dev cmake g++-riscv64-linux-gnu
- name: Build Dependencies
run: make -C depends NO_QR=1 NO_QT=1 HOST=riscv64-linux-gnu -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Build Veil
run: |
./configure --disable-jni --without-gui --prefix=$(realpath depends/riscv64-linux-gnu)
make -j$(nproc)
working-directory: ${{ env.SOURCE_ARTIFACT }}
- name: Prepare Files for Artifact
run: |
mkdir -p $ARTIFACT_DIR
# strip fails with "Unable to recognise the format of the input file"
# strip $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild}
mv $SOURCE_ARTIFACT/src/{veil-cli,veil-tx,veild} $ARTIFACT_DIR
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_DIR }}
path: ${{ env.ARTIFACT_DIR }}