-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.travis.yml
31 lines (26 loc) · 1.56 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
osx_image: xcode8.3
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install curl mosquitto openssl ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then /usr/local/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf -d ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -y ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://swift.org/builds/swift-3.1-release/ubuntu1404/swift-3.1-RELEASE/swift-3.1-RELEASE-ubuntu14.04.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar xzvf swift-3.1-RELEASE-ubuntu14.04.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=swift-3.1-RELEASE-ubuntu14.04/usr/bin:$PATH ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -y install clang-3.8 unzip wget tar ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CC=/usr/bin/clang-3.8 ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=/usr/bin/clang-3.8 ; fi
# install Mosquitto broker for testing
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo | sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y mosquitto ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mosquitto -c /etc/mosquitto/mosquitto.conf -d ; fi
script:
- swift build
- swift test