56 lines
1.1 KiB
YAML
56 lines
1.1 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: clang format
|
|
clone:
|
|
recursive: true
|
|
submodule_update_remote: true
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
|
|
steps:
|
|
- name: clang format
|
|
image: clang_format:latest
|
|
pull: if-not-exists
|
|
commands:
|
|
- |
|
|
set -e
|
|
clang-format --version
|
|
|
|
has_fomatting_issues=0
|
|
|
|
find ./modules -name '*.?pp' | while read -r file; do
|
|
echo "Checking format for $file"
|
|
if ! clang-format --dry-run --Werror "$file"; then
|
|
echo "❌ Formatting issue detected in $file"
|
|
has_fomatting_issues=1
|
|
fi
|
|
done
|
|
|
|
if [ "$has_errors" -eq 0 ]; then
|
|
echo "✅ All files are properly formatted! Well done! ^~^"
|
|
fi
|
|
|
|
exit ${has_fomatting_issues}
|
|
---
|
|
|
|
kind: pipeline
|
|
type: docker
|
|
name: static analysis
|
|
clone:
|
|
recursive: true
|
|
submodule_update_remote: true
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
|
|
steps:
|
|
- name: static_analysis
|
|
image: static_analysis:latest
|
|
pull: if-not-exists
|
|
privileged: true
|
|
commands:
|
|
- git submodule update --init --recursive
|
|
- conan build . -s build_type=Release -o enable_static_analysis=True --build=missing
|