Commit 749a85cb authored by sigiesec's avatar sigiesec

Problem: travis-ci is using outdated clang(-format)

Solution: explicitly select clang-5.0
parent 26b5b5b2
...@@ -84,8 +84,14 @@ matrix: ...@@ -84,8 +84,14 @@ matrix:
- env: BUILD_TYPE=android CURVE=tweetnacl - env: BUILD_TYPE=android CURVE=tweetnacl
os: linux os: linux
dist: trusty dist: trusty
- env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 - env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=/usr/local/clang-5.0.0/bin/clang-format
os: linux os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
sudo: required sudo: required
......
...@@ -30,14 +30,12 @@ add_custom_target( ...@@ -30,14 +30,12 @@ add_custom_target(
clang-format-check clang-format-check
COMMAND chmod +x clang-format-check.sh COMMAND chmod +x clang-format-check.sh
COMMAND ./clang-format-check.sh COMMAND ./clang-format-check.sh
#COMMAND ${CLANG_FORMAT} -style=file -output-replacements-xml ${ALL_SOURCE_FILES} >clang-format-replacements.xml COMMENT "Checking correct formatting according to .clang-format file using ${CLANG_FORMAT}"
#COMMAND grep \"<replacement \" clang-format-replacements.xml >/dev/null && exit 1
COMMENT "Checking correct formatting according to .clang-format file"
) )
add_custom_target( add_custom_target(
clang-format-diff clang-format-diff
COMMAND ${CLANG_FORMAT} -style=file -i ${ALL_SOURCE_FILES} COMMAND ${CLANG_FORMAT} -style=file -i ${ALL_SOURCE_FILES}
COMMAND git diff ${ALL_SOURCE_FILES} COMMAND git diff ${ALL_SOURCE_FILES}
COMMENT "Formatting with clang-format and showing differences with latest commit" COMMENT "Formatting with clang-format (using ${CLANG_FORMAT}) and showing differences with latest commit"
) )
...@@ -18,6 +18,10 @@ CMAKE_OPTS+=("-DCMAKE_PREFIX_PATH:PATH=${BUILD_PREFIX}") ...@@ -18,6 +18,10 @@ CMAKE_OPTS+=("-DCMAKE_PREFIX_PATH:PATH=${BUILD_PREFIX}")
CMAKE_OPTS+=("-DCMAKE_LIBRARY_PATH:PATH=${BUILD_PREFIX}/lib") CMAKE_OPTS+=("-DCMAKE_LIBRARY_PATH:PATH=${BUILD_PREFIX}/lib")
CMAKE_OPTS+=("-DCMAKE_INCLUDE_PATH:PATH=${BUILD_PREFIX}/include") CMAKE_OPTS+=("-DCMAKE_INCLUDE_PATH:PATH=${BUILD_PREFIX}/include")
if [ "$CLANG_FORMAT" != "" ] ; then
CMAKE_OPTS+=("-DCLANG_FORMAT=${CLANG_FORMAT}")
fi
if [ -z $CURVE ]; then if [ -z $CURVE ]; then
CMAKE_OPTS+=("-DENABLE_CURVE=OFF") CMAKE_OPTS+=("-DENABLE_CURVE=OFF")
elif [ $CURVE == "libsodium" ]; then elif [ $CURVE == "libsodium" ]; then
......
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