-
Notifications
You must be signed in to change notification settings - Fork 44
/
.travis.yml
98 lines (96 loc) · 4.06 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Specify xenial, but still get trusty. See
# https://travis-ci.community/t/bug-requesting-xenial-getting-precise-with-language-android/1773/6
# tl;dr - currently there isn't an android image build for Ubuntu 14.04 or later
# workaround - install everything from scratch using a minimal system
# example - https://travis-ci.com/G00fY2/android-ci-testproject/jobs/187085499/config
dist: xenial
language: android
jdk:
- oraclejdk11
# Accept all licenses
# licenses:
# - 'android-sdk-preview-license-.+'
# - 'android-sdk-license-.+'
# - 'google-gdk-license-.+'
android:
components:
# Travis workaround for Android SDK 25 License
# travis-ci/docs-travis-ci-com#779
#- tools # Update 24.0.2 to 24.4.1
#- platform-tools
# The BuildTools version used by your project
#- build-tools-28.0.3
# The SDK version used to compile your project
#- android-33
#- tools # Update SDK Tools to 25.2.5
# Additional components
- extra-android-support
- extra-google-m2repository
- extra-android-m2repository
# Emulator ABIs for testing
# - sys-img-armeabi-v7a-android-25
env:
global:
- TARGET_VERSION=33
- ANDROID_BUILD_TOOLS_VERSION=33.0.0
- ANDROID_HOME=~/android-sdk
git:
submodules: false
before_install:
- touch $HOME/.android/repositories.cfg
- wget "https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip" -O commandlinetools.zip
- unzip commandlinetools.zip -d $ANDROID_HOME/
- yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "platforms;android-${TARGET_VERSION}" --sdk_root=$ANDROID_HOME
- yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" --sdk_root=$ANDROID_HOME
# Install git submodules via https
- sed --in-place -e "s/git@github.com:/https:\/\/github.com\//" ".gitmodules"
- git submodule update --init --recursive
# Start the Android emulator https://docs.travis-ci.com/user/languages/android/#How-to-Create-and-Start-an-Emulator
- echo 'count=0' > /home/travis/.android/repositories.cfg
# - android list targets
# - sdkmanager --help || true
# - sdkmanager --verbose --list
# - yes | sdkmanager "tools" # Update tools from 25.2.5 to current
# - echo no | android create avd --force -n test -t android-25 --abi armeabi-v7a
# - emulator -avd test -no-audio -no-window &
# - android-wait-for-emulator
# - adb shell input keyevent 82 &
install:
# - sdkmanager --list || true
# - echo yes | sdkmanager "tools"
# - echo yes | sdkmanager "platforms;android-25"
# - echo yes | sdkmanager "extras;android;m2repository"
# - echo yes | sdkmanager "extras;google;m2repository"
# - echo yes | sdkmanager "system-images;android-25;google_apis;armeabi-v7a"
# - echo no | avdmanager create avd -n test -k "system-images;android-25;google_apis;armeabi-v7a" -f --abi "armeabi-v7a" --tag "google_apis"
# - emulator -avd test -engine classic -no-window -camera-back none -camera-front none -selinux permissive -verbose -qemu -m 512 &
# - adb wait-for-device get-serialno
# - ./gradlew --version
# - ./gradlew clean
# - sdkmanager --list || true
before_script:
# - android-wait-for-emulator
# - adb shell settings put global window_animation_scale 0 &
# - adb shell settings put global transition_animation_scale 0 &
# - adb shell settings put global animator_duration_scale 0 &
# - sleep 30
# - adb shell input keyevent 82 &
# - sleep 15
jobs:
include:
- stage: test
if: branch = master AND type = pull_request
name: "Run Automated Tests: Master PR"
script:
- pushd LearningMachine
- ./gradlew clean testDevDebug -PdisablePreDex -PdevBuild --console=plain
- stage: build
if: branch = master AND type = push
name: "Building Dev Debug build (unsigned) on $TRAVIS_BRANCH"
script:
- pushd LearningMachine
- ./gradlew clean assembleDevDebug -PdisablePreDex
# script:
# - ./scripts/build.sh
# after_success:
# - ./scripts/deliver.sh