2014-05-31 09:38:01 +00:00
|
|
|
# Travis-CI Build for koreader
|
|
|
|
# see travis-ci.org for details
|
|
|
|
|
|
|
|
language: c
|
|
|
|
|
2015-08-23 19:56:10 +00:00
|
|
|
sudo: false
|
|
|
|
|
2014-05-31 09:38:01 +00:00
|
|
|
compiler:
|
2015-08-23 19:56:10 +00:00
|
|
|
- gcc
|
2014-05-31 09:38:01 +00:00
|
|
|
|
|
|
|
env:
|
2015-08-23 19:56:10 +00:00
|
|
|
- EMULATE_READER=1
|
|
|
|
|
|
|
|
cache:
|
2015-09-13 08:09:24 +00:00
|
|
|
apt: true
|
2015-08-23 19:56:10 +00:00
|
|
|
directories:
|
|
|
|
- $HOME/.ccache
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- g++-4.8
|
|
|
|
- libsdl1.2-dev
|
|
|
|
# for luasec
|
|
|
|
- libssl1.0.0
|
|
|
|
- nasm
|
|
|
|
# OpenSSL likes this (package contains makedepend)
|
|
|
|
- xutils-dev
|
2014-05-31 09:38:01 +00:00
|
|
|
|
2014-07-14 19:09:31 +00:00
|
|
|
before_install:
|
2015-08-23 19:56:10 +00:00
|
|
|
# don't do this for clang
|
|
|
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
|
|
|
|
# in case anything ignores the environment variables, override through PATH
|
|
|
|
- mkdir bin
|
|
|
|
- ln -s $(which gcc-4.8) bin/cc
|
|
|
|
- ln -s $(which gcc-4.8) bin/gcc
|
|
|
|
- ln -s $(which c++-4.8) bin/c++
|
|
|
|
- ln -s $(which g++-4.8) bin/g++
|
|
|
|
- export PATH=$PWD/bin:$PATH
|
2014-07-14 19:09:31 +00:00
|
|
|
|
2014-05-31 09:38:01 +00:00
|
|
|
install:
|
2016-02-04 04:47:45 +00:00
|
|
|
# install our own updated luarocks
|
|
|
|
- git clone https://github.com/torch/luajit-rocks.git
|
|
|
|
- pushd luajit-rocks
|
|
|
|
- git checkout 6529891
|
2016-02-10 07:42:32 +00:00
|
|
|
- cmake . -DWITH_LUAJIT21=ON -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/install
|
2016-02-04 04:47:45 +00:00
|
|
|
- make install
|
|
|
|
- popd
|
|
|
|
- export PATH=$PATH:${TRAVIS_BUILD_DIR}/install/bin
|
2015-08-23 19:56:10 +00:00
|
|
|
- mkdir $HOME/.luarocks
|
2016-02-04 04:47:45 +00:00
|
|
|
- cp ${TRAVIS_BUILD_DIR}/install/etc/luarocks/config.lua $HOME/.luarocks/config.lua
|
2015-08-23 19:56:10 +00:00
|
|
|
- echo "wrap_bin_scripts = false" >> $HOME/.luarocks/config.lua
|
2016-02-04 04:47:45 +00:00
|
|
|
- travis_retry luarocks --local install luafilesystem
|
2016-02-04 06:30:00 +00:00
|
|
|
- travis_retry luarocks --local install ansicolors
|
2015-11-10 13:45:48 +00:00
|
|
|
- travis_retry luarocks --local install busted 2.0.rc11-0
|
2015-09-05 09:32:34 +00:00
|
|
|
#- travis_retry luarocks --local install busted 1.11.1-1
|
|
|
|
#- mv -f $HOME/.luarocks/bin/busted_bootstrap $HOME/.luarocks/bin/busted
|
2015-08-23 19:56:10 +00:00
|
|
|
- travis_retry luarocks --local install luacov
|
|
|
|
# luasec doesn't automatically detect 64-bit libs
|
|
|
|
- travis_retry luarocks --local install luasec OPENSSL_LIBDIR=/usr/lib/x86_64-linux-gnu
|
|
|
|
- travis_retry luarocks --local install luacov-coveralls --server=http://rocks.moonscript.org/dev
|
2016-02-10 07:01:52 +00:00
|
|
|
- travis_retry luarocks --local install luacheck
|
2016-02-10 07:42:32 +00:00
|
|
|
- travis_retry luarocks --local install lanes # for parallel luacheck
|
2015-08-23 19:56:10 +00:00
|
|
|
# add local rocks to $PATH
|
|
|
|
- eval $(luarocks path --bin)
|
2014-05-31 09:38:01 +00:00
|
|
|
|
|
|
|
script:
|
2016-02-04 04:47:45 +00:00
|
|
|
- travis_retry make fetchthirdparty
|
|
|
|
- make all
|
2016-02-04 08:07:04 +00:00
|
|
|
- travis_retry make testfront
|
2016-02-10 07:42:32 +00:00
|
|
|
- luajit $(which luacheck) --no-color -q frontend | tee ./luacheck.out
|
2016-02-15 09:33:48 +00:00
|
|
|
- test $(grep Total ./luacheck.out | awk '{print $2}') -le 196
|
2014-10-06 15:36:13 +00:00
|
|
|
|
|
|
|
after_success:
|
2015-08-23 19:56:10 +00:00
|
|
|
- make coverage
|
2016-02-15 10:43:02 +00:00
|
|
|
- cd koreader-*/koreader && luajit $(which luacov-coveralls) -v
|