Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e5c332

Browse files
committed
Install swift in travis-ci
1 parent ac2520c commit 1e5c332

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
language: python
22
python: 3.5
3+
dist: trusty
4+
sudo: required
5+
services:
6+
- docker
37
env: # These should match the tox env list
48
- TOXENV=py27
59
- TOXENV=py34
@@ -18,11 +22,11 @@ before_install:
1822
export PATH="/tmp/git/bin:$PATH"
1923
fi
2024
- git --version
25+
- |
26+
./get-swift.sh
27+
export PATH="/tmp/swift/usr/bin:$PATH"
2128
after_success:
2229
- coveralls
23-
sudo: required
24-
services:
25-
- docker
2630
cache:
2731
directories:
2832
- $HOME/.cache/pip

get-swift.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
# This is a script used in travis-ci to install swift
3+
set -ex
4+
5+
. /etc/lsb-release
6+
if [ "$DISTRIB_CODENAME" = "trusty" ]; then
7+
SWIFT_URL='https://swift.org/builds/swift-3.0.2-release/ubuntu1404/swift-3.0.2-RELEASE/swift-3.0.2-RELEASE-ubuntu14.04.tar.gz'
8+
else
9+
SWIFT_URL='https://swift.org/builds/swift-3.0.2-release/ubuntu1604/swift-3.0.2-RELEASE/swift-3.0.2-RELEASE-ubuntu16.04.tar.gz'
10+
fi
11+
12+
mkdir -p /tmp/swift
13+
pushd /tmp/swift
14+
wget "$SWIFT_URL" -O swift.tar.gz
15+
tar -xf swift.tar.gz --strip 1
16+
popd

0 commit comments

Comments
 (0)