Enable upload artifact step for Clang-tidy and Clang-format.

This commit is contained in:
Yao Wei Tjong 姚伟忠 2020-09-16 13:53:03 +08:00
parent e6596cfc37
commit d1b77a7263
No known key found for this signature in database
GPG Key ID: 0296FF46D1EE7308
3 changed files with 14 additions and 6 deletions

View File

@ -76,14 +76,15 @@ end
desc 'Ensure all dot files are up-to-date'
task :update_dot_files do
system 'bash', '-c', %q(
perl -ne 'undef $/; print $1 if /(Build Option.*?(?=\n\n))/s' Docs/GettingStarted.dox |tail -n +3 |cut -d'|' -f2 |tr -d [:blank:] >script/.build-options && \
system 'bash', '-c', %q{
perl -ne 'undef $/; print $1 if /(Build Option.*?(?=\n\n))/s' Docs/GettingStarted.dox \
|tail -n +3 |cut -d'|' -f2 |tr -d [:blank:] >script/.build-options && \
echo URHO3D_LINT >>script/.build-options && \
cat script/.build-options <(perl -ne 'while (/([A-Z_]+):.+?/g) {print "$1\n"}' .github/workflows/main.yml) \
<(perl -ne 'while (/ENV\[\x27(\w+)\x27\]/g) {print "$1\n"}' Rakefile) \
<(perl -ne 'while (/System.getenv\\("(\w+)"\\)/g) {print "$1\n"}' android/urho3d-lib/build.gradle.kts) \
|sort |uniq |grep -Ev '^(HOME|PATH)$' >script/.env-file
) or abort 'Failed to update dot files'
|sort |uniq |grep -Ev '^(HOME|PATH)$' >script/.env-file
} or abort 'Failed to update dot files'
end
# vi: set ts=2 sw=2 expandtab:

View File

@ -111,7 +111,7 @@ jobs:
path: |
build/ci/*.tar.gz
android/urho3d-lib/build/distributions/*.aar
if: matrix.platform != 'linux-clang-tidy' && matrix.platform != 'linux-clang-format'
build/*.out
macOS:
name: 🍏
runs-on: macos-latest

View File

@ -133,7 +133,14 @@ task :lint do
end
task :style do
system "git diff --name-only HEAD~ -- Source |grep -v ThirdParty |grep -P '\\.(?:c|cpp|h|hpp)' |xargs clang-format -n -Werror" or abort 'Failed to pass style checks'
system 'bash', '-c', %q{
git diff --name-only HEAD~ -- Source \
|grep -v ThirdParty \
|grep -P '\.(?:c|cpp|h|hpp)' \
|xargs clang-format -n -Werror 2>&1 \
|tee build/clang-format.out \
&& exit ${PIPESTATUS[3]}
} or abort 'Failed to pass style checks'
puts 'Passed the style checks'
end