adding travis configuration for swift under linux

This commit is contained in:
Hanzhou Shi 2017-05-12 21:43:52 -07:00
parent a64ec12e73
commit 10a3ee3f49
2 changed files with 24 additions and 0 deletions

View File

@ -36,6 +36,11 @@ matrix:
compiler: clang
osx_image: xcode8.1
env: TARGET=swift
- os: linux
compiler: clang
env:
- TARGET=swift
- SWIFT_VERSION=swift-3.1.1
- os: osx
osx_image: xcode8.2
env: TARGET=dotnet

View File

@ -0,0 +1,19 @@
set -euo pipefail
# download swift
mkdir swift
curl https://swift.org/builds/$SWIFT_VERSION-release/ubuntu1404/$SWIFT_VERSION-RELEASE/$SWIFT_VERSION-RELEASE-ubuntu14.04.tar.gz -s | tar xz -C swift &> /dev/null
# install dependencies
sudo apt-get install clang libicu52
# update libstdc++6, travis uses some old version
echo "\n" | sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo apt-get install libstdc++6
# check swift
export PATH=$(pwd)/swift/$SWIFT_VERSION-RELEASE-ubuntu14.04/usr/bin:$PATH
swift --version
swift build --version