File tree 1 file changed +33
-1
lines changed
1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change 5
5
- linux
6
6
matrix :
7
7
include :
8
+ #
9
+ # Astyle check
10
+ #
8
11
- env :
9
- - NAME= arduinoCI
12
+ - NAME=Astyle
13
+ install :
14
+ - curl -L0 https://fossies.org/linux/misc/astyle_3.1_linux.tar.gz --output astyle.tar.gz;
15
+ mkdir -p BUILD && tar xf astyle.tar.gz -C BUILD;
16
+ pushd BUILD/astyle/build/gcc;
17
+ make;
18
+ export PATH=$PWD/bin:$PATH;
19
+ popd;
20
+ - astyle --version
21
+ before_script :
22
+ - cd $TRAVIS_BUILD_DIR/CI/astyle/
23
+ script :
24
+ # Check coding style only on changed files for PR or all for master
25
+ - if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then python astyle.py; fi
26
+ - if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then python astyle.py -b $TRAVIS_BRANCH; fi
27
+ - TEST=$([[ -f astyle.out ]] && cat astyle.out | grep Formatted | wc -l || echo 0)
28
+ - |
29
+ if [[ $TEST -ne 0 ]]; then
30
+ cat astyle.out | grep Formatted
31
+ git --no-pager diff
32
+ echo "AStyle check failed, please fix style issues as shown above"
33
+ exit 1
34
+ else
35
+ echo "Coding style check OK";
36
+ fi
37
+ #
38
+ # Build test
39
+ #
40
+ - env :
41
+ - NAME=arduinoCI
10
42
- IDE_VERSION=1.8.8
11
43
# Use in CI/build/conf/path_config_travis.json
12
44
- ARDUINO_IDE_PATH=$HOME/IDE/arduino
You can’t perform that action at this time.
0 commit comments