forked from stencila/stencila
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (56 loc) · 3.15 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
language: cpp
compiler:
- gcc
before_install:
# Use this to prepare the system to install prerequisites or dependencies
# Add PPA for g++4.8 (default is gcc 4.6 since this is Ubuntu 12.04)
- if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test -y; fi
# Add PPA for cmake 2.8.11 (default is 2.8.7 since this is Ubuntu 12.04 and html-tidy needs >=2.8.8)
- sudo add-apt-repository -y ppa:kalakris/cmake -y
# Add repository for R
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
- sudo add-apt-repository "deb http://cran.us.r-project.org/bin/linux/ubuntu precise/"
- sudo apt-get update -qq
install:
# Use this to install any prerequisites or dependencies necessary to run your build
# Install g++4.8
- if [ "$CXX" == "g++" ]; then sudo apt-get install -qq g++-4.8; fi
# Use g++4.8 as g++ (do this instead of redefining CXX as others do so that Boost.Build (b2) uses right one)
- if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50; fi
# Display g++ version in log
- $CXX --version
# Install cmake >=2.8.8
- sudo apt-get install cmake --force-yes --assume-yes --fix-broken
# Install Javascript build dependencies
# `nodejs` and `npm` are already installed (http://docs.travis-ci.com/user/ci-environment/#Runtimes)
# `uglifyjs` for minification
- npm install -g uglify-js
# PhantomJS for testing. An old verson is installed already on Travis but this updates it to 2.0.0
# Based on https://mediocre.com/forum/topics/phantomjs-2-and-travis-ci-we-beat-our-heads-against-a-wall-so-you-dont-have-to
- mkdir travis-phantomjs
- wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs
- export PATH=$PWD/travis-phantomjs:$PATH
- phantomjs -v
# Install Python build dependencies
# `wheel` for packaging; `virtualenv` for testing
- sudo apt-get install python python-dev python-pip --force-yes --assume-yes --fix-broken
- sudo pip install wheel virtualenv
# Install R build dependencies
# `Rcpp` for compilation; `roxygen2` for packaging; `svUnit`, `XML` & `libxml2-dev` for testing
- sudo apt-get install r-base r-base-dev libxml2-dev --force-yes --assume-yes --fix-broken
- sudo Rscript -e "install.packages(c('Rcpp','roxygen2','svUnit','XML'),lib='/usr/lib/R/library',repos='http://cran.us.r-project.org')"
before_script:
# Use this to prepare your build for testing
# Travis CI does a shallow clone of the current branch (`git clone --depth=50 --branch=develop ...`)
# If the last tag was more than 50 commits in the past then the following `git describe` will fail and
# the build will error. So, "unshallow" this clone to get a complete history
- git fetch --unshallow
# Display git tags in log
- git describe --tags --dirty --long
script:
- make vars
- make cpp-tests-quick
- make js-tests
- make py-tests
- make r-tests