Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit 188eb32

Browse files
committed
Skipped osx build in tags and linting only changed files
1 parent 4898a79 commit 188eb32

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ matrix:
4949
--cap-add SYS_PTRACE
5050
edomora97/task-maker-builder-$TOOLCHAIN:latest
5151
/build/tools/compile_and_lint.sh
52-
- os: osx
52+
- if: NOT branch =~ /^v.*/
53+
os: osx
5354
env:
5455
- WHAT=test
5556
- TOOLCHAIN=osx

hooks/lint-head

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPTPATH=$(dirname $(readlink -f $0))
4+
WORKDIR=${SCRIPTPATH}/..
5+
6+
cd $WORKDIR
7+
8+
FILES=$(git diff-tree --no-commit-id --name-only -r HEAD | grep -P "\.[ch]pp")
9+
SKIPPEDFILES=(cpp/util/sha256.hpp cpp/util/sha256.cpp)
10+
11+
ret=0
12+
for file in ${FILES}; do
13+
if [[ " ${SKIPPEDFILES[@]} " =~ " ${file} " ]]; then
14+
echo "== Skipped ${file} =="
15+
continue
16+
fi
17+
$SCRIPTPATH/lint-cpp-file $file
18+
ret=$((ret+$?))
19+
done
20+
21+
exit $ret

tools/compile_and_lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ python3 -m venv /tmp/venv --system-site-packages
66
. /tmp/venv/bin/activate
77
cmake -H. -Bbuild -DHUNTER_ENABLED=OFF -DTRAVIS=ON
88
cmake --build build
9-
./hooks/lint-all
9+
./hooks/lint-head

0 commit comments

Comments
 (0)