forked from BeamMW/beam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
565 lines (537 loc) · 33.3 KB
/
.travis.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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
git:
depth: false
matrix:
include:
###############################################################################
# OSX Debug
###############################################################################
# DISABLED, since we don't check it
#- os: osx
# language: cpp
# cache: ccache
# osx_image: xcode10.1
# install:
# - export TZ=Etc/GMT-3
# - brew update
# - brew unlink cmake
# - brew install cmake
# - brew link cmake
# - brew install ccache
# - export PATH="/usr/local/opt/ccache/libexec:$PATH"
# - brew uninstall --ignore-dependencies boost
# - curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/5da5895add2f6b9320d654dd844d4827f6876c8b/Formula/boost.rb
# - brew install ./boost.rb
# - export OPENSSL_ROOT_DIR="/usr/local/opt/[email protected]"
# env:
# - BUILD_TYPE=Debug
# - OS_FOLDER=mac
# script:
# - git apply 3rdparty/protobuf-patch.diff
# - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBRANCH_NAME=$TRAVIS_BRANCH -DBEAM_HW_WALLET=Off .
# - make -j$(sysctl -n hw.ncpu)
# - ctest --verbose
# # extract build version
# - BEAM_VERSION="$(cat beam_version.gen)" && rm beam_version.gen
# - echo BEAM_VERSION = $BEAM_VERSION
###############################################################################
# OSX Release
###############################################################################
- os: osx
language: cpp
cache: ccache
osx_image: xcode10.1
install:
- export TZ=GMT-3
- sudo systemsetup -gettimezone
- brew update
- brew unlink cmake
- brew install cmake
- brew link cmake
- brew install ccache
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
- brew upgrade --ignore-pinned icu4c
- brew uninstall --ignore-dependencies sfcgal
- brew uninstall --ignore-dependencies cgal
- brew uninstall --ignore-dependencies node
- brew uninstall --ignore-dependencies postgresql
- brew uninstall --ignore-dependencies postgis
- brew uninstall --ignore-dependencies boost
- curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/5da5895add2f6b9320d654dd844d4827f6876c8b/Formula/boost.rb
- brew install ./boost.rb
- export OPENSSL_ROOT_DIR="/usr/local/opt/[email protected]"
- openssl aes-256-cbc -K $encrypted_1f9ebee66ea9_key -iv $encrypted_1f9ebee66ea9_iv -in macos_cert.enc -out macos_cert.tar -d
- tar xvf macos_cert.tar
# create custom keychain
- security create-keychain -p travis macos-build.keychain
- security default-keychain -s macos-build.keychain
- security unlock-keychain -p travis macos-build.keychain
- security set-keychain-settings -t 3600 -l ~/Library/Keychains/macos-build.keychain
# import certificates
- security import distkey.p12 -P $MACOS_DISTRIBUTION_KEY_PASSWORD -k ~/Library/Keychains/macos-build.keychain -T /usr/bin/codesign
- security import devapp.cer -k ~/Library/Keychains/macos-build.keychain -T /usr/bin/codesign
- security set-key-partition-list -S "apple-tool:,apple:" -s -k travis macos-build.keychain
env:
- BUILD_TYPE=Release
- OS_FOLDER=mac
script:
- git apply 3rdparty/protobuf-patch.diff
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDEBUG_MESSAGES_IN_RELEASE_MODE=On -DBEAM_LINK_TYPE=Static -DBRANCH_NAME=$TRAVIS_BRANCH -DBEAM_SIGN_MACOS_BINARY=On -DBEAM_HW_WALLET=Off .
- make -j$(sysctl -n hw.ncpu)
- ctest --verbose
# extract build version
- BEAM_VERSION="$(cat beam_version.gen)" && rm beam_version.gen
- echo BEAM_VERSION = $BEAM_VERSION
# sign our builds
- codesign --deep --force -v -s "$MACOS_SIGN_IDENTITY" -o runtime --timestamp beam/beam-node$BEAM_TARGET_SUFFIX
- codesign --deep --force -v -s "$MACOS_SIGN_IDENTITY" -o runtime --timestamp wallet/cli/beam-wallet$BEAM_TARGET_SUFFIX
- codesign --deep --force -v -s "$MACOS_SIGN_IDENTITY" -o runtime --timestamp wallet/api/wallet-api$BEAM_TARGET_SUFFIX
- codesign --deep --force -v -s "$MACOS_SIGN_IDENTITY" -o runtime --timestamp explorer/explorer-node$BEAM_TARGET_SUFFIX
###############################################################################
# IOS OS64 SIMULATOR64 COMBINED
###############################################################################
- os: osx
language: cpp
cache: ccache
osx_image: xcode10.1
install:
- export TZ=GMT-3
- brew update
- brew unlink cmake
- brew install cmake ccache
- brew link cmake
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
- brew uninstall --ignore-dependencies boost
- git clone --depth=1 https://github.com/BeamMW/boost-ios.git /Users/travis/boost-ios
- git clone --depth=1 https://github.com/BeamMW/boost-ios-simulator.git /Users/travis/boost-ios-simulator
- git clone --depth=1 https://github.com/BeamMW/openssl-ios.git /Users/travis/openssl-ios
- git clone --depth=1 https://github.com/leetal/ios-cmake.git /Users/travis/toolchain-ios
env:
- BUILD_TYPE=Release
- OPENSSL_ROOT_DIR="/Users/travis/openssl-ios/"
- OPENSSL_CRYPTO_LIBRARY="/Users/travis/openssl-ios/lib/libcrypto.a"
- OPENSSL_INCLUDE_DIR="/Users/travis/openssl-ios/include"
- OPENSSL_SSL_LIBRARY="/Users/travis/openssl-ios/lib/libssl.a"
- OPENSSL_LIBRARIES="/Users/travis/openssl-ios/lib"
script:
- git apply 3rdparty/protobuf-patch.diff
- export BOOST_ROOT_IOS="/Users/travis/boost-ios"
- cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=/Users/travis/toolchain-ios/ios.toolchain.cmake -DPLATFORM=OS64 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DDEPLOYMENT_TARGET=11.0 -DENABLE_BITCODE=NO -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_CRYPTO_LIBRARY -DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR -DOPENSSL_SSL_LIBRARY=$OPENSSL_SSL_LIBRARY -DOPENSSL_LIBRARIES=$OPENSSL_LIBRARIES -DIOS=YES -Wno-error=deprecated-declarations -Wno-error=deprecated -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES=CMAKE_WARN_DEPRECATED -B./build
- make -C ./build -j$(sysctl -n hw.ncpu)
- export BOOST_ROOT_IOS="/Users/travis/boost-ios-simulator"
- cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=/Users/travis/toolchain-ios/ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DDEPLOYMENT_TARGET=11.0 -DENABLE_BITCODE=NO -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_CRYPTO_LIBRARY=$OPENSSL_CRYPTO_LIBRARY -DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR -DOPENSSL_SSL_LIBRARY=$OPENSSL_SSL_LIBRARY -DOPENSSL_LIBRARIES=$OPENSSL_LIBRARIES -DIOS=YES -Wno-error=deprecated-declarations -Wno-error=deprecated -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES=CMAKE_WARN_DEPRECATED -B./build-simulator
- make -C ./build-simulator -j$(sysctl -n hw.ncpu)
after_success:
# extract build version
- BEAM_VERSION="$(cat beam_version.gen)" && rm beam_version.gen
- echo BEAM_VERSION = $BEAM_VERSION
- mkdir -p /Users/travis/beam-ios/include
- mkdir -p /Users/travis/beam-ios/lib
- find ./build -name \*.a -type f -exec cp {} /Users/travis/beam-ios/lib/ \;
- rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . /Users/travis/beam-ios/include/
- mkdir -p /Users/travis/beam-ios-simulator/include
- mkdir -p /Users/travis/beam-ios-simulator/lib
- find ./build-simulator -name \*.a -type f -exec cp {} /Users/travis/beam-ios-simulator/lib/ \;
- rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . /Users/travis/beam-ios-simulator/include/
- mkdir -p /Users/travis/beam-ios-combined/include
- mkdir -p /Users/travis/beam-ios-combined/lib
- find /Users/travis/beam-ios/lib -type f -print0 | while IFS= read -r -d $'\0' file; do lipo -create -output /Users/travis/beam-ios-combined/lib/$(basename "$file") "$file" /Users/travis/beam-ios-simulator/lib/$(basename "$file"); done;
- rsync -am --include='*.h' --include='*.hpp' --include='*/' --exclude='*' . /Users/travis/beam-ios-combined/include/
- BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/ios
- BUILDS_SERVER_LATEST_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/latest/$BUILD_TYPE/ios
- tar -cvzf beam-ios-$BEAM_VERSION.tar.gz -C /Users/travis beam-ios
- cp beam-ios-$BEAM_VERSION.tar.gz beam-ios.tar.gz
- tar -cvzf beam-ios-simulator-$BEAM_VERSION.tar.gz -C /Users/travis beam-ios-simulator
- cp beam-ios-simulator-$BEAM_VERSION.tar.gz beam-ios-simulator.tar.gz
- tar -cvzf beam-ios-combined-$BEAM_VERSION.tar.gz -C /Users/travis beam-ios-combined
- cp beam-ios-combined-$BEAM_VERSION.tar.gz beam-ios-combined.tar.gz
- curl --retry 3 --ftp-create-dirs -T beam-ios-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T beam-ios.tar.gz $BUILDS_SERVER_LATEST_PATH/
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/ios/" beam-ios-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/ios/" beam-ios.tar.gz
- curl --retry 3 --ftp-create-dirs -T beam-ios-simulator-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T beam-ios-simulator.tar.gz $BUILDS_SERVER_LATEST_PATH/
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/ios/" beam-ios-simulator-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/ios/" beam-ios-simulator.tar.gz
- curl --retry 3 --ftp-create-dirs -T beam-ios-combined-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T beam-ios-combined.tar.gz $BUILDS_SERVER_LATEST_PATH/
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/ios/" beam-ios-combined-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/ios/" beam-ios-combined.tar.gz
###############################################################################
# Linux Debug
###############################################################################
# DISABLED, since we don't check it
#- os: linux
# dist: trusty
# language: cpp
# cache: ccache
# addons:
# apt:
# update: true
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - g++-7
# - libssl-dev
# - curl
# install:
# - export TZ=Etc/GMT-3
# # install new version cmake
# - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
# - mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
# - travis_retry wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz
# - tar -xvf cmake-3.14.0-Linux-x86_64.tar.gz > /dev/null
# - mv cmake-3.14.0-Linux-x86_64 cmake-install
# - PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
# - cd ${TRAVIS_BUILD_DIR}
# - cmake --version
# - sudo git clone --depth=1 https://github.com/BeamMW/boost-linux.git /usr/local/boost_1_69_0
# - export BOOST_ROOT="/usr/local/boost_1_69_0"
# - eval "CC=gcc-7 && CXX=g++-7"
# env:
# - BUILD_TYPE=Debug
# - OS_FOLDER=linux
# script:
# - git apply 3rdparty/protobuf-patch.diff
# - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBRANCH_NAME=$TRAVIS_BRANCH -DBEAM_HW_WALLET=Off .
# - make -j$(nproc)
# - ctest --verbose
# # extract build version
# - BEAM_VERSION="$(cat beam_version.gen)" && rm beam_version.gen
# - echo BEAM_VERSION = $BEAM_VERSION
###############################################################################
# Linux Release
###############################################################################
- os: linux
dist: trusty
language: cpp
cache: ccache
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- libssl-dev
- curl
- libxi-dev
- libcups2-dev
install:
- export TZ=Etc/GMT-3
# install new version cmake
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
- travis_retry wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz
- tar -xvf cmake-3.14.0-Linux-x86_64.tar.gz > /dev/null
- mv cmake-3.14.0-Linux-x86_64 cmake-install
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
- cd ${TRAVIS_BUILD_DIR}
- cmake --version
- sudo git clone --depth=1 https://github.com/BeamMW/boost-linux.git /usr/local/boost_1_69_0
- export BOOST_ROOT="/usr/local/boost_1_69_0"
- eval "CC=gcc-7 && CXX=g++-7"
env:
- BUILD_TYPE=Release
- OS_FOLDER=linux
script:
- git apply 3rdparty/protobuf-patch.diff
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDEBUG_MESSAGES_IN_RELEASE_MODE=On -DBEAM_LINK_TYPE=Static -DBRANCH_NAME=$TRAVIS_BRANCH -DBEAM_HW_WALLET=Off .
- make -j$(nproc)
- ctest --verbose
# extract build version
- BEAM_VERSION="$(cat beam_version.gen)" && rm beam_version.gen
- echo BEAM_VERSION = $BEAM_VERSION
###############################################################################
# Android x86 Release
###############################################################################
- os: linux
dist: trusty
language: android
env:
- ANDROID_ABI=x86
- BUILD_TYPE=Release
- ANDROID_SDK_VERSION=23
android:
components:
- tools
- platform-tools
- android-23
install:
- echo y | sdkmanager "ndk-bundle"
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
- travis_retry wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz
- tar -xvf cmake-3.14.0-Linux-x86_64.tar.gz > /dev/null
- mv cmake-3.14.0-Linux-x86_64 cmake-install
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
- cd ${TRAVIS_BUILD_DIR}
- cmake --version
- sudo git clone --depth=1 https://github.com/BeamMW/boost-android.git /usr/local/boost_1_68-android
- sudo git clone --depth=1 https://github.com/BeamMW/openssl-android.git /usr/local/Prebuilt-OpenSSL-Android
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
- export BOOST_ROOT_ANDROID=/usr/local/boost_1_68-android
- export OPENSSL_ROOT_DIR_ANDROID=/usr/local/Prebuilt-OpenSSL-Android
- export PATH=$ANDROID_NDK_HOME:$PATH
script:
- cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=$ANDROID_SDK_VERSION -DANDROID_ABI=$ANDROID_ABI -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
- make wallet-jni -j$(nproc)
after_success:
# extract build version
- BEAM_VERSION="$(cat beam_version.gen)" && rm beam_version.gen
- echo BEAM_VERSION = $BEAM_VERSION
- BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/android-$ANDROID_ABI
- BUILDS_SERVER_LATEST_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/latest/$BUILD_TYPE/android-$ANDROID_ABI
- tar -cvzf libwallet-jni-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/android libwallet-jni.so com
- tar -cvzf libwallet-jni.tar.gz --directory=$HOME/build/BeamMW/beam/android libwallet-jni.so com
- curl --retry 3 --ftp-create-dirs -T libwallet-jni-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T libwallet-jni.tar.gz $BUILDS_SERVER_LATEST_PATH/
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/android-$ANDROID_ABI/" libwallet-jni-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/android-$ANDROID_ABI/" libwallet-jni.tar.gz
###############################################################################
# Android x86_64 Release
###############################################################################
- os: linux
dist: trusty
language: android
env:
- ANDROID_ABI=x86_64
- BUILD_TYPE=Release
- ANDROID_SDK_VERSION=23
android:
components:
- tools
- platform-tools
- android-23
install:
- echo y | sdkmanager "ndk-bundle"
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
- travis_retry wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz
- tar -xvf cmake-3.14.0-Linux-x86_64.tar.gz > /dev/null
- mv cmake-3.14.0-Linux-x86_64 cmake-install
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
- cd ${TRAVIS_BUILD_DIR}
- cmake --version
- sudo git clone --depth=1 https://github.com/BeamMW/boost-android.git /usr/local/boost_1_68-android
- sudo git clone --depth=1 https://github.com/BeamMW/openssl-android.git /usr/local/Prebuilt-OpenSSL-Android
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
- export BOOST_ROOT_ANDROID=/usr/local/boost_1_68-android
- export OPENSSL_ROOT_DIR_ANDROID=/usr/local/Prebuilt-OpenSSL-Android
- export PATH=$ANDROID_NDK_HOME:$PATH
script:
- cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=$ANDROID_SDK_VERSION -DANDROID_ABI=$ANDROID_ABI -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
- make wallet-jni -j$(nproc)
after_success:
# extract build version
- BEAM_VERSION="$(cat beam_version.gen)" && rm beam_version.gen
- echo BEAM_VERSION = $BEAM_VERSION
- BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/android-$ANDROID_ABI
- BUILDS_SERVER_LATEST_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/latest/$BUILD_TYPE/android-$ANDROID_ABI
- tar -cvzf libwallet-jni-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/android libwallet-jni.so com
- tar -cvzf libwallet-jni.tar.gz --directory=$HOME/build/BeamMW/beam/android libwallet-jni.so com
- curl --retry 3 --ftp-create-dirs -T libwallet-jni-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T libwallet-jni.tar.gz $BUILDS_SERVER_LATEST_PATH/
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/android-$ANDROID_ABI/" libwallet-jni-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/android-$ANDROID_ABI/" libwallet-jni.tar.gz
###############################################################################
# Android ARMv7 Release
###############################################################################
- os: linux
dist: trusty
language: android
env:
- ANDROID_ABI=armeabi-v7a
- BUILD_TYPE=Release
- ANDROID_SDK_VERSION=23
android:
components:
- tools
- platform-tools
- android-23
install:
- echo y | sdkmanager "ndk-bundle"
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
- travis_retry wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz
- tar -xvf cmake-3.14.0-Linux-x86_64.tar.gz > /dev/null
- mv cmake-3.14.0-Linux-x86_64 cmake-install
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
- cd ${TRAVIS_BUILD_DIR}
- cmake --version
- sudo git clone --depth=1 https://github.com/BeamMW/boost-android.git /usr/local/boost_1_68-android
- sudo git clone --depth=1 https://github.com/BeamMW/openssl-android.git /usr/local/Prebuilt-OpenSSL-Android
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
- export BOOST_ROOT_ANDROID=/usr/local/boost_1_68-android
- export OPENSSL_ROOT_DIR_ANDROID=/usr/local/Prebuilt-OpenSSL-Android
- export PATH=$ANDROID_NDK_HOME:$PATH
script:
- cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=$ANDROID_SDK_VERSION -DANDROID_ABI=$ANDROID_ABI -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
- make wallet-jni -j$(nproc)
after_success:
# extract build version
- BEAM_VERSION="$(cat beam_version.gen)" && rm beam_version.gen
- echo BEAM_VERSION = $BEAM_VERSION
- BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/android-$ANDROID_ABI
- BUILDS_SERVER_LATEST_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/latest/$BUILD_TYPE/android-$ANDROID_ABI
- tar -cvzf libwallet-jni-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/android libwallet-jni.so com
- tar -cvzf libwallet-jni.tar.gz --directory=$HOME/build/BeamMW/beam/android libwallet-jni.so com
- curl --retry 3 --ftp-create-dirs -T libwallet-jni-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T libwallet-jni.tar.gz $BUILDS_SERVER_LATEST_PATH/
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/android-$ANDROID_ABI/" libwallet-jni-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/android-$ANDROID_ABI/" libwallet-jni.tar.gz
###############################################################################
# Android ARMv8 Release
###############################################################################
- os: linux
dist: trusty
language: android
env:
- ANDROID_ABI=arm64-v8a
- BUILD_TYPE=Release
- ANDROID_SDK_VERSION=23
android:
components:
- tools
- platform-tools
- android-23
install:
- echo y | sdkmanager "ndk-bundle"
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
- travis_retry wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz
- tar -xvf cmake-3.14.0-Linux-x86_64.tar.gz > /dev/null
- mv cmake-3.14.0-Linux-x86_64 cmake-install
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
- cd ${TRAVIS_BUILD_DIR}
- cmake --version
- sudo git clone --depth=1 https://github.com/BeamMW/boost-android.git /usr/local/boost_1_68-android
- sudo git clone --depth=1 https://github.com/BeamMW/openssl-android.git /usr/local/Prebuilt-OpenSSL-Android
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
- export BOOST_ROOT_ANDROID=/usr/local/boost_1_68-android
- export OPENSSL_ROOT_DIR_ANDROID=/usr/local/Prebuilt-OpenSSL-Android
- export PATH=$ANDROID_NDK_HOME:$PATH
script:
- cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=$ANDROID_SDK_VERSION -DANDROID_ABI=$ANDROID_ABI -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
- make wallet-jni -j$(nproc)
after_success:
# extract build version
- BEAM_VERSION="$(cat beam_version.gen)" && rm beam_version.gen
- echo BEAM_VERSION = $BEAM_VERSION
- BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/android-$ANDROID_ABI
- BUILDS_SERVER_LATEST_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/latest/$BUILD_TYPE/android-$ANDROID_ABI
- tar -cvzf libwallet-jni-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/android libwallet-jni.so com
- tar -cvzf libwallet-jni.tar.gz --directory=$HOME/build/BeamMW/beam/android libwallet-jni.so com
- curl --retry 3 --ftp-create-dirs -T libwallet-jni-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T libwallet-jni.tar.gz $BUILDS_SERVER_LATEST_PATH/
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/android-$ANDROID_ABI/" libwallet-jni-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/android-$ANDROID_ABI/" libwallet-jni.tar.gz
###############################################################################
# Key Keeper Web Assembly Release
###############################################################################
- os: linux
dist: bionic
language: cpp
env:
- TARGET_TYPE=wasm
- BUILD_TYPE=MinSizeRel
sudo: required
services:
- docker
install:
- docker run -e BOOST_ROOT='/usr/local/boost_1_69_0' -dit --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash
script:
- docker exec -it emscripten git clone --depth=1 https://github.com/BeamMW/boost-linux.git /usr/local/boost_1_69_0
- docker exec -it emscripten emcmake cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE keykeeper
- docker exec -it emscripten make -j$(nproc)
after_success:
- tar -cvzf wasm-key-keeper.tar.gz wasm-key-keeper.*
- BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$TARGET_TYPE
- curl --retry 3 --ftp-create-dirs -T wasm-key-keeper.tar.gz $BUILDS_SERVER_PATH/
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$TARGET_TYPE/" wasm-key-keeper.tar.gz
###############################################################################
# Service balancer
###############################################################################
#
# - os: linux
# dist: bionic
# language: go
# env:
# - TARGET_TYPE=go
# - BUILD_TYPE=Release
# - GOOS=linux
# - GOARCH=amd64
# go:
# - 1.13.x
# install:
# - export BALANCER_PATH=wallet/service-balancer
# script:
# - cd $HOME/build/BeamMW/beam/wallet/service-balancer/ && go build
# after_success:
# - tar cvzf service-balancer.tar.gz --directory=$HOME/build/BeamMW/beam/wallet/service-balancer/ service-balancer config.json
# - cd $HOME/build/BeamMW/beam/wallet/service-balancer && ls
# - BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$TARGET_TYPE
# - curl --retry 3 --ftp-create-dirs -T service-balancer.tar.gz $BUILDS_SERVER_PATH/
# - artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$TARGET_TYPE/" service-balancer.tar.gz
# - artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/$TARGET_TYPE/" service-balancer.tar.gz
###############################################################################
# Common part
###############################################################################
before_script:
- curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
- BEAM_TARGET_SUFFIX="-masternet"
- BEAM_DISPLAY_SUFFIX="Masternet"
- BEAM_DISPLAY_SUFFIX2="-Masternet"
after_success:
# deploy using ftp server
- BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$OS_FOLDER
- tar -cvzf beam-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/beam beam-node$BEAM_TARGET_SUFFIX beam-node.cfg
- tar -cvzf beam-wallet-cli$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/wallet/cli beam-wallet$BEAM_TARGET_SUFFIX beam-wallet.cfg
- tar -cvzf wallet-api$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/wallet/api/ wallet-api$BEAM_TARGET_SUFFIX wallet-api.cfg
# - tar -cvzf wallet-service$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/wallet/service wallet-service$BEAM_TARGET_SUFFIX
# - tar -cvzf sbbs-monitor$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/wallet/service sbbs-monitor$BEAM_TARGET_SUFFIX
- tar -cvzf explorer-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/explorer explorer-node$BEAM_TARGET_SUFFIX explorer-node.cfg
- tar -cvzf broadcaster$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz --directory=$HOME/build/BeamMW/beam/wallet/broadcaster broadcaster$BEAM_TARGET_SUFFIX
# upload binaries to FTP
- curl --retry 3 --ftp-create-dirs -T beam-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T beam-wallet-cli$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T wallet-api$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
# - curl --retry 3 --ftp-create-dirs -T wallet-service$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
# - curl --retry 3 --ftp-create-dirs -T sbbs-monitor$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T explorer-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
- curl --retry 3 --ftp-create-dirs -T broadcaster$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_PATH/
# upload binaries to FTP, to the latest folder
- BUILDS_SERVER_LATEST_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/latest/$BUILD_TYPE/$OS_FOLDER
- curl --retry 3 --ftp-create-dirs -T beam-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_LATEST_PATH/beam-node$BEAM_TARGET_SUFFIX.tar.gz
- curl --retry 3 --ftp-create-dirs -T beam-wallet-cli$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_LATEST_PATH/beam-wallet-cli$BEAM_TARGET_SUFFIX.tar.gz
- curl --retry 3 --ftp-create-dirs -T wallet-api$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_LATEST_PATH/wallet-api$BEAM_TARGET_SUFFIX.tar.gz
# - curl --retry 3 --ftp-create-dirs -T wallet-service$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_LATEST_PATH/wallet-service$BEAM_TARGET_SUFFIX.tar.gz
# - curl --retry 3 --ftp-create-dirs -T sbbs-monitor$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_LATEST_PATH/sbbs-monitor$BEAM_TARGET_SUFFIX.tar.gz
- curl --retry 3 --ftp-create-dirs -T explorer-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_LATEST_PATH/explorer-node$BEAM_TARGET_SUFFIX.tar.gz
- curl --retry 3 --ftp-create-dirs -T broadcaster$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz $BUILDS_SERVER_LATEST_PATH/broadcaster$BEAM_TARGET_SUFFIX.tar.gz
# upload binaries to S3
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$OS_FOLDER/" beam-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$OS_FOLDER/" beam-wallet-cli$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$OS_FOLDER/" wallet-api$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz
# - artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$OS_FOLDER/" wallet-service$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz
# - artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$OS_FOLDER/" sbbs-monitor$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$OS_FOLDER/" explorer-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$BUILD_TYPE/$OS_FOLDER/" broadcaster$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz
# prep for deploy to AWS S3, latest folder
- cp beam-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz beam-node$BEAM_TARGET_SUFFIX.tar.gz
- cp beam-wallet-cli$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz beam-wallet-cli$BEAM_TARGET_SUFFIX.tar.gz
- cp wallet-api$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz wallet-api$BEAM_TARGET_SUFFIX.tar.gz
# - cp wallet-service$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz wallet-service$BEAM_TARGET_SUFFIX.tar.gz
# - cp sbbs-monitor$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz sbbs-monitor$BEAM_TARGET_SUFFIX.tar.gz
- cp explorer-node$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz explorer-node$BEAM_TARGET_SUFFIX.tar.gz
- cp broadcaster$BEAM_TARGET_SUFFIX-$BEAM_VERSION.tar.gz broadcaster$BEAM_TARGET_SUFFIX.tar.gz
# upload binaries to S3, to the latest folder
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/$OS_FOLDER/" beam-node$BEAM_TARGET_SUFFIX.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/$OS_FOLDER/" beam-wallet-cli$BEAM_TARGET_SUFFIX.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/$OS_FOLDER/" wallet-api$BEAM_TARGET_SUFFIX.tar.gz
# - artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/$OS_FOLDER/" wallet-service$BEAM_TARGET_SUFFIX.tar.gz
# - artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/$OS_FOLDER/" sbbs-monitor$BEAM_TARGET_SUFFIX.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/$OS_FOLDER/" explorer-node$BEAM_TARGET_SUFFIX.tar.gz
- artifacts upload --target-paths "$TRAVIS_BRANCH/latest/$BUILD_TYPE/$OS_FOLDER/" broadcaster$BEAM_TARGET_SUFFIX.tar.gz
notifications:
email: