etlegacy-android/.travis.yml
2020-06-18 15:09:55 +02:00

56 lines
1.8 KiB
YAML

dist: xenial
os: linux
language: generic
jdk: oraclejdk8
sudo: required
android:
components:
- tools
- platform-tools
- tools
- android-25
- sys-img-arm64-v8a-google_apis-25
services:
- xvfb
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
- "$HOME/.android/build-cache"
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
before_script:
- sudo chmod +x gradlew
- git clone https://github.com/rafal1137/NDK_ETL.git
- mv NDK_ETL $HOME
- export ANDROID_NDK_HOME=$HOME/NDK_ETL/ndk-bundle
- chmod -R 775 $HOME/NDK_ETL/ndk-bundle
- echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license"
# Run xvfb
- "export DISPLAY=:99.0"
before_install:
- export ANDROID_HOME=~/android-sdk-linux
- wget -q "https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip" -O android-sdk-tools.zip
- unzip -q android-sdk-tools.zip -d ${ANDROID_HOME}
- rm android-sdk-tools.zip
- PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
- mkdir -p ~/.android
- touch ~/.android/repositories.cfg
- echo y | sdkmanager "cmake;3.10.2.4988404"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
# Emulator Management: Create, Start and Wait
- echo no | android create avd --force -n test -t android-25 --abi google_apis/arm64-v8a
- emulator -avd test &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- ./gradlew assembleDebug
after_script:
# now run the tests
- ./gradlew connectedAndroidTest