Skip to content

Commit

Permalink
Merge pull request #1897 from hanjoes/travis-linux
Browse files Browse the repository at this point in the history
Swift Target Linux Support
  • Loading branch information
parrt committed Jun 11, 2017
2 parents 8cc91c3 + 4c0bbfd commit ddfdcb5
Show file tree
Hide file tree
Showing 25 changed files with 416 additions and 403 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -36,6 +36,9 @@ matrix:
compiler: clang
osx_image: xcode8.1
env: TARGET=swift
- os: linux
compiler: clang
env: TARGET=swift
- os: osx
osx_image: xcode8.2
env: TARGET=dotnet
Expand Down
15 changes: 15 additions & 0 deletions .travis/before-install-linux-swift.sh
@@ -0,0 +1,15 @@
set -euo pipefail

# make sure we use trusty repositories (travis by default uses precise)
curl https://repogen.simplylinux.ch/txt/trusty/sources_c4aa56bd26c0f54f391d8fae3e687ef5f6e97c26.txt | sudo tee /etc/apt/sources.list

# install dependencies
# some packages below will be update, swift assumes newer versions
# of, for example, sqlite3 and libicu, without the update some
# tools will not work
sudo apt-get update
sudo apt-get install clang libicu-dev libxml2 sqlite3

# This would fix a know linker issue mentioned in:
# https://bugs.swift.org/browse/SR-2299
sudo ln -sf ld.gold /usr/bin/ld
18 changes: 17 additions & 1 deletion .travis/run-tests-swift.sh
@@ -1,4 +1,20 @@
#!/bin/bash

# only test swift as we develop on os x so likely well tested and its dog slow on travis
# linux specific setup, those setup have to be
# here since environment variables doesn't pass
# across scripts
if [ $TRAVIS_OS_NAME == "linux" ]; then
export SWIFT_VERSION=swift-3.1.1
export SWIFT_HOME=$(pwd)/swift/$SWIFT_VERSION-RELEASE-ubuntu14.04/usr/bin/
export PATH=$SWIFT_HOME:$PATH

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

# check swift
swift --version
swift build --version

mvn -q -Dtest=swift.* test

0 comments on commit ddfdcb5

Please sign in to comment.