Twidere-App-Android-Twitter.../.travis.yml

93 lines
3.0 KiB
YAML
Raw Normal View History

language: android
2017-03-04 05:26:14 +01:00
2017-03-04 19:13:41 +01:00
sudo: false
2017-03-04 18:44:00 +01:00
2017-03-04 19:15:53 +01:00
jdk: oraclejdk8
android:
components:
2015-03-16 06:48:09 +01:00
- tools
2017-03-04 12:01:47 +01:00
- tools # To fix https://github.com/travis-ci/travis-ci/issues/6040
2017-03-04 05:26:14 +01:00
- platform-tools
- build-tools-25.0.2
2016-10-23 15:27:41 +02:00
- android-25
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
2016-12-01 04:18:16 +01:00
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
2016-02-10 15:57:10 +01:00
env:
global:
2017-03-01 03:05:12 +01:00
# COMPONENT_GOOGLE_REPO
- secure: "OQ/wkORxY2qv4CmAdMxyW4ihRt5GRyxKxQRZpsdjMbwIKf3DlY6vBoNIEQ46sRRLAKOzkQ3LirodbWRCBlDN9WFw4XRsLTveqqtslMGeLf04peazXMIa6rJ22BCDGEmnzRNx6r3JRb9wEK1plNv4u4G9DgQ7ShzbwdZ8A5grlg8="
2016-02-10 15:57:10 +01:00
2015-08-13 14:59:03 +02:00
addons:
apt:
packages:
2017-03-05 13:20:09 +01:00
- curl
2016-02-08 15:30:26 +01:00
- tar
- gzip
2016-02-08 15:04:07 +01:00
- patch
2017-03-01 03:05:12 +01:00
- openssh-client
- git
2017-03-04 05:26:14 +01:00
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/.m2/
2017-02-04 08:13:31 +01:00
2015-11-25 14:13:11 +01:00
before_install:
2017-03-01 07:13:10 +01:00
- openssl aes-256-cbc -K $encrypted_9b8203f9524d_key -iv $encrypted_9b8203f9524d_iv -in travis/configs/twidere_private_config.tar.gz.enc -out travis/configs/twidere_private_config.tar.gz -d
2015-08-13 14:59:03 +02:00
2016-02-13 08:29:51 +01:00
install:
2016-02-08 15:26:50 +01:00
# Extracts build configs into source tree
- tar zxf travis/configs/twidere_private_config.tar.gz
2017-03-02 09:26:12 +01:00
# Make sure ~/.ssh/ exists
- mkdir -p ~/.ssh/
# Make it secure
- chmod 700 ~/.ssh/
# Append ssh_config
- cat private/ssh_config >> ~/.ssh/config
# Append known_hosts
- cat private/ssh_known_hosts >> ~/.ssh/known_hosts
# Checkout Google components
2017-03-05 06:04:59 +01:00
- ssh-agent bash -c "ssh-add private/ssh_id_rsa; git clone $COMPONENT_GOOGLE_REPO twidere/src/google" > /dev/null 2>&1
2017-03-05 13:20:09 +01:00
# Dropbox accessToken for uploading logs
- cat private/dropbox_uploader >> ~/.dropbox_uploader
2016-02-13 08:29:51 +01:00
before_script:
2016-02-08 15:04:07 +01:00
# Validate if patches work
- patch --dry-run -d twidere < twidere/patches/remove_closed_source_dependencies.patch
# Validate if Google components fetched successfully
2017-03-05 06:04:59 +01:00
- test -f twidere/src/google/AndroidManifest.xml
2016-02-08 15:04:07 +01:00
2017-03-04 05:26:14 +01:00
script:
2017-03-05 10:04:26 +01:00
- ./gradlew clean
- ./gradlew build --debug > /dev/null
2016-02-08 15:30:26 +01:00
2017-03-04 14:40:24 +01:00
after_failure:
2017-03-05 13:20:09 +01:00
- curl "https://raw.githubusercontent.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh" -o travis/scripts/dropbox_uploader.sh
- chmod +x travis/scripts/dropbox_uploader.sh
2017-03-05 14:31:54 +01:00
- find /tmp -maxdepth 1 -name 'kotlin-daemon.*.log' -exec sh -c 'travis/scripts/dropbox_uploader.sh upload $1 $TRAVIS_BUILD_ID/$(basename $1)' find-sh {} \;
2017-03-05 15:08:28 +01:00
- find ~/.gradle/daemon/ -name 'daemon-*.log' -exec sh -c 'travis/scripts/dropbox_uploader.sh upload $1 $TRAVIS_BUILD_ID/gradle-$(basename $1)' find-sh {} \;
2017-03-04 14:40:24 +01:00
2016-02-08 15:30:26 +01:00
deploy:
provider: releases
2017-01-07 08:53:24 +01:00
prerelease: true
2016-02-08 15:30:26 +01:00
api_key:
2017-03-01 03:05:12 +01:00
secure: "WKtKwda3hegqO9QVujdonNoL2ESJUR80WHNq/13wDsbCABo/GNnuqHNYZmml3wAifEKKeCEYfNZRUuHQ8eHs54Lj5BlGRX5i+1LrGhhgnVFQgmrhIv4RJuVQ663kDEh+Jwo4vowJ2mxNDvLvOhfZwxjULPDiknqy6u5PyW3id5M="
2016-02-08 15:30:26 +01:00
file_glob: true
file: '**/*-release.apk'
on:
repo: TwidereProject/Twidere-Android
tags: true