Skip to content

Commit cd84755

Browse files
committed
Move cpplint to separate Travis job (#1008)
Now cpplint job will run in a parralel instead of consecutively. Relates-To: OLPEDGE-1853 Signed-off-by: Yaroslav Stefinko <ext-yaroslav.stefinko@here.com>
1 parent 15e665d commit cd84755

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.travis.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,23 @@ env:
66
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
77
- SEGFAULT_SIGNALS=all
88
- WORKSPACE=$TRAVIS_BUILD_DIR
9-
addons:
10-
apt:
11-
packages:
12-
- libboost-all-dev
13-
- libssl-dev
14-
- libcurl4-openssl-dev
159
matrix:
1610
- compiler: gcc
1711
cache: ccache
1812
env: BUILD_TYPE=COVERAGE WORKSPACE=$TRAVIS_BUILD_DIR
1913
name: Linux Build using gcc & tests & code coverage
20-
script: $WORKSPACE/scripts/misc/cpplint_ci.sh && $WORKSPACE/scripts/linux/psv/build_psv.sh && $WORKSPACE/scripts/linux/psv/travis_test_psv.sh
14+
script: $WORKSPACE/scripts/linux/psv/build_psv.sh && $WORKSPACE/scripts/linux/psv/travis_test_psv.sh
15+
addons:
16+
apt:
17+
packages:
18+
- libboost-all-dev
19+
- libssl-dev
20+
- libcurl4-openssl-dev
21+
- language: minimal
22+
name: "C++ Lint checker script"
23+
script: $WORKSPACE/scripts/misc/cpplint_ci.sh
24+
if: type = pull_request
2125
branches:
2226
only:
2327
- master
28+

scripts/misc/cpplint_ci.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash +e
1+
#!/bin/bash -ex
22
#
33
# Copyright (C) 2020 HERE Europe B.V.
44
#
@@ -31,9 +31,11 @@ else
3131
printf "Currently in %s branch. Running cpplint.\n" "$CURRENT_BRANCH"
3232
fi
3333

34+
set +e
3435
# Get affected files and filter source files
3536
FILES=$(git diff-tree --no-commit-id --name-only -r master "$CURRENT_BRANCH" \
3637
| grep '\.c\|\.cpp\|\.cxx\|\.h\|\.hpp\|\.hxx')
38+
set -e
3739

3840
if [ -z "$FILES" ]; then
3941
printf "No affected files, exiting.\n"

0 commit comments

Comments
 (0)