Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Initial travis build files
Browse files Browse the repository at this point in the history
  • Loading branch information
bjulbricht committed May 11, 2016
1 parent 426b7f6 commit 985521f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
branches:
only:
- feature/travis-build
os:
- linux
- osx
language: generic
env:
global:
- SWIFT_VERSION=DEVELOPMENT-SNAPSHOT-2016-05-03-a
sudo: required
dist: trusty
osx_image: xcode7.3
install:
- eval "$(cat ./install-swiftenv.sh)"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get install -y libcurl4-openssl-dev libblocksruntime-dev libkqueue-dev libpthread-workqueue-dev libbsd-dev;
git clone -b experimental/foundation https://github.com/apple/swift-corelibs-libdispatch.git;
cd swift-corelibs-libdispatch && git submodule init && git submodule update && sh ./autogen.sh && ./configure --with-swift-toolchain=/home/travis/.swiftenv/versions/$SWIFT_VERSION/usr --prefix=/home/travis/.swiftenv/versions/$SWIFT_VERSION/usr && make && make install;
fi
script:
- swift build --fetch # clones all dependencies
- swift build -Xcc -fblocks -Xlinker -ldispatch -Xlinker -rpath -Xlinker $(pwd)/.build/debug/
13 changes: 13 additions & 0 deletions install-swiftenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Automatically installs swiftenv and run's swiftenv install.
# This script was designed for usage in CI systems.

git clone --depth 1 https://github.com/kylef/swiftenv.git ~/.swiftenv
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$SWIFTENV_ROOT/shims:$PATH"

if [ -f ".swift-version" ] || [ -n "$SWIFT_VERSION" ]; then
swiftenv install
else
swiftenv rehash
fi

0 comments on commit 985521f

Please sign in to comment.