language: c env: matrix: # Note: luarocks does not work with Lua 5.0. # - LUA=5.0 LUAPKG=50 LUALIB=/usr/lib/liblua50.so - LUA=5.1 LGIVER= LUAPKG=5.1 LUALIB=/usr/lib/x86_64-linux-gnu/liblua5.1.so - LUA=5.2 LGIVER= LUAPKG=5.2 LUALIB=/usr/lib/x86_64-linux-gnu/liblua5.2.so BUILD_APIDOC=true - LUA=5.2 LGIVER=0.7.0 LUAPKG=5.2 LUALIB=/usr/lib/x86_64-linux-gnu/liblua5.2.so global: # Secure token to push to gh-pages. - secure: "LZxt9559+V3qJMdVgmKW4RYTt8ZINooex/qsnoEJUtZloj/eFNG4COT2z6a2yeH2tKWzknCsmV9nLPJiNEA2KLcyqDhjFQvJwKmsBuhGUmLyeQgfenjweorRjO8NT18X1SAEUXAMnClPu+OeTDs4BAuVn5foGZ7xpcRg2E+j2mc=" before_install: - cmake --version 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 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 # 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 - 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 - ./configure - sudo make install - sudo ldconfig - cd .. # For xcb-proto >= 1.11, required by libxcb. - 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 - ./configure - sudo make install - cd .. # For missing libxcb-xkb-dev. - wget http://xcb.freedesktop.org/dist/libxcb-1.11.tar.bz2 - tar xf libxcb-1.11.tar.bz2 - cd libxcb-1.11 - ./configure - sudo make install - sudo ldconfig - cd .. # For missing libxcbcommon-dev/libxcbcommon-x11-dev (PR #227). - wget http://xkbcommon.org/download/libxkbcommon-0.5.0.tar.xz - tar xf libxkbcommon-0.5.0.tar.xz - cd libxkbcommon-0.5.0 - ./configure - sudo make install - sudo ldconfig - cd .. # 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). - 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 - ./configure --lua-version=$LUA - make build - sudo make install - cd .. - sudo apt-get install -qq libgirepository1.0-dev - sudo luarocks install lgi $LGIVER # Install busted for "make check". - sudo luarocks install busted # Install ldoc for building docs. - sudo luarocks install ldoc - sudo luarocks install lua-discount # 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 # Deps for functional tests. - sudo apt-get install -qq dbus-x11 xterm xdotool xterm xvfb # Determine custom version. - 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' script: - export CMAKE_ARGS="-DLUA_LIBRARY=${LUALIB} -DLUA_INCLUDE_DIR=/usr/include/lua${LUAPKG} -D OVERRIDE_VERSION=$AWESOME_VERSION" - make && sudo env PATH=$PATH make install && awesome --version && tests/run.sh after_success: # Push updated API docs for relevant branches, e.g. non-PRs builds on master. - if [ "BUILD_APIDOC" = "true" ]; then build-utils/travis-apidoc.sh; fi