-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from rheinfabrik/feature/travis-ci
Continuous Integration
- Loading branch information
Showing
5 changed files
with
85 additions
and
2 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,8 @@ | ||
language: objective-c | ||
osx_image: xcode611 | ||
before_install: | ||
- brew update | ||
- brew outdated carthage || brew upgrade carthage || brew install carthage | ||
- gem install xcpretty | ||
script: | ||
- scripts/cibuild |
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
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
Binary file not shown.
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,69 @@ | ||
#!/bin/bash | ||
|
||
export SCRIPT_DIR=$(dirname "$0") | ||
|
||
## | ||
## Configuration Variables | ||
## | ||
|
||
# The name of the keychain to create for iOS code signing. | ||
KEYCHAIN=ios-build.keychain | ||
|
||
## | ||
## Build Process | ||
## | ||
|
||
main () | ||
{ | ||
import_certs | ||
|
||
carthage bootstrap --platform iOS | ||
|
||
set -o pipefail && xcodebuild -project Heimdall.xcodeproj -scheme "Heimdall" test -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c | ||
local status=$? | ||
|
||
delete_keychain | ||
exit $status | ||
} | ||
|
||
import_certs () | ||
{ | ||
# If this environment variable is missing, we must not be running on Travis. | ||
if [ -z "$KEY_PASSWORD" ] | ||
then | ||
return 0 | ||
fi | ||
|
||
echo "*** Setting up code signing..." | ||
local password=cibuild | ||
|
||
# Create a temporary keychain for code signing. | ||
security create-keychain -p "$password" "$KEYCHAIN" | ||
security default-keychain -s "$KEYCHAIN" | ||
security unlock-keychain -p "$password" "$KEYCHAIN" | ||
security set-keychain-settings -t 3600 -l "$KEYCHAIN" | ||
|
||
# Download the certificate for the Apple Worldwide Developer Relations | ||
# Certificate Authority. | ||
local certpath="$SCRIPT_DIR/apple_wwdr.cer" | ||
curl 'https://developer.apple.com/certificationauthority/AppleWWDRCA.cer' > "$certpath" | ||
security import "$certpath" -k "$KEYCHAIN" -T /usr/bin/codesign | ||
|
||
# Import our development certificate. | ||
security import "$SCRIPT_DIR/certificates/development.p12" -k "$KEYCHAIN" -P "$KEY_PASSWORD" -T /usr/bin/codesign | ||
} | ||
|
||
delete_keychain () | ||
{ | ||
if [ -z "$KEY_PASSWORD" ] | ||
then | ||
return 0 | ||
fi | ||
|
||
security delete-keychain "$KEYCHAIN" | ||
} | ||
|
||
export -f import_certs | ||
export -f delete_keychain | ||
|
||
main |