2015-04-26 04:00:50 +02:00
|
|
|
language: c
|
|
|
|
env:
|
|
|
|
matrix:
|
|
|
|
# Note: luarocks does not work with Lua 5.0.
|
|
|
|
# - LUA=5.0 LUAPKG=50 LUALIB=/usr/lib/liblua50.so
|
|
|
|
# Disable 5.1 for now: no need to test both 5.1 and 5.2 currently.
|
|
|
|
# - LUA=5.1 LUAPKG=5.1 LUALIB=/usr/lib/x86_64-linux-gnu/liblua5.1.so
|
|
|
|
- LUA=5.2 LUAPKG=5.2 LUALIB=/usr/lib/x86_64-linux-gnu/liblua5.2.so
|
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:
|
|
|
|
- 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
|
|
|
|
|
|
|
|
# Install dependencies according to:
|
|
|
|
# apt-cache showsrc awesome | grep -E '^(Version|Build-Depends)'
|
|
|
|
- sudo apt-get install libcairo2-dev xmlto asciidoc libpango1.0-dev cmake 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
|
2015-05-14 23:30:02 +02:00
|
|
|
|
2015-04-26 04:00:50 +02:00
|
|
|
# Install Lua (per env).
|
|
|
|
- sudo apt-get install liblua${LUAPKG}-dev lua${LUAPKG}
|
|
|
|
|
|
|
|
# For missing libxcb-cursor-dev.
|
|
|
|
- sudo apt-get install -qq xutils-dev libxcb-render-util0-dev gperf
|
2015-06-10 18:06:02 +02:00
|
|
|
- wget http://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.2.tar.gz
|
|
|
|
- tar xf xcb-util-cursor-0.1.2.tar.gz
|
|
|
|
- cd xcb-util-cursor-0.1.2
|
2015-04-26 04:00:50 +02:00
|
|
|
- ./configure
|
|
|
|
- sudo make install
|
|
|
|
- sudo ldconfig
|
|
|
|
- cd ..
|
|
|
|
|
|
|
|
# For xcb-proto >= 1.11, required by libxcb.
|
2015-06-10 18:06:02 +02:00
|
|
|
- wget http://xcb.freedesktop.org/dist/xcb-proto-1.11.tar.bz2
|
|
|
|
- tar xf xcb-proto-1.11.tar.bz2
|
|
|
|
- cd xcb-proto-1.11
|
2015-04-26 04:00:50 +02:00
|
|
|
- ./configure
|
|
|
|
- sudo make install
|
|
|
|
- cd ..
|
|
|
|
|
|
|
|
# For missing libxcb-xkb-dev.
|
2015-06-10 18:06:02 +02:00
|
|
|
- wget http://xcb.freedesktop.org/dist/libxcb-1.11.tar.bz2
|
|
|
|
- tar xf libxcb-1.11.tar.bz2
|
|
|
|
- cd libxcb-1.11
|
2015-04-26 04:00:50 +02:00
|
|
|
- ./configure
|
|
|
|
- sudo make install
|
|
|
|
- sudo ldconfig
|
|
|
|
- cd ..
|
|
|
|
|
2015-05-14 23:30:02 +02:00
|
|
|
# For missing libxcbcommon-dev/libxcbcommon-x11-dev (PR #227).
|
2015-06-10 18:06:02 +02:00
|
|
|
- wget http://xkbcommon.org/download/libxkbcommon-0.5.0.tar.xz
|
|
|
|
- tar xf libxkbcommon-0.5.0.tar.xz
|
|
|
|
- cd libxkbcommon-0.5.0
|
2015-05-14 23:30:02 +02:00
|
|
|
- ./configure
|
|
|
|
- sudo make install
|
|
|
|
- sudo ldconfig
|
|
|
|
- cd ..
|
|
|
|
|
2015-04-26 04:00:50 +02:00
|
|
|
# lgi: is too old on travis, install it via luarocks.
|
|
|
|
# - sudo apt-get install -qq lua-lgi
|
|
|
|
- sudo apt-get install -qq gir1.2-pango-1.0
|
|
|
|
|
|
|
|
# Install luarocks (for the selected Lua version).
|
2015-06-10 19:22:31 +02:00
|
|
|
- wget http://keplerproject.github.io/luarocks/releases/luarocks-2.2.2.tar.gz
|
|
|
|
- tar xf luarocks-2.2.2.tar.gz
|
|
|
|
- cd luarocks-2.2.2
|
2015-04-26 04:00:50 +02:00
|
|
|
- ./configure --lua-version=$LUA
|
2015-06-13 00:47:58 +02:00
|
|
|
- make build
|
2015-04-26 04:00:50 +02:00
|
|
|
- sudo make install
|
|
|
|
- cd ..
|
|
|
|
|
|
|
|
- sudo apt-get install -qq libgirepository1.0-dev
|
|
|
|
- sudo luarocks install lgi
|
|
|
|
|
|
|
|
# Install busted for "make check".
|
2015-07-10 15:52:45 +02:00
|
|
|
- sudo luarocks install busted
|
2015-04-26 04:00:50 +02:00
|
|
|
|
|
|
|
# Install ldoc for building docs.
|
|
|
|
- sudo luarocks install ldoc
|
2015-07-24 00:33:53 +02:00
|
|
|
- sudo luarocks install lua-discount
|
2015-04-26 04:00:50 +02:00
|
|
|
|
2015-06-20 01:17:44 +02:00
|
|
|
# Install CMake 3+, via http://www.cmake.org/download/#latest.
|
|
|
|
- wget http://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.Z
|
|
|
|
- tar xf cmake-3.2.3-Linux-x86_64.tar.Z
|
|
|
|
- PATH=$PWD/cmake-3.2.3-Linux-x86_64/bin:$PATH
|
|
|
|
|
2015-07-10 13:17:50 +02:00
|
|
|
# Deps for functional tests.
|
|
|
|
- sudo apt-get install -qq dbus-x11 xterm xdotool xterm xvfb
|
|
|
|
|
2015-07-24 01:01:38 +02:00
|
|
|
# Determine custom version.
|
2015-07-23 23:28:39 +02:00
|
|
|
- '[ "$TRAVIS_PULL_REQUEST" = false ] && AWESOME_VERSION="${TRAVIS_BRANCH}-g$(git rev-parse --short HEAD)-$(date -Iseconds)" || AWESOME_VERSION="${TRAVIS_BRANCH}-PR${TRAVIS_PULL_REQUEST}-g$(git rev-parse --short HEAD)-$(date -Iseconds)"'
|
2015-07-24 01:01:38 +02:00
|
|
|
|
2015-04-26 04:00:50 +02:00
|
|
|
script:
|
2015-07-23 23:28:39 +02:00
|
|
|
- export CMAKE_ARGS="-DLUA_LIBRARY=${LUALIB} -DLUA_INCLUDE_DIR=/usr/include/lua${LUAPKG} -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
|
|
|
|
|
|
|
# Push updated API docs.
|
|
|
|
after_success:
|
|
|
|
- REPO_APIDOC="https://${GH_TOKEN}@github.com/awesomeWM/apidoc"
|
|
|
|
# Export these to not add "git config" calls to the long command.
|
|
|
|
- export GIT_AUTHOR_NAME="awesome-robot on Travis CI"
|
|
|
|
- export GIT_AUTHOR_EMAIL="awesome-robot@users.noreply.github.com"
|
|
|
|
- export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
|
|
|
|
- export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
|
|
|
|
# NOTE: stdout/stderr might/should be discarded to not leak sensitive information.
|
|
|
|
- '[ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = false ] && { echo "Uploading documentation..." && cd build/doc && git clone --branch gh-pages --bare $REPO_APIDOC .git && git config core.bare false && git reset && git add --all . && git commit -m "Updated docs for $AWESOME_VERSION via Travis" && git push --quiet origin gh-pages || echo "Uploading docs failed!"; } || echo "Not uploading docs for $TRAVIS_BRANCH:$TRAVIS_PULL_REQUEST."'
|