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