Commit 5494d4be authored by Franziskus Kiefer's avatar Franziskus Kiefer

Bug 1204998 - travis.yml with clang-format 3.8, mac and asan builds, r=mt,ekr

parent f82e47dc
......@@ -15,7 +15,7 @@ AllowShortFunctionsOnASingleLine: All
AlwaysBreakAfterDefinitionReturnType: true
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: None
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
......
sudo: required
dist: trusty
addons:
apt:
sources:
# add PPAs with more up-to-date toolchains
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
# install toolchains
- gcc-5
- g++-5
- clang-3.8
# install additional tools
- clang-format-3.8
matrix:
include:
- os: osx
compiler: clang-3.8
env:
- CC=clang-3.8
- CCC=clang++-3.8
- os: osx
compiler: clang-3.8
env:
- CC=clang-3.8
- CCC=clang++-3.8
- BUILD_OPT=1
- os: linux
compiler: gcc
env:
- CC=gcc-5
- CCC=g++-5
- os: linux
compiler: gcc
env:
- CC=gcc-5
- CCC=g++-5
- BUILD_OPT=1
- os: linux
compiler: gcc
env:
- CC=gcc-5
- CCC=g++-5
- USE_ASAN=1
- os: linux
env: CLANG_FORMAT=1
allow_failures:
- env: CLANG_FORMAT=1
env:
global:
- USE_64=1
- NSS_ENABLE_TLS_1_3=1
install:
- hg clone https://hg.mozilla.org/projects/nspr ../nspr
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; brew install llvm38; fi
script:
- if [ -n "$CLANG_FORMAT" ]; then automation/travis/validate-formatting.sh lib/ssl; exit $?; fi
- make nss_build_all
- cd tests; NSS_TESTS="ssl_gtests pk11_gtests der_gtests util_gtests" NSS_CYCLES=standard ./all.sh
#!/bin/bash
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Apply clang-format 3.8 on the provided folder and verify that this doesn't change any file.
# If any file differs after formatting, the script eventually exits with 1.
# Any differences between formatted and unformatted files is printed to stdout to give a hint what's wrong.
STATUS=0
for i in $(find $1 -type f -name '*.[ch]' -print); do
if ! clang-format-3.8 $i | diff $i -; then
echo "Sorry, $i is not formatted properly. Please use clang-format 3.8 on your patch before landing."
STATUS=1
fi
done
exit $STATUS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment