mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Use clang-format-9 for Travis CI formatting checks (#736)
This commit is contained in:
@@ -7,7 +7,12 @@ os:
|
|||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
|
dist: bionic
|
||||||
env: JOB_CHECK_FORMAT=1
|
env: JOB_CHECK_FORMAT=1
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- clang-format-9
|
||||||
- os: linux
|
- os: linux
|
||||||
env: JOB_ARCHITECTURE=arm
|
env: JOB_ARCHITECTURE=arm
|
||||||
- os: linux
|
- os: linux
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Run git-clang-format to check for violations
|
# Run git-clang-format to check for violations
|
||||||
CLANG_FORMAT_OUTPUT=$(git-clang-format --diff origin/master --extensions c,cpp,h,hpp)
|
if [ "$TRAVIS" == "true" ]; then
|
||||||
|
EXTRA_OPTS="--binary `which clang-format-9`"
|
||||||
|
fi
|
||||||
|
CLANG_FORMAT_OUTPUT=$(git-clang-format --diff origin/master --extensions c,cpp,h,hpp $EXTRA_OPTS)
|
||||||
|
|
||||||
# Check for no-ops
|
# Check for no-ops
|
||||||
grep '^no modified files to format$' <<<"$CLANG_FORMAT_OUTPUT" && exit 0
|
grep '^no modified files to format$' <<<"$CLANG_FORMAT_OUTPUT" && exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user