-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
90 lines (80 loc) · 3.43 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
# https://docs.travis-ci.com/user/languages/android/
language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
# - tools
# - platform-tools
# The BuildTools version used by your project
- build-tools-26.0.3
# The SDK version used to compile your project
- android-27
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-26
- extra-android-support
# Specify at least one system image,
# if you need to run emulator(s) during your tests
#- sys-img-armeabi-v7a-android-26
#- sys-img-armeabi-v7a-android-17
# https://github.com/googlesamples/android-ndk/blob/master/.travis.yml
# https://docs.travis-ci.com/user/customizing-the-build/#Building-Specific-Branches
branches:
only:
- master
- dev
- release
- /^picgo_.*\.dev_.*$/
- /^picgo_.*\.beta_.*$/
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
before_install:
# - rm -fr $HOME/android-ndk-r16b
#- curl -L http://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip -O
#- unzip -oq android-ndk-r16b-linux-x86_64.zip
#- rm android-ndk-r16b-linux-x86_64.zip
#- export ANDROID_NDK_HOME=$HOME/android-ndk-r16b
#https://github.com/leinardi/androidthings-pio/blob/master/.travis.yml
- mkdir -p $ANDROID_HOME/licenses
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license
install:
- echo y | sdkmanager 'ndk-bundle'
- echo y | sdkmanager 'cmake;3.6.4111459'
- echo y | sdkmanager 'lldb;3.0'
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.m2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
script:
- chmod +x ./gradlew
- ./gradlew clean assembleRelease
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "[email protected]"
- git config --local user.email "[email protected]"
# package .apk
- bash ./tools/ci/ci-package-travis.sh
- export RELEASE_PKG_FILE=$(ls ./app/build/outputs/ci-travis-apk/*.apk)
- echo "deploying $RELEASE_PKG_FILE to GitHub releases"
#- chmod +x ./toos/ci/ci-print-version.sh; APP_FILE_NAME=$(./tools/ci/ci-print-version.sh )
#- echo "change tag name to $APP_FILE_NAME"
#- git tag "$APP_FILE_NAME"
# git tag "$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)"
deploy:
provider: releases
api_key:
secure: TtFEMB2vx/4PVCZbXsdLkCyGoUNk+8fBpaxQrC0paS+UPq3jRcEc/NNP77VxtvFLv4qzJl39bmY7DcmJbcNLwYvfZ1YzGRa/BRHFKEjurSefbA6cOFqD04+UjDy3R8PzXKo9VGXscDyGlAL2u07aG4mlYPcSXqYpa9DCPWJU724xqZ7AzijB8x7SNiIzdvx3P6b9xq67yYKZan+ayhl30Ur0CKcPp9MucaXUw24z7d1Tt8ti7sG/9qq245WOcVgcQkCmVNNQITnJDnrB4qZrb5GAZFLwOJblAuS7vmSX0ofOCnvzNwDN2DtDDyR1JCpuxuSV9SBlU395P/8+I6aIoNutuFxcvgZKYqNa3rBguhKT9jpghq6cCQPDLP6fZrPQRrezKsrFX3Wq58dbhLb7gYrzOputVMtHGg2kGTCAJf5kBC4XZOwkogbcoLZJKWYnzJ8ahs2WUZdQO7azxyw0j409tj4fAOpuJVySEBFh46kZm8D73Xcx7kBjDj23xjv502ZkliPmwl06JACgRwd/HgQuPZojcMByccqAz1oeaoiawTffqIMFHMhGpbsS2FTsZnNB1qzDoqCSnYMnODu479DhUbPwkwO4s+rpbGRQC1Cqj1GQFJf6jwVCIMQFgbgTeVnGSa7k1O9jY8G4u+5EibZAVhZPTJYHEhP4ioSqbPg=
file: app/build/outputs/ci-travis-apk/*.apk
prerelease: true
file_glob: "true"
skip_cleanup: true
on:
tags: true