]> git.sur5r.net Git - i3/i3/blob - .travis.yml
Merge pull request #1805 from lasers/next
[i3/i3] / .travis.yml
1 language: c
2 compiler:
3   - gcc
4   - clang
5 before_install:
6   # The travis VMs run on Ubuntu 12.04 which is very old and a huge pain to get
7   # into a state where we can build a recent version of i3 :(.
8   - "echo 'deb http://archive.ubuntu.com/ubuntu/ trusty main universe' | sudo tee /etc/apt/sources.list.d/trusty.list"
9   - "echo 'APT::Default-Release \"precise\";' | sudo tee /etc/apt/apt.conf.d/default-release"
10   - "echo 'deb http://archive.ubuntu.com/ubuntu/ utopic main universe' | sudo tee /etc/apt/sources.list.d/utopic.list"
11
12   - "echo 'Package: libc6' > /tmp/pin"
13   - "echo 'Pin: release n=trusty' >> /tmp/pin"
14   - "echo 'Pin-Priority: 999' >> /tmp/pin"
15   - "echo '' >> /tmp/pin"
16
17   - "echo 'Package: libxkbcommon*' >> /tmp/pin"
18   - "echo 'Pin: release n=trusty' >> /tmp/pin"
19   - "echo 'Pin-Priority: 999' >> /tmp/pin"
20   - "echo '' >> /tmp/pin"
21
22   - "echo 'Package: libyajl*' >> /tmp/pin"
23   - "echo 'Pin: release n=trusty' >> /tmp/pin"
24   - "echo 'Pin-Priority: 999' >> /tmp/pin"
25   - "echo '' >> /tmp/pin"
26
27   - "echo 'Package: libxcb-image*' >> /tmp/pin"
28   - "echo 'Pin: release n=trusty' >> /tmp/pin"
29   - "echo 'Pin-Priority: 999' >> /tmp/pin"
30   - "echo '' >> /tmp/pin"
31
32   - sudo cp /tmp/pin /etc/apt/preferences.d/trustypin
33   - sudo apt-get update
34   - sudo apt-get install -t trusty libc6 libc6-dev
35   - sudo apt-get install --no-install-recommends devscripts equivs xdotool
36   - sudo apt-get install -t utopic clang-format-3.5
37   - clang-format-3.5 --version
38 install:
39   - sudo mk-build-deps --install --remove --tool 'apt-get --no-install-recommends' debian/control
40   # Install as many dependencies as possible via apt because cpanm is not very reliable/easy to debug.
41   - sudo apt-get install --no-install-recommends libanyevent-perl libanyevent-i3-perl libextutils-pkgconfig-perl xcb-proto cpanminus xvfb xserver-xephyr xauth libinline-perl libxml-simple-perl libmouse-perl libmousex-nativetraits-perl libextutils-depends-perl perl-modules libtest-deep-perl libtest-exception-perl libxml-parser-perl libtest-simple-perl libtest-fatal-perl libdata-dump-perl libtest-differences-perl libxml-tokeparser-perl libtest-use-ok-perl libipc-run-perl
42   - sudo /bin/sh -c 'cpanm -n -v X11::XCB || true'
43   - sudo /bin/sh -c 'cpanm -n -v AnyEvent::I3 || true'
44 script:
45   - CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Werror" make -j
46   - (cd testcases && xvfb-run ./complete-run.pl --parallel=1 || (cat latest/complete-run.log; false))
47   - clang-format-3.5 -i $(find . -name "*.[ch]" | tr '\n' ' ') && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false)