From da4ba1731a59665bd9f8a783328ebe70aa2dff52 Mon Sep 17 00:00:00 2001 From: iphydf Date: Fri, 19 Jan 2018 22:39:42 +0000 Subject: [PATCH] Add astyle to Circle CI build. --- circle.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/circle.yml b/circle.yml index 002aea98..7d159a1a 100644 --- a/circle.yml +++ b/circle.yml @@ -12,6 +12,7 @@ machine: dependencies: pre: - sudo apt-get update + - sudo apt-get install astyle - sudo apt-get install clang - sudo apt-get install build-essential libtool autotools-dev automake checkinstall check git yasm - sudo apt-get install libopus-dev libvpx-dev pkg-config @@ -25,9 +26,20 @@ dependencies: - java -version ; exit 0 - gcc --version ; exit 0 - clang --version ; exit 0 + - astyle --version ; exit 0 compile: override: + ### ----- check code style ------ + - cd .. ; cp -av c-toxcore ./astyle_check/ + - cd ../astyle_check/ ; ls -al other/astyle/astylerc + - cd ../astyle_check/ ; + SOURCES=`find . -name "*.[ch]" -and -not -name "*.api.h" -and -not -wholename "*crypto_pwhash*" -and -not -wholename "./super_donators/*"|sort`; + astyle -n --options=other/astyle/astylerc $SOURCES ; exit 0 + - cd ../astyle_check/ ; git --no-pager diff + - cd ../astyle_check/ ; git diff | cat > $CIRCLE_ARTIFACTS/astyle_check.patch 2>&1 + ### ----- check code style ------ + ### ------- get libsodium ------- - mkdir ~/libsodium - cd ~/libsodium/ ; git clone https://github.com/jedisct1/libsodium.git