Created
December 13, 2016 17:06
-
-
Save calebkleveter/db4ef3b6746381e85f9b58e3b9adc6a2 to your computer and use it in GitHub Desktop.
Modified version of Vapor Travis test that excludes test cases.
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
#!/usr/bin/env bash | |
VERSION="3.0.1" | |
echo "Swift $VERSION 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-$VERSION-RELEASE-ubuntu15.10"; | |
else | |
SWIFTFILE="swift-$VERSION-RELEASE-ubuntu14.04"; | |
fi | |
wget https://swift.org/builds/swift-$VERSION-release/$OS/swift-$VERSION-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 "β Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment