mirror of https://github.com/tasks/tasks
Native Travis Android support
parent
f2e66d68b2
commit
7a9b45cb3c
@ -1,40 +1,14 @@
|
|||||||
language: java
|
language: android
|
||||||
jdk: oraclejdk7
|
jdk: oraclejdk7
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- ANDROID_SDKS=android-19,sysimg-19 ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
|
- ANDROID_SDKS=android-19,sysimg-19 ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
|
||||||
before_install:
|
|
||||||
# Install base Android SDK
|
|
||||||
- sudo apt-get update -qq
|
|
||||||
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
|
|
||||||
- wget http://dl.google.com/android/android-sdk_r22.3-linux.tgz
|
|
||||||
- tar xzf android-sdk_r22.3-linux.tgz
|
|
||||||
- export ANDROID_HOME=$PWD/android-sdk-linux
|
|
||||||
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
|
|
||||||
|
|
||||||
# install android build tools
|
|
||||||
- wget https://dl-ssl.google.com/android/repository/build-tools_r19.0.3-linux.zip
|
|
||||||
- unzip build-tools_r19.0.3-linux.zip -d $ANDROID_HOME
|
|
||||||
- mkdir -p $ANDROID_HOME/build-tools/
|
|
||||||
- mv $ANDROID_HOME/android-4.4.2 $ANDROID_HOME/build-tools/19.0.3
|
|
||||||
|
|
||||||
# Install required components.
|
|
||||||
# For a full list, run `android list sdk -a --extended`
|
|
||||||
# Other relevant API's
|
|
||||||
- echo yes | android update sdk --filter tools --no-ui --force > /dev/null
|
|
||||||
- echo yes | android update sdk --filter platform-tools --no-ui --force > /dev/null
|
|
||||||
- echo yes | android update sdk --filter android-19 --no-ui --force > /dev/null
|
|
||||||
- echo yes | android update sdk --filter sysimg-19 --no-ui --force > /dev/null
|
|
||||||
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null
|
|
||||||
|
|
||||||
# Create and start emulator
|
before_install:
|
||||||
#- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
|
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
|
||||||
#- emulator -avd test -no-skin -no-audio -no-window &
|
- emulator -avd test -no-skin -no-audio -no-window &
|
||||||
|
- ./.wait_for_emulator.sh
|
||||||
#before_script:
|
- adb shell input keyevent 82 &
|
||||||
#- adb wait-for-device
|
|
||||||
#- adb shell input keyevent 82 &
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./gradlew check
|
- ./gradlew test
|
||||||
#- ./gradlew :astrid:connectedInstrumentTest --stacktrace --info
|
|
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
bootanim=""
|
||||||
|
failcounter=0
|
||||||
|
until [[ "$bootanim" =~ "stopped" ]] || [[ "$bootanim" =~ "running" ]]; do
|
||||||
|
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
|
||||||
|
echo "$bootanim"
|
||||||
|
if [[ "$bootanim" =~ "not found" ]]; then
|
||||||
|
let "failcounter += 1"
|
||||||
|
if [[ $failcounter -gt 3 ]]; then
|
||||||
|
echo "Failed to start emulator"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
echo "Done"
|
Loading…
Reference in New Issue