forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
129 lines (113 loc) · 3.38 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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Very basic Travis CI (http://travis-ci.org) control file that allows
# some basic Linux-based continuous integration testing (for free).
# We currently support running LiveCode on Ubuntu 14.04 and 16.04
# See https://docs.travis-ci.com/user/ci-environment/
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
# Skip vulcan CI branches
branches:
only:
- /^develop.*$/
- /^release.*$/
- coverity_scan
# Environment variables
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "R/JfoBMrkhCGWhfWM1m3gPHuLtMBlp2SIK1R9BaPbRsbGBUJmAg9V0g0YXSaw8SVxoyuiL/jsLtHPfDeub9oTxrYydew+6/4KaoQdG7EGXQJfBhH2f0ag/hTKJfXnmZX9jMMnTxPf5Axjq+w4E6sKkU2+d1oAJRhrqzYNwDhVlc="
- 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 Linux-specific prebuilt objects
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then (cd prebuilt && ./fetch-libraries.sh linux x86_64) ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then (cd prebuilt && ./fetch-libraries.sh mac) ; fi
# Bootstrap the LCB compiler, build the default target set and run a
# the default test suite.
script: |
case "${TRAVIS_OS_NAME}" in
linux)
BUILD_PLATFORM=linux
CHECK_COMMAND=xvfb-run
LICENSE_DIR="${HOME}/.runrev/licenses"
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=
LICENSE_DIR="${HOME}/Library/Application Support/RunRev/Licenses"
export XCODE_TARGET_SDK=macosx10.11
export XCODEBUILD="set -o pipefail && xcodebuild"
export XCODEBUILD_FILTER="| xcpretty"
export JAVA_HOME=$(/usr/libexec/java_home)
;;
esac
if [[ "${COVERITY_SCAN_BRANCH}" != "1" ]]; then
mkdir -p "${LICENSE_DIR}" &&
touch "${LICENSE_DIR}/livecode-firstrun.lcf" &&
make all-${BUILD_PLATFORM} &&
${CHECK_COMMAND} make check-${BUILD_PLATFORM} V=1
fi
addons:
# Configuration for Coverity Scan integration
#
# In order to trigger a scan with Coverity, push to the
# 'coverity_scan' branch.
coverity_scan:
project:
name: "livecode/livecode"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command: "make all-linux"
branch_pattern: coverity_scan
# 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