2014-05-24 01:20:15 +09:00
|
|
|
language: c
|
2014-05-24 13:22:01 +02:00
|
|
|
|
2014-05-24 02:16:51 +09:00
|
|
|
before_install:
|
2017-06-24 19:19:13 +02:00
|
|
|
# Android jobs are triggered from cron and overwrite `before_script` part
|
2017-07-04 21:43:35 +02:00
|
|
|
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]] ; then echo Exiting early from cron job ; 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
|
2017-06-08 00:09:55 +02:00
|
|
|
- if [[ $TRAVIS_REPO_SLUG == "OpenRCT2/OpenRCT2" ]] && [[ $TRAVIS_PULL_REQUEST != "false" ]] && [[ $TRAVIS_BRANCH == "master" ]]; then echo "Pull requests to master branch are not allowed!" ; exit 1 ; fi
|
2017-05-29 22:30:24 +02:00
|
|
|
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash scripts/linux/install.sh; export OPENRCT_MAKE_OPTS="-j2 -k all openrct2-cli" ; fi
|
2016-01-27 00:47:22 -07:00
|
|
|
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then sudo gem install xcpretty-travis-formatter; fi
|
2016-01-08 09:26:45 +01:00
|
|
|
|
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
2016-01-17 17:16:43 +01:00
|
|
|
env:
|
2016-01-19 16:54:13 +01:00
|
|
|
global:
|
2017-07-12 23:06:29 +02:00
|
|
|
- OPENRCT2_VERSION="0.1.1"
|
2016-01-08 09:26:45 +01:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
2016-12-15 17:55:17 +01:00
|
|
|
services:
|
|
|
|
- docker
|
2016-01-17 16:51:28 +01:00
|
|
|
env:
|
2017-06-05 23:13:33 +02:00
|
|
|
- OPENRCT2_CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=OpenRCT2 -DPORTABLE=ON -DDISABLE_RCT2_TESTS=on" TARGET=ubuntu_amd64
|
2016-01-17 16:51:28 +01:00
|
|
|
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
|
|
|
|
after_success:
|
2017-06-24 19:19:13 +02:00
|
|
|
# Android jobs are triggered from cron and overwrite `after_sucess` part
|
|
|
|
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]] ; then exit 0 ; fi
|
2016-12-16 23:25:37 +01:00
|
|
|
- sudo chown -R $USER build
|
2016-01-17 16:51:28 +01:00
|
|
|
- cd build
|
2016-12-16 23:25:37 +01:00
|
|
|
# make install is done inside docker
|
2017-07-13 13:57:23 +01:00
|
|
|
- mv OpenRCT2/bin/openrct2 OpenRCT2/ && mv OpenRCT2/bin/openrct2-cli OpenRCT2/ && mv OpenRCT2/bin/libopenrct2.so OpenRCT2/ && mv OpenRCT2/share/openrct2 OpenRCT2/data && mv OpenRCT2/share/doc/openrct2 OpenRCT2/doc
|
2016-01-25 10:59:39 +01:00
|
|
|
- rm -rf OpenRCT2/bin OpenRCT2/share # remove empty dirs
|
2016-01-25 09:28:40 +01:00
|
|
|
- tar cvzf openrct2-linux.tar.gz OpenRCT2/
|
2017-01-29 22:49:17 +01:00
|
|
|
- if [[ "z${TRAVIS_TAG}" != "z" ]] ; then
|
|
|
|
export PUSH_BRANCH=master ;
|
|
|
|
else export PUSH_BRANCH=$TRAVIS_BRANCH ; export FILENAME_PART=-${TRAVIS_BRANCH}-$(git rev-parse --short HEAD) ;
|
|
|
|
fi
|
2016-10-20 11:47:54 +02:00
|
|
|
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" && "$TRAVIS_PULL_REQUEST" == "false" && ("${TRAVIS_BRANCH}" =~ ^(develop|push/) || "z${TRAVIS_TAG}" != "z") ]] ; then
|
2017-01-29 22:49:17 +01:00
|
|
|
curl -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=OpenRCT2-${OPENRCT2_VERSION}${FILENAME_PART}-linux-x86_64.tar.gz" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$PUSH_BRANCH" --form "flavourId=9" --form "file=@openrct2-linux.tar.gz" "https://openrct2.org/altapi/?command=push-build";
|
2016-10-15 22:00:52 +02:00
|
|
|
else curl --progress-bar --upload-file openrct2-linux.tar.gz https://transfer.sh/openrct2-linux-x86_64.tar.gz -o link && cat link;
|
2016-08-29 17:39:12 +00:00
|
|
|
fi
|
2016-10-16 00:07:50 +02:00
|
|
|
- os: linux
|
2016-12-15 17:55:17 +01:00
|
|
|
services:
|
|
|
|
- docker
|
2016-10-20 09:05:59 +02:00
|
|
|
env:
|
2017-06-05 23:13:33 +02:00
|
|
|
- OPENRCT2_CMAKE_OPTS="-DFORCE32=ON -DDISABLE_RCT2=OFF -DCMAKE_INSTALL_PREFIX=OpenRCT2 -DDISABLE_RCT2_TESTS=on" TARGET=ubuntu_i686
|
2016-10-20 09:05:59 +02:00
|
|
|
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
|
2016-10-16 00:07:50 +02:00
|
|
|
after_success:
|
2017-06-24 19:19:13 +02:00
|
|
|
# Android jobs are triggered from cron and overwrite `after_sucess` part
|
|
|
|
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]] ; then exit 0 ; fi
|
2016-12-16 23:25:37 +01:00
|
|
|
- sudo chown -R $USER build
|
2016-10-16 00:07:50 +02:00
|
|
|
- cd build
|
2016-12-16 23:25:37 +01:00
|
|
|
# make install is done inside docker
|
2016-10-16 00:07:50 +02:00
|
|
|
- mv OpenRCT2/bin/openrct2 OpenRCT2/ && mv OpenRCT2/share/openrct2 OpenRCT2/data && mv OpenRCT2/share/doc/openrct2 OpenRCT2/doc
|
|
|
|
- rm -rf OpenRCT2/bin OpenRCT2/share # remove empty dirs
|
|
|
|
- tar cvzf openrct2-linux.tar.gz OpenRCT2/
|
2017-01-29 22:49:17 +01:00
|
|
|
- if [[ "z${TRAVIS_TAG}" != "z" ]] ; then
|
|
|
|
export PUSH_BRANCH=master ;
|
|
|
|
else export PUSH_BRANCH=$TRAVIS_BRANCH ; export FILENAME_PART=-${TRAVIS_BRANCH}-$(git rev-parse --short HEAD) ;
|
|
|
|
fi
|
2016-10-20 11:47:54 +02:00
|
|
|
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" && "$TRAVIS_PULL_REQUEST" == "false" && ("${TRAVIS_BRANCH}" =~ ^(develop|push/) || "z${TRAVIS_TAG}" != "z") ]] ; then
|
2017-01-29 22:49:17 +01:00
|
|
|
curl -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=OpenRCT2-${OPENRCT2_VERSION}${FILENAME_PART}-linux-i686.tar.gz" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$PUSH_BRANCH" --form "flavourId=4" --form "file=@openrct2-linux.tar.gz" "https://openrct2.org/altapi/?command=push-build";
|
2016-10-16 00:07:50 +02:00
|
|
|
else curl --progress-bar --upload-file openrct2-linux.tar.gz https://transfer.sh/openrct2-linux-i686.tar.gz -o link && cat link;
|
|
|
|
fi
|
2016-01-08 09:26:45 +01:00
|
|
|
- os: linux
|
2017-06-05 23:13:33 +02:00
|
|
|
env: OPENRCT2_CMAKE_OPTS="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DDISABLE_RCT2_TESTS=on" TARGET=ubuntu_amd64
|
2016-01-08 09:26:45 +01:00
|
|
|
- os: linux
|
2017-06-05 23:13:33 +02:00
|
|
|
env: OPENRCT2_CMAKE_OPTS="-DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DFORCE32=on -DDISABLE_RCT2_TESTS=on" TARGET=windows
|
2016-01-08 09:26:45 +01:00
|
|
|
- os: linux
|
2017-06-05 23:13:33 +02:00
|
|
|
env: TARGET=docker64 OPENRCT2_CMAKE_OPTS="-DDISABLE_TTF=ON -DCMAKE_BUILD_TYPE=release -DDISABLE_RCT2_TESTS=on"
|
2016-01-08 09:26:45 +01:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
- os: linux
|
2017-06-05 23:13:33 +02:00
|
|
|
env: OPENRCT2_CMAKE_OPTS="-DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON -DDISABLE_RCT2_TESTS=on" TARGET=docker64
|
2016-01-08 09:26:45 +01:00
|
|
|
services:
|
|
|
|
- docker
|
2016-06-08 14:58:46 +02:00
|
|
|
- os: linux
|
2017-06-05 23:13:33 +02:00
|
|
|
env: OPENRCT2_CMAKE_OPTS="-DDISABLE_OPENGL=ON -DDISABLE_RCT2_TESTS=on" TARGET=docker64
|
2016-06-08 14:58:46 +02:00
|
|
|
services:
|
|
|
|
- docker
|
2016-01-08 09:26:45 +01:00
|
|
|
- os: osx
|
2016-09-13 18:05:23 -05:00
|
|
|
osx_image: xcode8
|
2016-01-17 16:51:28 +01:00
|
|
|
env:
|
|
|
|
- secure: "OXn/i72FxW/oh6RGlaN+gHSbkt1ToFe36etaiDOsJQznt6fe9CpFdnE8U1XBHlGokcEjbGNErRU7CFDKYHQuGrPZyHXwgqG2/0emIqFaFt5ti5ypyYKf5qH9x1LLLfdZxDyHkxXdlJ7Etxbp3G7qrV8CGRQiYRNHm1f98AmuufE="
|
2016-01-08 09:26:45 +01:00
|
|
|
after_success:
|
2017-06-24 19:19:13 +02:00
|
|
|
# Android jobs are triggered from cron and overwrite `after_sucess` part
|
|
|
|
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]] ; then exit 0 ; fi
|
2016-01-08 09:26:45 +01:00
|
|
|
- cd build/Release
|
2016-10-03 14:59:05 +02:00
|
|
|
- zip -r openrct2-macos.zip OpenRCT2.app
|
2017-01-29 22:49:17 +01:00
|
|
|
- if [[ "z${TRAVIS_TAG}" != "z" ]] ; then
|
|
|
|
export PUSH_BRANCH=master ;
|
|
|
|
else export PUSH_BRANCH=$TRAVIS_BRANCH ; export FILENAME_PART=-${TRAVIS_BRANCH}-$(git rev-parse --short HEAD) ;
|
|
|
|
fi
|
2017-06-01 21:59:10 +02:00
|
|
|
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" && "$TRAVIS_PULL_REQUEST" == "false" && ("${TRAVIS_BRANCH}" =~ ^(develop|push/) || "z${TRAVIS_TAG}" != "z") ]] ; then
|
2017-01-29 22:49:17 +01:00
|
|
|
curl -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=OpenRCT2-${OPENRCT2_VERSION}${FILENAME_PART}-macos.zip" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$PUSH_BRANCH" --form "flavourId=3" --form "file=@openrct2-macos.zip" "https://openrct2.org/altapi/?command=push-build"; else
|
2016-10-03 14:59:05 +02:00
|
|
|
curl --progress-bar --upload-file openrct2-macos.zip https://transfer.sh/openrct2-macos.zip -o link && cat link;
|
2016-08-29 17:39:12 +00:00
|
|
|
fi
|
2017-06-15 14:22:15 +02:00
|
|
|
- os: linux
|
|
|
|
language: android
|
|
|
|
dist: precise
|
|
|
|
before_install: []
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- libstdc++6-4.7-dev
|
|
|
|
android:
|
|
|
|
components:
|
|
|
|
- build-tools-25.0.2
|
|
|
|
jdk: oraclejdk8
|
|
|
|
before_script:
|
2017-07-04 21:10:30 +02:00
|
|
|
# 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
|
2017-06-15 14:22:15 +02:00
|
|
|
- pushd ~
|
|
|
|
- wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
|
|
|
|
- unzip -qo sdk-tools-linux-3859397.zip
|
|
|
|
- rm -Rf "$ANDROID_HOME/tools"
|
|
|
|
- mv tools "$ANDROID_HOME/tools"
|
|
|
|
- popd
|
|
|
|
- 'echo "count=0" > ~/.android/repositories.cfg'
|
|
|
|
- '"$ANDROID_HOME/tools/bin/sdkmanager" --list'
|
|
|
|
- 'echo y | "$ANDROID_HOME/tools/bin/sdkmanager" platform-tools'
|
|
|
|
- 'echo y | "$ANDROID_HOME/tools/bin/sdkmanager" "platforms;android-25"'
|
2017-06-28 22:55:50 +02:00
|
|
|
- 'echo y | "$ANDROID_HOME/tools/bin/sdkmanager" "cmake;3.6.4111459"'
|
2017-06-15 14:22:15 +02:00
|
|
|
- '"$ANDROID_HOME/tools/bin/sdkmanager" ndk-bundle'
|
|
|
|
- '"$ANDROID_HOME/tools/bin/sdkmanager" --list'
|
|
|
|
- 'export ANDROID_NDK_HOME="$ANDROID_HOME/ndk-bundle"'
|
|
|
|
- 'cd src/openrct2-android'
|
|
|
|
- TERM=dumb # Makes Gradle use 'boring' output
|
|
|
|
script:
|
2017-07-04 21:10:30 +02:00
|
|
|
# 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
|
2017-06-15 14:22:15 +02:00
|
|
|
- './gradlew app:assemblePR'
|
|
|
|
after_success:
|
2017-07-04 21:10:30 +02:00
|
|
|
# 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
|
2017-06-15 14:22:15 +02:00
|
|
|
- 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
|
2016-01-08 09:26:45 +01:00
|
|
|
# Following entries used to be included in testing, but they only proved useful while changing things in CMake setup.
|
|
|
|
# They are meant to be used when there are changes to CMakeLists.txt
|
|
|
|
# - os: linux
|
|
|
|
# env: OPENRCT2_CMAKE_OPTS="-DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8"
|
|
|
|
# - os: linux
|
|
|
|
# env: OPENRCT2_CMAKE_OPTS="-DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
|
|
|
|
# - os: linux
|
|
|
|
# env: OPENRCT2_CMAKE_OPTS="-DDISABLE_NETWORK=OFF -DDISABLE_HTTP_TWITCH=ON -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8"
|
|
|
|
# - os: linux
|
|
|
|
# env: OPENRCT2_CMAKE_OPTS="-DDISABLE_NETWORK=OFF -DDISABLE_HTTP_TWITCH=OFF -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8"
|
|
|
|
# - os: linux
|
|
|
|
# env: OPENRCT2_CMAKE_OPTS="-DDISABLE_NETWORK=ON -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt" TARGET=windows
|
|
|
|
# - os: linux
|
|
|
|
# env: OPENRCT2_CMAKE_OPTS="-DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt" TARGET=windows
|
|
|
|
# - os: linux
|
|
|
|
# env: OPENRCT2_CMAKE_OPTS="-DDISABLE_HTTP_TWITCH=ON -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt" TARGET=windows
|
2014-05-24 13:22:01 +02:00
|
|
|
|
2014-05-24 01:56:37 +09:00
|
|
|
script:
|
2017-06-24 19:19:13 +02:00
|
|
|
# Android jobs are triggered from cron and overwrite `script` part
|
|
|
|
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]] ; then exit 0 ; fi
|
2016-01-08 09:26:45 +01:00
|
|
|
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash scripts/linux/build.sh ; fi
|
2016-01-27 00:47:22 -07:00
|
|
|
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then set -o pipefail && xcodebuild | xcpretty -f `xcpretty-travis-formatter`; fi
|
2014-05-24 13:22:01 +02:00
|
|
|
|
2014-05-26 01:44:08 +09:00
|
|
|
notifications:
|
2015-09-09 18:27:01 +01:00
|
|
|
on_failure: change
|
2014-05-26 01:44:08 +09:00
|
|
|
on_success: change
|
|
|
|
|
2015-09-24 22:47:14 +02:00
|
|
|
cache:
|
2014-05-26 01:44:08 +09:00
|
|
|
directories:
|
2015-09-24 22:47:14 +02:00
|
|
|
- .cache
|
2014-05-26 01:44:08 +09:00
|
|
|
apt: true
|