forked from NativeScript/android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (64 loc) · 2.43 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
env:
global:
- NODE_VERSION=10
- NDK_VERSION=r21b
- DATE=$(date +%Y-%m-%d)
- PACKAGE_VERSION=next-$DATE-$TRAVIS_BUILD_NUMBER
- EMULATOR_API_LEVEL=21
- ANDROID_ABI=armeabi-v7a
- EMULATOR_NAME=runtime-emu
- BUILD_TOOLS=29.0.2
- ANDROID_API=29
matrix:
include:
- stage: "Build and Tests"
sudo: true
language: android
jdk: oraclejdk8
android:
components:
- android-$EMULATOR_API_LEVEL
- extra-android-support
- extra-android-m2repository
- cmake
- sys-img-$ANDROID_ABI-android-$EMULATOR_API_LEVEL
git:
submodules: false
script:
# (master branch) build the runtime twice - optimized, and regular packages, skip on PRs
# test-app/gradlew runtests will take care of building the runtime for its testing needs
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./gradlew -PpreReleaseVersion=$PACKAGE_VERSION -PgitCommitVersion=$TRAVIS_COMMIT -PnoCCache --stacktrace; fi'
- echo no | android create avd --force -n $EMULATOR_NAME-$EMULATOR_API_LEVEL -t android-$EMULATOR_API_LEVEL --abi $ANDROID_ABI -c 12M
- emulator -avd $EMULATOR_NAME-$EMULATOR_API_LEVEL -no-skin -no-audio -no-window &
- android-wait-for-emulator
- npm install --prefix ./test-app/tools
- "./gradlew runSbgTests --stacktrace && ./gradlew runtestsAndVerifyResults -PnoCCache --stacktrace"
- adb -e logcat -d
before_install:
- echo "y" | sdkmanager "cmake;3.6.4111459"
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
- wget https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip
- chmod +x android-ndk-$NDK_VERSION-linux-x86_64.zip
- "unzip -q android-ndk-$NDK_VERSION-linux-x86_64.zip"
- "rm -rf android-ndk-$NDK_VERSION-linux-x86_64.zip"
- export ANDROID_NDK_HOME=`pwd`/android-ndk-$NDK_VERSION
- export PATH=${PATH}:${ANDROID_NDK_HOME}
android:
components:
- platform-tools
- tools
- build-tools-$BUILD_TOOLS
- android-$ANDROID_API
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
install:
- nvm install $NODE_VERSION