-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
language: objective-c | ||
osx_image: xcode9.2 | ||
rvm: | ||
- 2.2 | ||
env: | ||
global: | ||
- secure: v0Pb49+1iWYv5DVMGEe4LaJC78xhXpoTieNONvwrpkXYoDlz8UXkHnaI2sCj4uArFfljCYIqCvB9lsx8WNeoP8rOr5rsktwFsAxgzLoRSbFS8N9Qqo3FrjvT/6la7/XXdepIvExcd9YtMt8MYPt3vJSBtnz9QId41VQ6pKd1uo8HfYlhr2YTIIJ7R3Sj7THvBS56P3JzItjxWPpPucJR5tky1HHS9pNsI2lW6VRNv1/s22S8+SZzle3PwRCMHAtK2AAFQ/9qmU1qiDWBv/GwVa6u6fgGk2vJ8N030098B7yMILxbmhkRM/9RrcFn5JBcRshTDWT+PSENQp4ge60NCZx8atM79eCH8IFpfPhkjPywdJZkscUoXS6+PZJqcDGo4Mb9DznWwbIin3+GMrGrcYReopM8r9Neh9p/B/i7+VQVv9LHC/FXaDQQWunnxQHgfeWPG7fKpkBGTkzyikkdsS7QfClm1O+nIMYf6hACXtX8sAY57hoIh1pHGe9R/iEVn9byQ140LZ4akh4Y+DQvuAJGIoSnRsFts3U0akgzc0Gj+EmQTkVHakJvua+xsoaQmtNpSzj4G19aoCeGe3t2t/ztZv1/sVJQB8QwHZEcLjcVTWNqNCBJIVglfgiUd93CMNOUBOv8JdUV4eUYeLPJjaHV/K22DNynEqdGAR24Enw= | ||
- secure: KKbq4VATJ6zpsykmbBTrXdLkK5pDIkdXtPjOBpeQ/xOop3DlMar0NVFNLuVLC65zfpJBGq18Ax+/Jb7HJK70j4t2a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5Xr/111NXhC0queSFkbhDNZaJvF9JzVGZ+0xWigdZGlmVY3/Xa9z3YAbxJ2Tw2wHHL/Mtih8BKPMp2pzb+ZQ7q1auS+0gyFDCJHZHaO815KC9wgaZe3wYbHzC/EzcOGnjTFizant0APat7nCS3QR7wac/FbLLL2PSO7RgpsToXp1Oz15+SX2Y44mfEKXmZNsJ93zfwY+/06HTS9cZarrThT0= | ||
cache: | ||
directories: | ||
- "$UNITY_DOWNLOAD_CACHE" | ||
before_install: | ||
- chmod a+x ./travis-build/*.sh | ||
install: | ||
- cat /etc/hosts | ||
- "./travis-build/install-unity.sh" | ||
script: | ||
- "./travis-build/build.sh" | ||
- "./travis-build/run-tests.sh" | ||
- "./travis-build/clean-up.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#! /bin/sh | ||
|
||
PROJECT_PATH=$(pwd) | ||
UNITY_BUILD_DIR=$(pwd)/Build | ||
LOG_FILE=$UNITY_BUILD_DIR/unity-android.log | ||
UNITY_BUILD_APK_NAME=dev_travis.apk | ||
UNITY_BUILD_APK_PATH=$PROJECT_PATH/Builds/Android/Development | ||
UNITY_BUILD_APK=$UNITY_BUILD_APK_PATH/$UNITY_BUILD_APK_NAME | ||
|
||
ERROR_CODE=1 | ||
echo "Items in project path ($PROJECT_PATH):" | ||
ls "$PROJECT_PATH" | ||
|
||
echo "Building project for Android..." | ||
mkdir $UNITY_BUILD_DIR | ||
/Applications/Unity/Unity.app/Contents/MacOS/Unity \ | ||
--args buildName $UNITY_BUILD_APK_NAME \ | ||
-batchmode \ | ||
-nographics \ | ||
-silent-crashes \ | ||
-logFile \ | ||
-projectPath "$PROJECT_PATH" \ | ||
-buildTarget "Android" \ | ||
-username "$UNITYEMAIL" \ | ||
-password "$UNITYPASSWORD" \ | ||
-serial "$UNITYKEY" \ | ||
-executeMethod "Infrastructure.EditorHelpers.Builder.BuildDevForAndroid" | | ||
tee "$LOG_FILE" | ||
|
||
if [ $? = 0 ]; then | ||
echo "Building Android apk completed successfully." | ||
ERROR_CODE=0 | ||
else | ||
echo "Building Android apk failed. Exited with $?." | ||
ERROR_CODE=1 | ||
fi | ||
|
||
echo "Finishing with code $ERROR_CODE" | ||
exit $ERROR_CODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /bin/sh | ||
|
||
echo "return license" | ||
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -returnlicense | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#! /bin/sh | ||
|
||
# See https://unity3d.com/get-unity/download/archive | ||
# to get download URLs | ||
UNITY_DOWNLOAD_CACHE="$(pwd)/unity_download_cache" | ||
UNITY_OSX_PACKAGE_URL="https://download.unity3d.com/download_unity/f2970305fe1c/MacEditorInstaller/Unity.pkg" | ||
UNITY_ANDROID_TARGET_PACKAGE_URL="https://download.unity3d.com/download_unity/f2970305fe1c/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-2019.1.6f1.pkg" | ||
|
||
|
||
# Downloads a file if it does not exist | ||
download() { | ||
|
||
URL=$1 | ||
FILE=`basename "$URL"` | ||
|
||
# Downloads a package if it does not already exist in cache | ||
if [ ! -e $UNITY_DOWNLOAD_CACHE/`basename "$URL"` ] ; then | ||
echo "$FILE does not exist. Downloading from $URL: " | ||
mkdir -p "$UNITY_DOWNLOAD_CACHE" | ||
curl -o $UNITY_DOWNLOAD_CACHE/`basename "$URL"` "$URL" | ||
else | ||
echo "$FILE Exists. Skipping download." | ||
fi | ||
} | ||
|
||
# Downloads and installs a package from an internet URL | ||
install() { | ||
PACKAGE_URL=$1 | ||
download $1 | ||
|
||
echo "Installing `basename "$PACKAGE_URL"`" | ||
sudo installer -dumplog -package $UNITY_DOWNLOAD_CACHE/`basename "$PACKAGE_URL"` -target / | ||
} | ||
|
||
echo "Contents of Unity Download Cache:" | ||
ls $UNITY_DOWNLOAD_CACHE | ||
|
||
echo "Installing Unity..." | ||
install $UNITY_OSX_PACKAGE_URL | ||
install $UNITY_ANDROID_TARGET_PACKAGE_URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! /bin/sh | ||
|
||
PROJECT_PATH=$(pwd) | ||
UNITY_BUILD_DIR=$(pwd)/Build | ||
|
||
ERROR_CODE=1 | ||
|
||
echo "Running editor test..." | ||
/Applications/Unity/Unity.app/Contents/MacOS/Unity \ | ||
-batchmode \ | ||
-nographics \ | ||
-silent-crashes \ | ||
-projectPath "$PROJECT_PATH" \ | ||
-buildTarget "Android" \ | ||
-username "$UNITYEMAIL" \ | ||
-password "$UNITYPASSWORD" \ | ||
-serial "$UNITYKEY" \ | ||
-runEditorTests | ||
|
||
if [ $? = 0 ]; then | ||
echo "Editor tests Passed." | ||
ERROR_CODE=0 | ||
else | ||
echo "One or more Editor tests failed. Exited with $?." | ||
ERROR_CODE=1 | ||
fi | ||
|
||
exit $ERROR_CODE |