Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1204998 - travis.yml with clang-format 3.8, mac and asan builds, …
…r=mt,ekr
- Loading branch information
1 parent
f82e47d
commit 5494d4b
Showing
3 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/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 |