-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
137 lines (117 loc) · 4.17 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
language: cpp
env:
- BUILD_TYPE=Debug
- BUILD_TYPE=Release
os:
- osx
matrix:
fast_finish: true
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- BUILD_TYPE=Debug
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- BUILD_TYPE=Release
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- MATRIX_EVAL="CC=clang && CXX=clang++"
- BUILD_TYPE=Debug
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- MATRIX_EVAL="CC=clang && CXX=clang++"
- BUILD_TYPE=Release
- language: android
jdk: oraclejdk8
os: linux
env:
global:
- ANDROID=true
- ANDROID_API_LEVEL=21
- EMULATOR_API_LEVEL=21
- ANDROID_BUILD_TOOLS=26.1.1
- ADB_INSTALL_TIMEOUT=5 # minutes
android:
components:
- tools
- platform-tools
- tools
- build-tools-${ANDROID_BUILD_TOOLS}
- android-${ANDROID_API_LEVEL}
- extra # ???
- add-on # ???
# - sys-img-armeabi-v7a-addon-google_apis-google-$EMULATOR_API_LEVEL
install:
# Accept SDK Licenses + Install NDK
- yes | sdkmanager --update > /dev/null
- sdkmanager ndk-bundle > /dev/null
# Install the system image.
# [DISABLED] Setting up AVD and starting an emulator
# - sdkmanager "system-images;android-24;default;armeabi-v7a" > /dev/null
# # Create and start emulator for the script. Meant to race the install task.
# - android list target
# - avdmanager list avd
# - echo no | avdmanager create avd --force -n test_AVD -k "system-images;android-24;default;armeabi-v7a"
# - android list target
# - avdmanager list avd
# - $ANDROID_HOME/emulator/emulator -avd test_AVD -no-audio -no-window &
script:
- set -e
- cd ./samples/android_run_tests/
- ./gradlew assembleRelease
# [DISABLED] installing apk on emulator
# - android-wait-for-emulator
# - adb shell input keyevent 82 &
# - adb devices
# - ./gradlew installRelease --stacktrace --debug
- language: objective-c
os: osx
script:
- export BUILD_DIR=$(pwd)/build-iOS
- mkdir ${BUILD_DIR} && pushd ${BUILD_DIR}
# Prepare && build
- cmake .. -G'Unix Makefiles' -DCCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../tools/ios-cmake/ios.toolchain.cmake -DIOS_PLATFORM=OS -DIOS_DEPLOYMENT_TARGET=9.0 -DCMAKE_OSX_ARCHITECTURES=arm64 -DMULTY_WITH_TESTS=1 -DMULTY_WITH_ALL_BLOCKCHAINS=ON
- cmake --build .
# Copy build artifacts to the sample app
- find . -iname '*.dylib' -or -iname '*.a' -not -path '*google*' -exec cp {} ../samples/iOS_run_tests/Libraries/ \;
# Copy headers to the sample app
- cp ../multy_core/*.h ../samples/iOS_run_tests/Headers
# Update Headers: Rename Error to MultyError due to name clash.
- sed -i '' -E 's/Error/MultyError/g' ../samples/iOS_run_tests/Headers/error.h
# Build the sample app with updated libs and headers
# - xcodebuild -list -project ../samples/iOS_run_tests/iOS_run_tests.xcodeproj
# - xcodebuild build -configuration Debug -project ../samples/iOS_run_tests/iOS_run_tests.xcodeproj #CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
before_script:
- eval "${MATRIX_EVAL}"
script:
- mkdir build && cd build
# TODO: split in multiple lines
- cmake .. -G'Unix Makefiles' -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DMULTY_MORE_WARNINGS=ON -DMULTY_TEST_DISABLE_DEATH_TESTS=ON -DMULTY_WARNINGS_AS_ERRORS=ON -DMULTY_WITH_TESTS=ON -DMULTY_WITH_TEST_APP=ON -DMULTY_WITH_ALL_BLOCKCHAINS=ON
- cmake --build . --target all
- ./multy