]> git.sur5r.net Git - i3/i3lock/blob - .travis.yml
travis: install clang-format-3.5 from llvm repository
[i3/i3lock] / .travis.yml
1 language: c
2 compiler:
3   - gcc
4 # TODO: re-enable clang once libxkbcommon >= 0.5.0 can be installed from packages. Compiling libxkbcommon with clang fails in the libtool step.
5 #  - clang
6 addons:
7   apt:
8     sources:
9     - llvm-toolchain-precise-3.5
10     # ubuntu-toolchain-r-test contains libstdc++6 >= 4.8 which libllvm3.5 needs.
11     - ubuntu-toolchain-r-test
12     packages:
13     - clang-format-3.5
14     - libllvm3.5
15 install:
16   # TODO: Once libxkbcommon >= 0.5.0 is in Debian, install it from there.
17   # These are the Build-Depends of libxkbcommon:
18   - 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
19   - (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)
20   - 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
21 script:
22   - make -j
23   - clang-format-3.5 -i *.[ch] && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false)