Enable upload artifact step for Clang-tidy and Clang-format.
This commit is contained in:
parent
e6596cfc37
commit
d1b77a7263
9
.github/workflows/ci_cd.rake
vendored
9
.github/workflows/ci_cd.rake
vendored
@ -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:
|
||||
|
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -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
|
||||
|
9
Rakefile
9
Rakefile
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user