mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
Install swift in travis-ci
This commit is contained in:
parent
ac2520c86f
commit
1e5c3324e3
2 changed files with 23 additions and 3 deletions
10
.travis.yml
10
.travis.yml
|
|
@ -1,5 +1,9 @@
|
||||||
language: python
|
language: python
|
||||||
python: 3.5
|
python: 3.5
|
||||||
|
dist: trusty
|
||||||
|
sudo: required
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
env: # These should match the tox env list
|
env: # These should match the tox env list
|
||||||
- TOXENV=py27
|
- TOXENV=py27
|
||||||
- TOXENV=py34
|
- TOXENV=py34
|
||||||
|
|
@ -18,11 +22,11 @@ before_install:
|
||||||
export PATH="/tmp/git/bin:$PATH"
|
export PATH="/tmp/git/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
- git --version
|
- git --version
|
||||||
|
- |
|
||||||
|
./get-swift.sh
|
||||||
|
export PATH="/tmp/swift/usr/bin:$PATH"
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- coveralls
|
||||||
sudo: required
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.cache/pip
|
- $HOME/.cache/pip
|
||||||
|
|
|
||||||
16
get-swift.sh
Executable file
16
get-swift.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# This is a script used in travis-ci to install swift
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
. /etc/lsb-release
|
||||||
|
if [ "$DISTRIB_CODENAME" = "trusty" ]; then
|
||||||
|
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'
|
||||||
|
else
|
||||||
|
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'
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p /tmp/swift
|
||||||
|
pushd /tmp/swift
|
||||||
|
wget "$SWIFT_URL" -O swift.tar.gz
|
||||||
|
tar -xf swift.tar.gz --strip 1
|
||||||
|
popd
|
||||||
Loading…
Add table
Add a link
Reference in a new issue