This repository has been archived by the owner on Mar 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update travis and version for 3.0 release (#50)
[CI] Update build scripts and use swift 3.0 Release.
- Loading branch information
1 parent
4bb31b2
commit 1c381d7
Showing
4 changed files
with
101 additions
and
11 deletions.
There are no files selected for viewing
This file was deleted.
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 |
---|---|---|
@@ -1,18 +1,11 @@ | ||
|
||
os: | ||
- linux | ||
- osx | ||
language: generic | ||
sudo: required | ||
dist: trusty | ||
osx_image: xcode8 | ||
install: | ||
- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)" | ||
script: | ||
- swift build | ||
- swift build -c release | ||
- swift test | ||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change | ||
|
||
- bash ./.travis/ci | ||
- bash ./.travis/codecov |
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,70 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Swift 3 Continuous Integration"; | ||
|
||
# Determine OS | ||
UNAME=`uname`; | ||
if [[ $UNAME == "Darwin" ]]; | ||
then | ||
OS="macos"; | ||
else | ||
if [[ $UNAME == "Linux" ]]; | ||
then | ||
UBUNTU_RELEASE=`lsb_release -a 2>/dev/null`; | ||
if [[ $UBUNTU_RELEASE == *"15.10"* ]]; | ||
then | ||
OS="ubuntu1510"; | ||
else | ||
OS="ubuntu1404"; | ||
fi | ||
else | ||
echo "Unsupported Operating System: $UNAME"; | ||
fi | ||
fi | ||
echo "🖥 Operating System: $OS"; | ||
|
||
if [[ $OS != "macos" ]]; | ||
then | ||
echo "📚 Installing Dependencies" | ||
sudo apt-get install -y clang libicu-dev uuid-dev | ||
|
||
echo "🐦 Installing Swift"; | ||
if [[ $OS == "ubuntu1510" ]]; | ||
then | ||
SWIFTFILE="swift-3.0-RELEASE-ubuntu15.10"; | ||
else | ||
SWIFTFILE="swift-3.0-RELEASE-ubuntu14.04"; | ||
fi | ||
wget https://swift.org/builds/swift-3.0-release/$OS/swift-3.0-RELEASE/$SWIFTFILE.tar.gz | ||
tar -zxf $SWIFTFILE.tar.gz | ||
export PATH=$PWD/$SWIFTFILE/usr/bin:"${PATH}" | ||
fi | ||
|
||
echo "📅 Version: `swift --version`"; | ||
|
||
echo "🚀 Building"; | ||
swift build | ||
if [[ $? != 0 ]]; | ||
then | ||
echo "❌ Build failed"; | ||
exit 1; | ||
fi | ||
|
||
echo "💼 Building Release"; | ||
swift build -c release | ||
if [[ $? != 0 ]]; | ||
then | ||
echo "❌ Build for release failed"; | ||
exit 1; | ||
fi | ||
|
||
echo "🔎 Testing"; | ||
|
||
swift test | ||
if [[ $? != 0 ]]; | ||
then | ||
echo "❌ Tests failed"; | ||
exit 1; | ||
fi | ||
|
||
echo "✅ Done" |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Swift 3 CodeCov Integration"; | ||
|
||
# Determine OS | ||
UNAME=`uname`; | ||
if [[ $UNAME == "Darwin" ]]; | ||
then | ||
OS="macos"; | ||
else | ||
echo "🚫 Unsupported OS: $UNAME, skipping..."; | ||
exit 0; | ||
fi | ||
echo "🖥 Operating System: $OS"; | ||
|
||
|
||
PROJ_OUTPUT=`swift package generate-xcodeproj`; | ||
PROJ_NAME="${PROJ_OUTPUT/generated: .\//}" | ||
SCHEME_NAME="${PROJ_NAME/.xcodeproj/}" | ||
|
||
echo "🚀 Testing: $SCHEME_NAME"; | ||
|
||
rvm install 2.2.3 | ||
gem install xcpretty | ||
WORKING_DIRECTORY=$(PWD) xcodebuild -project $PROJ_NAME -scheme $SCHEME_NAME -sdk macosx10.12 -destination arch=x86_64 -configuration Debug -enableCodeCoverage YES test | xcpretty | ||
bash <(curl -s https://codecov.io/bash) | ||
|
||
echo "✅ Done"; |