From 897b4339a38e3072c567c5e6a77a3853e8694844 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Thu, 12 Oct 2017 02:44:25 -0700 Subject: [PATCH] Switch the Linux Swift tests to Trusty and Swift 4.0. This uses Travis's new(ish) Ubuntu Trusty image, and changes the version number of the Swift binaries that we download. We now install clang-3.6. This is not the default on Trusty, but it's required by the Swift 4.0 toolchain. This also removes the lines to upgrade libicu-dev and sqlite3. These are sufficiently up-to-date in the Trusty image. --- .travis.yml | 1 + .travis/before-install-linux-swift.sh | 6 ++---- .travis/run-tests-swift.sh | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b4e97289c..d9969b6eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,6 +108,7 @@ matrix: - GROUP=RECURSION stage: main-test - os: linux + dist: trusty compiler: clang env: - TARGET=swift diff --git a/.travis/before-install-linux-swift.sh b/.travis/before-install-linux-swift.sh index 607f04449..1a2b2a555 100755 --- a/.travis/before-install-linux-swift.sh +++ b/.travis/before-install-linux-swift.sh @@ -1,14 +1,12 @@ 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 +sudo apt-get install clang-3.6 libxml2 +sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.6 100 # This would fix a know linker issue mentioned in: # https://bugs.swift.org/browse/SR-2299 diff --git a/.travis/run-tests-swift.sh b/.travis/run-tests-swift.sh index 56d2cec65..8c63070aa 100755 --- a/.travis/run-tests-swift.sh +++ b/.travis/run-tests-swift.sh @@ -4,7 +4,7 @@ # here since environment variables doesn't pass # across scripts if [ $TRAVIS_OS_NAME == "linux" ]; then - export SWIFT_VERSION=swift-3.1.1 + export SWIFT_VERSION=swift-4.0 export SWIFT_HOME=$(pwd)/swift/$SWIFT_VERSION-RELEASE-ubuntu14.04/usr/bin/ export PATH=$SWIFT_HOME:$PATH