Travis build script for swift package manager based packages

Travis CI has OSX images and can build swift code but that’ll be <= swift 2.1 and will not be able to use swift package manager to build the packages yet. This .travis.yml will fetch the open source swift snapshot, install it on ubuntu (14.04) image on travis (called trusty) and run swift build.

sudo: required
dist: trusty
  - wget -q -O - | gpg --import -
  - wget
  - tar xzf swift-2.2-SNAPSHOT-2015-12-22-a-ubuntu14.04.tar.gz
  - export PATH=${PWD}/swift-2.2-SNAPSHOT-2015-12-22-a-ubuntu14.04/usr/bin:"${PATH}"
  - swift build

go get your build passing badge for your pure swift package :D

build passing

Github Example :