travis: verify code was formatted using clang-format
This commit is contained in:
parent
513510de69
commit
cd48bcf2a5
|
@ -7,6 +7,7 @@ before_install:
|
||||||
# into a state where we can build a recent version of i3 :(.
|
# into a state where we can build a recent version of i3 :(.
|
||||||
- "echo 'deb http://archive.ubuntu.com/ubuntu/ trusty main universe' | sudo tee /etc/apt/sources.list.d/trusty.list"
|
- "echo 'deb http://archive.ubuntu.com/ubuntu/ trusty main universe' | sudo tee /etc/apt/sources.list.d/trusty.list"
|
||||||
- "echo 'APT::Default-Release \"precise\";' | sudo tee /etc/apt/apt.conf.d/default-release"
|
- "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"
|
||||||
|
|
||||||
- "echo 'Package: libc6' > /tmp/pin"
|
- "echo 'Package: libc6' > /tmp/pin"
|
||||||
- "echo 'Pin: release n=trusty' >> /tmp/pin"
|
- "echo 'Pin: release n=trusty' >> /tmp/pin"
|
||||||
|
@ -32,11 +33,15 @@ before_install:
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt-get install -t trusty libc6 libc6-dev
|
- sudo apt-get install -t trusty libc6 libc6-dev
|
||||||
- sudo apt-get install --no-install-recommends devscripts equivs
|
- sudo apt-get install --no-install-recommends devscripts equivs
|
||||||
|
- sudo apt-get install -t utopic clang-format-3.5
|
||||||
|
- clang-format-3.5 --version
|
||||||
install:
|
install:
|
||||||
- sudo mk-build-deps --install --remove --tool 'apt-get --no-install-recommends' debian/control
|
- sudo mk-build-deps --install --remove --tool 'apt-get --no-install-recommends' debian/control
|
||||||
# Install as many dependencies as possible via apt because cpanm is not very reliable/easy to debug.
|
# Install as many dependencies as possible via apt because cpanm is not very reliable/easy to debug.
|
||||||
- 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
|
- 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
|
||||||
- sudo /bin/sh -c 'cpanm -n -v X11::XCB || true'
|
- sudo /bin/sh -c 'cpanm -n -v X11::XCB || true'
|
||||||
- sudo /bin/sh -c 'cpanm -n -v AnyEvent::I3 || true'
|
- sudo /bin/sh -c 'cpanm -n -v AnyEvent::I3 || true'
|
||||||
script: make -j && (cd testcases && xvfb-run ./complete-run.pl --parallel=1)
|
script:
|
||||||
after_failure: cat testcases/latest/complete-run.log
|
- make -j
|
||||||
|
- (cd testcases && xvfb-run ./complete-run.pl --parallel=1 || (cat latest/complete-run.log; false))
|
||||||
|
- clang-format-3.5 -i **/*.[ch] && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false)
|
||||||
|
|
Loading…
Reference in New Issue