-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
106 lines (92 loc) · 2.25 KB
/
.travis.yml
File metadata and controls
106 lines (92 loc) · 2.25 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
sudo: required
dist: trusty
# Build on both Linux and OSX
os:
- linux
- osx
# Use a Travis image containing an Xcode we support
# This prevents surprise upgrades!
osx_image: xcode7.3
language: c++
compiler:
- clang
- gcc
# Environment variables
env:
global:
- CXX_STD: "c++11"
jdk:
- openjdk8
# Build using clang on mac and gcc on linux
matrix:
exclude:
- os: osx
compiler: gcc
- os: linux
compiler: clang
# Install any required tools
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
rvm --default use 2.2.1
gem install xcpretty
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -qq update
sudo apt-get -qq install g++-4.9
fi
# Set up the source tree by fetching correct prebuilt objects
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then (cd livecode/prebuilt && ./fetch-libraries.sh linux) ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then (cd livecode/prebuilt && ./fetch-libraries.sh mac) ; fi
# Build the default target for LiveCode
script: |
case "${TRAVIS_OS_NAME}" in
linux)
BUILD_PLATFORM=linux
CHECK_COMMAND=xvfb-run
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"${JAVA_HOME}/jre/lib/amd64/server"
export CXX="g++-4.9"
export CC="gcc-4.9"
;;
osx)
BUILD_PLATFORM=mac
CHECK_COMMAND=
export XCODE_TARGET_SDK=macosx10.11
export XCODEBUILD="set -o pipefail && xcodebuild"
export XCODEBUILD_FILTER="| xcpretty"
export JAVA_HOME=$(/usr/libexec/java_home)
;;
esac
export MODE=debug
make -C livecode all-${BUILD_PLATFORM}
if [ $? -ne 0 ] ; then
echo " compile failed"
exit 1
fi
${CHECK_COMMAND} make -C tests lcs-check
if [ $? -ne 0 ] ; then
echo " tests failed - dumping log file"
cat tests/_lcs_test_suite.log
exit 1
fi
addons:
# Packages needed for building LiveCode
apt:
packages:
- gawk
- libx11-dev
- libxext-dev
- libxrender-dev
- libxft-dev
- libxinerama-dev
- libxv-dev
- libxcursor-dev
- libfreetype6-dev
- libgtk2.0-dev
- libpopt-dev
- libesd0-dev
- liblcms2-dev
- xvfb