Skip to content

Commit 8d3403c

Browse files
committed
buildbot: add .travis.yml
Also change .clang-format to support older versions of the tool.
1 parent 3eefb3b commit 8d3403c

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ DerivePointerAlignment: false
77
PointerAlignment: Left
88
AlignTrailingComments: true
99
AllowShortBlocksOnASingleLine: false
10-
AllowShortCaseLabelsOnASingleLine: false
1110
AllowShortFunctionsOnASingleLine: false
1211
AllowShortIfStatementsOnASingleLine: false
1312
AllowShortLoopsOnASingleLine: false
1413
ColumnLimit: 0
14+
AlignTrailingComments: false
1515

.travis.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: go
2+
dist: trusty
3+
4+
go:
5+
- 1.8.1
6+
7+
before_install:
8+
- echo $PATH
9+
- export PATH=`echo $PATH | sed -e 's/:\/usr\/local\/clang-3.5.0\/bin//'`
10+
- wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb
11+
- mkdir ./libc
12+
- dpkg-deb -x ./libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb ./libc
13+
- export LD_LIBRARY_PATH=`pwd`/libc/usr/lib/x86_64-linux-gnu/
14+
- wget http://releases.llvm.org/4.0.1/clang+llvm-4.0.1-x86_64-linux-gnu-debian8.tar.xz
15+
- tar -xf ./clang+llvm-4.0.1-x86_64-linux-gnu-debian8.tar.xz
16+
- sudo cp clang+llvm-4.0.1-x86_64-linux-gnu-debian8/bin/clang-format /usr/local/bin/
17+
- which clang-format
18+
- clang-format --version
19+
20+
install: true
21+
22+
script:
23+
- make presubmit
24+
- test -z $(git diff --name-only) # check that the diff is empty after formatting the code
25+
26+
# If the build fails because some code in not formatted, it's nice to see the diffs after formatting.
27+
after_failure:
28+
- git diff --name-only
29+
- git diff

0 commit comments

Comments
 (0)