forked from openhab/openhab-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
90 lines (80 loc) · 3.04 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
language: android
jdk: oraclejdk8
env:
global:
- secure: fMBUkSsCBTw/U907w7Xm/yNzw4lq9yt7zFy0JyEZrA543LI7zQRIclIOtsDTUs0bwY+4KI08MNoYPLJ4TQhSJaH4wQ8b9C5TRsqXNfc0V718TcuYqSXqU6VPRVtX46/fCEWv/HAs0ksUKrHIlpWOwLPQpYDcKxwwlUndaakYKJ8=
before_cache:
- cd ${TRAVIS_BUILD_DIR}/gradle/caches/
- find . -name "*.lock" -exec rm -rfv {} \;
- cd ${TRAVIS_BUILD_DIR}
cache:
directories:
- "${TRAVIS_BUILD_DIR}/gradle/caches/"
- "${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/"
notifications:
email: false
android:
components:
- tools
- build-tools-25.0.2
- platform-tools
- tools
- android-22
- sys-img-armeabi-v7a-android-22
install:
- echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"
- echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2"
- ./gradlew --version
- sdkmanager --list || true
# Emulator Management: Create, Start and Wait
before_script:
- android list device
- echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a -d "5.4in FWVGA"
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
- android list target
script:
- ./gradlew build connectedCheck test jacocoTestReport
- bash assets/store_descriptions/generate_and_validate.sh
after_success:
- bash <(curl -s https://codecov.io/bash)
before_deploy:
- git config --local user.name "TravisCI"
- git config --local user.email "[email protected]"
- git add fastlane/*
- git commit -m "Update fastlane metadata"
#- git push origin :refs/heads/master
- openssl aes-256-cbc -K $encrypted_903a93ed2309_key -iv $encrypted_903a93ed2309_iv
-in keystore.enc -out keystore -d
- cp $TRAVIS_BUILD_DIR/keystore $HOME
- mkdir $HOME/apks_to_deploy
- cp mobile/build/outputs/apk/full/release/mobile-full-release-unsigned.apk $HOME/apks_to_deploy
- cp mobile/build/outputs/apk/foss/release/mobile-foss-release-unsigned.apk $HOME/apks_to_deploy
- cd $HOME/apks_to_deploy
# Sign apks
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $HOME/keystore
-storepass $storepass mobile-full-release-unsigned.apk sign
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $HOME/keystore
-storepass $storepass mobile-foss-release-unsigned.apk sign
# Verify signing
- jarsigner -verify mobile-full-release-unsigned.apk
- jarsigner -verify mobile-foss-release-unsigned.apk
# Zipalign apks
- ${ANDROID_HOME}/build-tools/25.0.2/zipalign -v 4 mobile-full-release-unsigned.apk mobile-full-release.apk
- ${ANDROID_HOME}/build-tools/25.0.2/zipalign -v 4 mobile-foss-release-unsigned.apk mobile-foss-release.apk
deploy:
provider: releases
prerelease: true
file:
- mobile-full-release.apk
- mobile-foss-release.apk
skip_cleanup: true
overwrite: true
on:
repo: openhab/openhab-android
jdk: oraclejdk8
branch: master
tags: true
api_key:
secure: JaDHY9PaBF625dfulN8ygmOvBk3ZDmnZZDr7IPwqJ9hZ+4WzS85om8F9+bgQlZTDDVUeaNZ03ZkfRZ81g9D0EEHF5WSFqgN8aUcNoAa8ViBFAQUeO1uTjVkiP0G7JOVRyW59HTTk6Cjr5eiGKkmeIGT9KgUUi+4Bw/6Quag8f8Y=