diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2017-07-25 20:48:23 +0200 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@google.com> | 2017-07-28 13:25:48 +0200 |
| commit | 8d3403cdcc085bdc764948d30eca38e6459972ca (patch) | |
| tree | bd72b9466eec9ce363b2a3c5d7c32e13964e40ac | |
| parent | 3eefb3bce6a6540c8d34e7fd1d483c324f644ded (diff) | |
buildbot: add .travis.yml
Also change .clang-format to support older versions of the tool.
| -rw-r--r-- | .clang-format | 2 | ||||
| -rw-r--r-- | .travis.yml | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/.clang-format b/.clang-format index f21cd7a55..15c07f7b4 100644 --- a/.clang-format +++ b/.clang-format @@ -7,9 +7,9 @@ DerivePointerAlignment: false PointerAlignment: Left AlignTrailingComments: true AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false ColumnLimit: 0 +AlignTrailingComments: false diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..0ac605177 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +language: go +dist: trusty + +go: + - 1.8.1 + +before_install: + - echo $PATH + - export PATH=`echo $PATH | sed -e 's/:\/usr\/local\/clang-3.5.0\/bin//'` + - wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb + - mkdir ./libc + - dpkg-deb -x ./libstdc++6_5.4.0-6ubuntu1~16.04.4_amd64.deb ./libc + - export LD_LIBRARY_PATH=`pwd`/libc/usr/lib/x86_64-linux-gnu/ + - wget http://releases.llvm.org/4.0.1/clang+llvm-4.0.1-x86_64-linux-gnu-debian8.tar.xz + - tar -xf ./clang+llvm-4.0.1-x86_64-linux-gnu-debian8.tar.xz + - sudo cp clang+llvm-4.0.1-x86_64-linux-gnu-debian8/bin/clang-format /usr/local/bin/ + - which clang-format + - clang-format --version + +install: true + +script: + - make presubmit + - test -z $(git diff --name-only) # check that the diff is empty after formatting the code + +# If the build fails because some code in not formatted, it's nice to see the diffs after formatting. +after_failure: + - git diff --name-only + - git diff |
