forked from game-ci/unity-test-runner
-
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.
feat: Add support for macos game-ci#211
- Loading branch information
Showing
28 changed files
with
512 additions
and
49 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,52 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Create directory for license activation | ||
# | ||
|
||
sudo mkdir /Library/Application\ Support/Unity | ||
sudo chmod -R 777 /Library/Application\ Support/Unity | ||
|
||
ACTIVATE_LICENSE_PATH="$GITHUB_WORKSPACE/_activate-license" | ||
mkdir -p "$ACTIVATE_LICENSE_PATH" | ||
|
||
# | ||
# Run steps | ||
# | ||
|
||
source "$(dirname "$0")/steps/activate.sh" | ||
source "$(dirname "$0")/steps/set_gitcredential.sh" | ||
source "$(dirname "$0")/steps/run_tests.sh" | ||
source "$(dirname "$0")/steps/return_license.sh" | ||
|
||
# | ||
# Remove license activation directory | ||
# | ||
|
||
sudo rm -r /Library/Application\ Support/Unity | ||
rm -r "$ACTIVATE_LICENSE_PATH" | ||
|
||
# | ||
# Instructions for debugging | ||
# | ||
|
||
if [[ $TEST_RUNNER_EXIT_CODE -gt 0 ]]; then | ||
echo "" | ||
echo "###########################" | ||
echo "# Failure #" | ||
echo "###########################" | ||
echo "" | ||
echo "Please note that the exit code is not very descriptive." | ||
echo "Most likely it will not help you solve the issue." | ||
echo "" | ||
echo "To find the reason for failure: please search for errors in the log above." | ||
echo "" | ||
fi; | ||
|
||
# | ||
# Exit with code from the build step. | ||
# | ||
|
||
if [[ $USE_EXIT_CODE == true || $TEST_RUNNER_EXIT_CODE -ne 2 ]]; then | ||
exit $TEST_RUNNER_EXIT_CODE | ||
fi; |
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,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Run in ACTIVATE_LICENSE_PATH directory | ||
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory." | ||
pushd "$ACTIVATE_LICENSE_PATH" | ||
|
||
echo "Requesting activation" | ||
|
||
# Activate license | ||
/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity \ | ||
-logFile /dev/stdout \ | ||
-batchmode \ | ||
-nographics \ | ||
-quit \ | ||
-serial "$UNITY_SERIAL" \ | ||
-username "$UNITY_EMAIL" \ | ||
-password "$UNITY_PASSWORD" \ | ||
-projectPath "$ACTIVATE_LICENSE_PATH" | ||
|
||
# Store the exit code from the verify command | ||
UNITY_EXIT_CODE=$? | ||
|
||
# | ||
# Display information about the result | ||
# | ||
if [ $UNITY_EXIT_CODE -eq 0 ]; then | ||
# Activation was a success | ||
echo "Activation complete." | ||
else | ||
# Activation failed so exit with the code from the license verification step | ||
echo "Unclassified error occured while trying to activate license." | ||
echo "Exit code was: $UNITY_EXIT_CODE" | ||
exit $UNITY_EXIT_CODE | ||
fi | ||
|
||
# Return to previous working directory | ||
popd |
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,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Run in ACTIVATE_LICENSE_PATH directory | ||
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory." | ||
pushd "$ACTIVATE_LICENSE_PATH" | ||
|
||
/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity \ | ||
-logFile /dev/stdout \ | ||
-batchmode \ | ||
-nographics \ | ||
-quit \ | ||
-username "$UNITY_EMAIL" \ | ||
-password "$UNITY_PASSWORD" \ | ||
-returnlicense \ | ||
-projectPath "$ACTIVATE_LICENSE_PATH" | ||
|
||
# Return to previous working directory | ||
popd |
Oops, something went wrong.