Changed CI from circle to travis.

This commit is contained in:
Amine 2017-07-21 12:13:51 +02:00
parent 1889b43786
commit 4924ddd172
4 changed files with 77 additions and 58 deletions

75
.travis.yml Normal file
View File

@ -0,0 +1,75 @@
language: android
jdk:
- oraclejdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.0
- android-26
- android-22
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- extra-android-support
- add-on
- extra
- sys-img-armeabi-v7a-android-22
licenses:
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
#install:
# - echo y | android update sdk --no-ui --filter "android-26,build-tools-26.0.0"
# - echo y | android update sdk --no-ui --all --filter "platform-tools, tools"
# - echo y | android update sdk --no-ui --all --filter "android-26, build-tools-26.0.0"
# - echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
# - echo y | android update sdk --no-ui --all --filter "extra-android-support"
# - echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
# - echo y | android update sdk --no-ui --all --filter "extra-google-google_play_services"
before_script:
- mkdir app/src/main/res/mipmap-hdpi
- convert -size 72x72 xc:white app/src/main/res/mipmap-hdpi/ic_launcher.png
- mkdir app/src/main/res/mipmap-mdpi
- convert -size 48x48 xc:white app/src/main/res/mipmap-mdpi/ic_launcher.png
- mkdir app/src/main/res/mipmap-xhdpi
- convert -size 96x96 xc:white app/src/main/res/mipmap-xhdpi/ic_launcher.png
- mkdir app/src/main/res/mipmap-xxhdpi
- convert -size 192x192 xc:white app/src/main/res/mipmap-xxhdpi/ic_launcher.png
- mkdir app/src/main/res/mipmap-xxxhdpi
- convert -size 512x512 xc:white app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
- echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
- adb shell input tap 650 300 &
script:
- ./gradlew assemble --configure-on-demand --no-daemon -P crashlyticsdemoApikey=$FABRIC_API_KEY -P crashlyticsdemoApisecret=$FABRIC_API_SECRET -P appLoginUrl=$LOGIN_URL -P appLoginUsername=$LOGIN_USER_NAME -P appLoginPassword=$LOGIN_PASSWORD -PdisablePreDex -Pandroid.threadPoolSize=1 -Porg.gradle.parallel=false
- ./gradlew connectedAndroidTest --configure-on-demand --no-daemon --stacktrace -P crashlyticsdemoApikey=$FABRIC_API_KEY -P crashlyticsdemoApisecret=$FABRIC_API_SECRET -P appLoginUrl=$LOGIN_URL -P appLoginUsername=$LOGIN_USER_NAME -P appLoginPassword=$LOGIN_PASSWORD -PdisablePreDex -Pandroid.threadPoolSize=1 -Porg.gradle.parallel=false
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
before_install:
- openssl aes-256-cbc -K $encrypted_cab814aaeabc_key -iv $encrypted_cab814aaeabc_iv
-in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar

View File

@ -1,8 +1,8 @@
# ReaderForSelfoss
[![Gitter chat](https://badges.gitter.im/amine-bou/ReaderForSelfoss.png)](https://gitter.im/amine-bou/ReaderForSelfoss)
[![Build Status](https://travis-ci.org/aminecmi/ReaderforSelfoss.svg?branch=master)](https://travis-ci.org/aminecmi/ReaderforSelfoss)
[![CircleCI](https://circleci.com/gh/aminecmi/ReaderforSelfoss/tree/master.svg?style=svg)](https://circleci.com/gh/aminecmi/ReaderforSelfoss/tree/master)
[![Gitter chat](https://badges.gitter.im/amine-bou/ReaderForSelfoss.png)](https://gitter.im/amine-bou/ReaderForSelfoss)
[![codebeat badge](https://codebeat.co/badges/bce66c0f-fd28-4341-a159-3b6dd22ac854)](https://codebeat.co/projects/github-com-aminecmi-readerforselfoss-master)

View File

@ -1,56 +0,0 @@
machine:
timezone: Europe/Paris
java:
version: 'oraclejdk8'
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
PATH: ANDROID_HOME:$ANDROID_HOME/platform-tools:$ANDROID_BUUILD:$ANDROID_HOME/tools:$PATH
_JAVA_OPTIONS: "-Xms512m -Xmx1024m"
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
pre:
- touch app/google-services.json
- echo $GOOGLE_SERVICES_JSON > app/google-services.json
- touch app/src/main/res/values/secrets.xml
- echo $SECRETS_XML > app/src/main/res/values/secrets.xml
- mkdir app/src/main/res/mipmap-hdpi
- convert -size 72x72 xc:white app/src/main/res/mipmap-hdpi/ic_launcher.png
- mkdir app/src/main/res/mipmap-mdpi
- convert -size 48x48 xc:white app/src/main/res/mipmap-mdpi/ic_launcher.png
- mkdir app/src/main/res/mipmap-xhdpi
- convert -size 96x96 xc:white app/src/main/res/mipmap-xhdpi/ic_launcher.png
- mkdir app/src/main/res/mipmap-xxhdpi
- convert -size 192x192 xc:white app/src/main/res/mipmap-xxhdpi/ic_launcher.png
- mkdir app/src/main/res/mipmap-xxxhdpi
- convert -size 512x512 xc:white app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
cache_directories:
- ~/.gradle
- ~/.android
override:
- echo y | android update sdk --no-ui --filter "android-26,build-tools-26.0.0"
- echo y | android update sdk --no-ui --all --filter "platform-tools, tools"
- echo y | android update sdk --no-ui --all --filter "android-26, build-tools-26.0.0"
- echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
- echo y | android update sdk --no-ui --all --filter "extra-android-support"
- echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
- echo y | android update sdk --no-ui --all --filter "extra-google-google_play_services"
test:
override:
- (TERM="dumb" ./gradlew assemble --configure-on-demand --no-daemon -P crashlyticsdemoApikey=$FABRIC_API_KEY -P crashlyticsdemoApisecret=$FABRIC_API_SECRET -P appLoginUrl=$LOGIN_URL -P appLoginUsername=$LOGIN_USER_NAME -P appLoginPassword=$LOGIN_PASSWORD -PdisablePreDex -Pandroid.threadPoolSize=1 -Porg.gradle.parallel=false):
timeout: 1440
- emulator -avd circleci-android22 -no-window:
background: true
parallel: true
- circle-android wait-for-boot
- sleep 30
- adb shell input keyevent 82
- adb shell input tap 650 300
- (TERM="dumb" ./gradlew connectedAndroidTest --configure-on-demand --no-daemon --stacktrace -P crashlyticsdemoApikey=$FABRIC_API_KEY -P crashlyticsdemoApisecret=$FABRIC_API_SECRET -P appLoginUrl=$LOGIN_URL -P appLoginUsername=$LOGIN_USER_NAME -P appLoginPassword=$LOGIN_PASSWORD -PdisablePreDex -Pandroid.threadPoolSize=1 -Porg.gradle.parallel=false):
timeout: 1440
- cp -r app/build/outputs $CIRCLE_ARTIFACTS
- cp -r app/build/reports/androidTests $CIRCLE_ARTIFACTS
- cp -r app/build/outputs/androidTest-results/* $CIRCLE_TEST_REPORTS

BIN
secrets.tar.enc Normal file

Binary file not shown.