mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
Make Travis do Android builds on master and ^android branches
This commit is contained in:
committed by
GitHub
parent
147067de60
commit
f311fb11bc
13
.travis.yml
13
.travis.yml
@@ -2,7 +2,7 @@ language: c
|
||||
|
||||
before_install:
|
||||
# Android jobs are triggered from cron and overwrite `before_script` part
|
||||
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]] ; then echo Exiting early from cron job ; exit 0 ; fi
|
||||
- if [[ "$OPENRCT2_ANDROID" == "true" ]] ; then echo before_install not needed for Android jobs ; exit 0 ; fi
|
||||
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" && "$TRAVIS_PULL_REQUEST" == "false" && ("${TRAVIS_BRANCH}" =~ ^(develop|push/) || "z${TRAVIS_TAG}" != "z") ]] ; then
|
||||
echo "This build will get pushed!" ; echo "tag = ${TRAVIS_TAG}" ; echo "branch = ${TRAVIS_BRANCH}" ;
|
||||
fi
|
||||
@@ -106,12 +106,13 @@ matrix:
|
||||
curl --progress-bar --upload-file openrct2-macos.zip https://transfer.sh/openrct2-macos.zip -o link && cat link;
|
||||
fi
|
||||
- os: linux
|
||||
if: type = cron
|
||||
if: type = cron OR branch = master OR branch =~ ^android
|
||||
language: android
|
||||
dist: precise
|
||||
before_install: []
|
||||
env:
|
||||
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
|
||||
- OPENRCT2_ANDROID="true"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
@@ -124,7 +125,7 @@ matrix:
|
||||
jdk: oraclejdk8
|
||||
before_script:
|
||||
# Only run Android jobs when triggered from cron or on tag, otherwise skip
|
||||
- if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]] && [[ "z${TRAVIS_TAG}" == "z" ]] ; then exit 0 ; fi
|
||||
- if [[ "$OPENRCT2_ANDROID" != "true" ]] && [[ "z${TRAVIS_TAG}" == "z" ]] ; then exit 0 ; fi
|
||||
- pushd ~
|
||||
- wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
|
||||
- unzip -qo sdk-tools-linux-3859397.zip
|
||||
@@ -143,11 +144,11 @@ matrix:
|
||||
- TERM=dumb # Makes Gradle use 'boring' output
|
||||
script:
|
||||
# Only run Android jobs when triggered from cron or on tag, otherwise skip
|
||||
- if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]] && [[ "z${TRAVIS_TAG}" == "z" ]] ; then exit 0 ; fi
|
||||
- if [[ "$OPENRCT2_ANDROID" != "true" ]] && [[ "z${TRAVIS_TAG}" == "z" ]] ; then exit 0 ; fi
|
||||
- './gradlew app:assemblePR'
|
||||
after_success:
|
||||
# Only run Android jobs when triggered from cron or on tag, otherwise skip
|
||||
- if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]] && [[ "z${TRAVIS_TAG}" == "z" ]] ; then exit 0 ; fi
|
||||
- if [[ "$OPENRCT2_ANDROID" != "true" ]] && [[ "z${TRAVIS_TAG}" == "z" ]] ; then exit 0 ; fi
|
||||
- curl --progress-bar --upload-file app/build/outputs/apk/app-arm-pr.apk https://transfer.sh/openrct2-android-arm.apk -o link && cat link
|
||||
- curl --progress-bar --upload-file app/build/outputs/apk/app-x86-pr.apk https://transfer.sh/openrct2-android-x86.apk -o link && cat link
|
||||
- if [[ "z${TRAVIS_TAG}" != "z" ]] ; then
|
||||
@@ -179,7 +180,7 @@ matrix:
|
||||
|
||||
script:
|
||||
# Android jobs are triggered from cron and overwrite `script` part
|
||||
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]] ; then exit 0 ; fi
|
||||
- if [[ "$OPENRCT2_ANDROID" == "true" ]] ; then exit 0 ; fi
|
||||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash scripts/linux/build.sh ; fi
|
||||
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then set -o pipefail && xcodebuild | xcpretty -f `xcpretty-travis-formatter`; fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user