Skip to content

Commit

Permalink
Update TravisCI Build File
Browse files Browse the repository at this point in the history
Update the TravisCI build file:
 - Make the ANDROID_API_LEVEL and ANDROID_ABI environment variables global
 - Use the Google ABI x86_64 emulator
 - Use the latest SDK Platform Tools

Par ot fix for #68

Signed-off-by: Jason Rogena <[email protected]>
  • Loading branch information
jasonrogena committed Jan 29, 2018
1 parent 55299b4 commit 9465b0e
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@ language: android
# Setting sudo to required prevents Travis from testing the project in a Docker container.
sudo: required
jdk: oraclejdk8
dist: precise
dist: xenial

env:
matrix:
- ANDROID_TARGET=android-26 ANDROID_ABI=google_apis/x86_64
global:
# wait up to 10 minutes for adb to connect to emulator
- ADB_INSTALL_TIMEOUT=10
- MALLOC_ARENA_MAX=2
- ANDROID_API_LEVEL=26
- ANDROID_ABI=x86_64
- ANDROID_TAG=google_apis
- QEMU_AUDIO_DRV=none # Remove audio

android:
components:
# tools required
- tools
- tools # to get the new `repository-11.xml`
- platform-tools
- tools # to install Android SDK tools 25.1.x
# The BuildTools version used by your project
- build-tools-26.0.2
# The SDK version used to compile your projects
Expand All @@ -29,7 +32,11 @@ android:

# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-x86_64-google_apis-26
- sys-img-${ANDROID_ABI}-google_apis-${ANDROID_API_LEVEL}

before_install:
- sudo apt-get -qq update
- sudo apt-get install -y pax

addons:
apt_packages:
Expand All @@ -38,9 +45,11 @@ addons:
before_script:
# Emulator Management: Create, Start and Wait
- android list sdk --no-ui --all --extended
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
- sudo find / -iname "avdmanager"
- echo no | android create avd --force -n test -t android-$ANDROID_API_LEVEL --abi google_apis/$ANDROID_ABI
# - echo no | avdmanager create avd --force --name test --package "system-images;android-$ANDROID_API_LEVEL;google_apis;$ANDROID_ABI" --abi google_apis/$ANDROID_ABI
- ls -la
- emulator64-x86 -avd test -no-skin -no-audio -no-window &
- emulator -avd test -no-skin -no-audio -no-window &
- timeout 1200 adb wait-for-device
- adb shell input keyevent 82 &

Expand All @@ -59,4 +68,4 @@ after_failure:
# Add this once a slack notification channel for Kujaku project app is created
#notifications:
# slack:
# secure: fAiZ4yA7DM6nUKh7nqsCTqZBb03VEAvi5NcRu5mNh5coNn/50XNeZl+qpv7Dw70Ef85Y/k68uc6KwTGVqPXEmVq9Hk3e7lqpBNN8rufvgCYDDGPmywBmU5BhSeykKo0Ee7llM3mRR/EipjIWw1+YvMcS3hCoygf/UlMDDhG0Jo0=
# secure: fAiZ4yA7DM6nUKh7nqsCTqZBb03VEAvi5NcRu5mNh5coNn/50XNeZl+qpv7Dw70Ef85Y/k68uc6KwTGVqPXEmVq9Hk3e7lqpBNN8rufvgCYDDGPmywBmU5BhSeykKo0Ee7llM3mRR/EipjIWw1+YvMcS3hCoygf/UlMDDhG0Jo0=

0 comments on commit 9465b0e

Please sign in to comment.