2015-10-16 16:48:37 +02:00
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
2015-04-26 04:00:50 +02:00
|
|
|
language: c
|
|
|
|
env:
|
|
|
|
matrix:
|
|
|
|
# Note: luarocks does not work with Lua 5.0.
|
2015-09-27 18:10:02 +02:00
|
|
|
- LUA=5.1 LGIVER= LUANAME=lua5.1
|
|
|
|
- LUA=5.2 LGIVER= LUANAME=lua5.2 BUILD_APIDOC=true
|
|
|
|
- LUA=5.2 LGIVER=0.7.1 LUANAME=lua5.2
|
|
|
|
# luajit: requires --lua-suffix=jit-2.0.0-beta9 in Ubuntu precise.
|
|
|
|
# Later versions seem to provide a `luajit` symlink, so `jit` would be enough.
|
|
|
|
# See http://packages.ubuntu.com/precise/i386/luajit/filelist.
|
2015-10-16 16:48:37 +02:00
|
|
|
- LUA=5.1 LGIVER= LUANAME=luajit-5.1 INSTALL_PKGS="luajit" LUAINCLUDE=/usr/include/luajit-2.0 LUAROCKS_ARGS=--lua-suffix=jit-2.0.2
|
2015-07-23 23:28:39 +02:00
|
|
|
global:
|
|
|
|
# Secure token to push to gh-pages.
|
|
|
|
- secure: "LZxt9559+V3qJMdVgmKW4RYTt8ZINooex/qsnoEJUtZloj/eFNG4COT2z6a2yeH2tKWzknCsmV9nLPJiNEA2KLcyqDhjFQvJwKmsBuhGUmLyeQgfenjweorRjO8NT18X1SAEUXAMnClPu+OeTDs4BAuVn5foGZ7xpcRg2E+j2mc="
|
|
|
|
|
2015-05-26 16:05:07 +02:00
|
|
|
before_install:
|
2015-10-16 16:48:37 +02:00
|
|
|
- if [ -z $LUAINCLUDE ]; then LUAINCLUDE=/usr/include/${LUANAME}; fi
|
2015-05-26 16:05:07 +02:00
|
|
|
- cmake --version
|
|
|
|
|
2015-04-26 04:00:50 +02:00
|
|
|
install:
|
|
|
|
# Travis boilerplate: the apt-get cache might be out of date.
|
|
|
|
- sudo apt-get update -qq
|
|
|
|
|
|
|
|
# Do not install recommended packages with apt-get.
|
|
|
|
- echo 'APT::Install-Recommends "false";' | sudo tee /etc/apt/apt.conf.d/no-recommends
|
|
|
|
|
2015-10-16 16:48:37 +02:00
|
|
|
# Install build dependencies.
|
|
|
|
# See also `apt-cache showsrc awesome | grep -E '^(Version|Build-Depends)'`.
|
|
|
|
- sudo apt-get install -y libcairo2-dev xmlto asciidoc libpango1.0-dev gperf luadoc libxcb-xtest0-dev libxcb-icccm4-dev libxcb-randr0-dev libxcb-keysyms1-dev libxcb-xinerama0-dev libxcb-image0-dev libev-dev libimlib2-dev libdbus-1-dev libxdg-basedir-dev libstartup-notification0-dev imagemagick libxcb1-dev libxcb-shape0-dev libxcb-util0-dev libxcursor-dev libx11-xcb-dev libxcb-cursor-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev
|
2015-04-26 04:00:50 +02:00
|
|
|
|
2015-10-16 16:48:37 +02:00
|
|
|
# Deps for functional tests.
|
2015-10-28 01:00:00 +01:00
|
|
|
- sudo apt-get install -y dbus-x11 xterm xdotool xterm xvfb rxvt-unicode
|
2015-04-26 04:00:50 +02:00
|
|
|
|
2015-10-16 16:48:37 +02:00
|
|
|
# Install Lua (per env).
|
|
|
|
- sudo apt-get install -y lib${LUANAME}-dev ${LUANAME} ${INSTALL_PKGS}
|
2015-09-27 18:10:02 +02:00
|
|
|
|
2015-04-26 04:00:50 +02:00
|
|
|
# Install luarocks (for the selected Lua version).
|
2015-10-16 16:48:37 +02:00
|
|
|
- travis_retry wget http://keplerproject.github.io/luarocks/releases/luarocks-2.2.2.tar.gz
|
2015-06-10 19:22:31 +02:00
|
|
|
- tar xf luarocks-2.2.2.tar.gz
|
|
|
|
- cd luarocks-2.2.2
|
2015-09-27 18:10:02 +02:00
|
|
|
- ./configure --lua-version=$LUA --with-lua-include=${LUAINCLUDE} ${LUAROCKS_ARGS}
|
2015-06-13 00:47:58 +02:00
|
|
|
- make build
|
2015-04-26 04:00:50 +02:00
|
|
|
- sudo make install
|
|
|
|
- cd ..
|
|
|
|
|
2015-10-16 16:48:37 +02:00
|
|
|
# lgi.
|
|
|
|
- sudo apt-get install -y gir1.2-pango-1.0 libgirepository1.0-dev
|
|
|
|
- travis_retry sudo luarocks install lgi $LGIVER
|
2015-04-26 04:00:50 +02:00
|
|
|
|
|
|
|
# Install busted for "make check".
|
2015-10-16 16:48:37 +02:00
|
|
|
- travis_retry sudo luarocks install busted
|
2015-04-26 04:00:50 +02:00
|
|
|
|
|
|
|
# Install ldoc for building docs.
|
2015-10-16 16:48:37 +02:00
|
|
|
- travis_retry sudo luarocks install ldoc
|
|
|
|
- travis_retry sudo luarocks install lua-discount
|
2015-07-10 13:17:50 +02:00
|
|
|
|
2015-07-24 01:01:38 +02:00
|
|
|
# Determine custom version.
|
2015-07-27 15:57:11 +02:00
|
|
|
- export AWESOME_VERSION="${TRAVIS_BRANCH}-g$(git rev-parse --short HEAD)"
|
|
|
|
- 'if [ "$TRAVIS_PULL_REQUEST" != false ]; then AWESOME_VERSION="${AWESOME_VERSION}-PR${TRAVIS_PULL_REQUEST}"; fi'
|
2015-07-24 01:01:38 +02:00
|
|
|
|
2015-04-26 04:00:50 +02:00
|
|
|
script:
|
2015-09-27 18:10:02 +02:00
|
|
|
- export CMAKE_ARGS="-DLUA_LIBRARY=/usr/lib/x86_64-linux-gnu/lib${LUANAME}.so -DLUA_INCLUDE_DIR=${LUAINCLUDE} -D OVERRIDE_VERSION=$AWESOME_VERSION"
|
2015-07-10 13:17:50 +02:00
|
|
|
- make && sudo env PATH=$PATH make install && awesome --version && tests/run.sh
|
2015-07-23 23:28:39 +02:00
|
|
|
|
|
|
|
after_success:
|
2015-07-27 15:57:11 +02:00
|
|
|
# Push updated API docs for relevant branches, e.g. non-PRs builds on master.
|
2015-10-10 23:08:20 +02:00
|
|
|
- if [ "$BUILD_APIDOC" = "true" ]; then build-utils/travis-apidoc.sh; fi
|