Skip to content

Commit

Permalink
start ci
Browse files Browse the repository at this point in the history
  • Loading branch information
noppoMan committed Jun 26, 2017
1 parent c741b25 commit b74e54b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
os:
- linux
- osx
language: generic
sudo: required
dist: trusty
osx_image: xcode8.3

install:
- source Scripts/install-swift.sh

script:
- swift build
- swift test
36 changes: 36 additions & 0 deletions Scripts/install-swift.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash

VERSION="3.1"

# 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
fi
fi

if [[ $OS != "macos" ]];
then
sudo apt-get install -y clang libicu-dev uuid-dev

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

0 comments on commit b74e54b

Please sign in to comment.