X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=.travis.yml;h=15ad1e4dbb68a4f0b0b106074999340b04e97dda;hb=a395006844adbd538c0ab0f201fc956b0e7d7bc6;hp=e4d777b0596c7783e7ba7292e91c58a0453c3005;hpb=a0bca728c9d55f8c2b23ebd11c3789fc89bbca6f;p=i3%2Fi3lock diff --git a/.travis.yml b/.travis.yml index e4d777b..15ad1e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,17 @@ +# Use Ubuntu 14.04 (trusty), as per http://blog.travis-ci.com/2015-10-14-opening-up-ubuntu-trusty-beta/ +sudo: false +dist: trusty +services: + - docker language: c compiler: - gcc - clang -before_install: - # The travis VMs run on Ubuntu 12.04 which is very old and a huge pain to get - # into a state where we can build a recent version of i3status :(. - - "echo 'APT::Default-Release \"precise\";' | sudo tee /etc/apt/apt.conf.d/default-release" - - "echo 'deb http://archive.ubuntu.com/ubuntu/ utopic main universe' | sudo tee /etc/apt/sources.list.d/utopic.list" - - sudo apt-get update - - sudo apt-get install -t utopic clang-format-3.5 - - clang-format-3.5 --version -install: - # TODO: Once libxkbcommon >= 0.5.0 is in Debian, install it from there. - # These are the Build-Depends of libxkbcommon: - - sudo apt-get install pkg-config xutils-dev bison flex libx11-dev libxcb-xkb-dev x11-xkb-utils x11proto-core-dev x11proto-kb-dev xkb-data xvfb - - (cd /tmp && wget -nv https://github.com/xkbcommon/libxkbcommon/archive/xkbcommon-0.5.0.tar.gz && tar xf xkbcommon-0.5.0.tar.gz && cd libxkbcommon-xkbcommon-0.5.0; ./autogen.sh && ./configure && make && sudo make install) - - sudo apt-get install pkg-config libpam0g-dev libcairo2-dev libxcb1-dev libxcb-dpms0-dev libxcb-image0-dev libxcb-util0-dev libev-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbfile-dev +addons: + apt: + packages: + - clang-format-3.5 script: - - make -j - clang-format-3.5 -i *.[ch] && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false) + - docker build --pull --no-cache --rm -t=i3lock -f travis/Dockerfile . + - docker run -e CC=$CC -v $PWD:/usr/src:rw i3lock /bin/sh -c 'autoreconf -fi && mkdir -p build && cd build && (../configure || (cat config.log; false)) && make -j V=1 CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Werror"'