forked from PureSwift/Silica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
31 lines (31 loc) · 1.37 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
language: generic
osx_image: xcode9.1
os:
- linux
- osx
sudo: required
dist: trusty
addons:
apt:
packages:
- clang
- libfreetype6-dev
- libpng-dev
- pkg-config
- libcairo-dev
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cairo sdl2 lcms2 ; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then SWIFT_DIR=tests ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir $SWIFT_DIR ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl https://swift.org/builds/swift-4.0.2-release/ubuntu1404/swift-4.0.2-RELEASE/swift-4.0.2-RELEASE-ubuntu14.04.tar.gz -s | tar xz -C $SWIFT_DIR &> /dev/null ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install clang libcairo-dev libfreetype6-dev ; fi
env:
- SWIFT_VERSION=swift-4.0.2-RELEASE
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then swift package generate-xcodeproj ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xctool test -project Silica.xcodeproj -scheme "Silica" -sdk macosx ONLY_ACTIVE_ARCH=NO LIBRARY_SEARCH_PATHS=/usr/local/lib ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=$(pwd)/tests/$SWIFT_VERSION-ubuntu14.04/usr/bin:"${PATH}" ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift build ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift test ; fi