mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-18 01:57:13 +00:00
Initial Tests & CI (#5)
* Added awscrt_version() and test for it * Added builder.json for CI * Added github actions * Added format-check.sh * Force php5.6 on ubuntu * Updated submodules
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z $CLANG_FORMAT ]] ; then
|
||||
CLANG_FORMAT=clang-format
|
||||
fi
|
||||
|
||||
if NOT type $CLANG_FORMAT 2> /dev/null ; then
|
||||
echo "No appropriate clang-format found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FAIL=0
|
||||
SOURCE_FILES=`find src -type f \( -name '*.h' -o -name '*.c' \)`
|
||||
for i in $SOURCE_FILES
|
||||
do
|
||||
$CLANG_FORMAT -output-replacements-xml $i | grep -c "<replacement " > /dev/null
|
||||
if [ $? -ne 1 ]
|
||||
then
|
||||
echo "$i failed clang-format check."
|
||||
FAIL=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $FAIL
|
||||
Reference in New Issue
Block a user