From 9465b0e2620d4e8d7a0a38e7c25f112d87e15b36 Mon Sep 17 00:00:00 2001 From: Jason Rogena Date: Mon, 29 Jan 2018 15:24:56 +0300 Subject: [PATCH] Update TravisCI Build File 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 --- .travis.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 118f91eb5..750208dca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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: @@ -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 & @@ -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= \ No newline at end of file +# secure: fAiZ4yA7DM6nUKh7nqsCTqZBb03VEAvi5NcRu5mNh5coNn/50XNeZl+qpv7Dw70Ef85Y/k68uc6KwTGVqPXEmVq9Hk3e7lqpBNN8rufvgCYDDGPmywBmU5BhSeykKo0Ee7llM3mRR/EipjIWw1+YvMcS3hCoygf/UlMDDhG0Jo0=