forked from chenjim/mediasoup-client-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (73 loc) · 3.38 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
language: android
jdk:
- oraclejdk8
env:
global:
- ADB_INSTALL_TIMEOUT=8
- ABI=armeabi-v7a
# use google_apis flavor if no default flavor emulator
- EMU_FLAVOR=default
# PATH order is incredibly important. e.g. the 'emulator' script exists in more than one place!
- ANDROID_HOME=/usr/local/android-sdk
- TOOLS=${ANDROID_HOME}/tools
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${TOOLS}:${TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
matrix:
# only runs locally. Create+Start once from AndroidStudio to init sdcard. Then only from command-line w/-engine classic
# - API=15
# - API=16 AUDIO=-no-audio
# - API=17
# API18 has started being flaky
# - API=18
# Kernel/emulator mismatch failure probably fixible with -engine classic
# - API=19
# API 20 was Android Wear only
# - API=21 ABI=x86_64
# - API=22 ABI=x86_64
# - API=23 ABI=x86_64
# - API=24 ABI=x86_64
# - API=25 ABI=x86_64
#- API=26 ABI=x86_64 # Fails with unrecognized tests? orchestrator change or something?
- API=27 ABI=x86_64
# Slowness/timing issues / Fails with unresponsive adb command / so unrecognized API for adb
# - API=28 ABI=x86_64
# Fails I think because of perf + timeouts. 10 minute wait not enough, fixable
# - API=Q ABI=x86_64
# This block currently does not work, but it used to. API=28/Q are probably fixable
# but we don't need allow_failures to be on in master to work through them
#matrix:
# fast_finish: true # We can report success without waiting for these
# allow_failures:
# - API=28 ABI=x86_64
# #- env: API=28 ABI=x86_64 # allowing failure to see how it works flake-wise
android:
components:
# installing tools to start, then use `sdkmanager` below to get the rest
- tools
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
# Emulator Management: Create, Start and Wait
install:
- echo 'count=0' > /home/travis/.android/repositories.cfg # Avoid harmless sdkmanager warning
- echo y | sdkmanager "platform-tools" >/dev/null
- echo y | sdkmanager "tools" >/dev/null # A second time per Travis docs, gets latest versions
- echo y | sdkmanager "ndk;21.1.6352462" # Implicit gradle dependency - gradle drives changes
- echo y | sdkmanager "build-tools;30.0.2" >/dev/null # Implicit gradle dependency - gradle drives changes
- echo y | sdkmanager "platforms;android-$API" >/dev/null # We need the API of the emulator we will run
- echo y | sdkmanager "platforms;android-30" >/dev/null # We need the API of the current compileSdkVersion from gradle.properties
- echo y | sdkmanager --channel=4 "emulator" # Experiment with canary, specifying 28.0.3 (prior version) did not work
- echo y | sdkmanager "extras;android;m2repository" >/dev/null
- echo y | sdkmanager "system-images;android-$API;$EMU_FLAVOR;$ABI" #>/dev/null # install our emulator
- echo no | avdmanager create avd --force -n test -k "system-images;android-$API;$EMU_FLAVOR;$ABI" -c 10M
- emulator -verbose -avd test -no-accel -no-snapshot -no-window $AUDIO -camera-back none -camera-front none -selinux permissive -qemu -m 2048 &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- ./gradlew connectedAndroidTest
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/