light/.drone.yml

58 lines
1.1 KiB
YAML
Raw Normal View History

2025-07-11 13:02:30 +03:30
kind: pipeline
type: docker
name: clang format
clone:
recursive: true
submodule_update_remote: true
2025-07-11 13:02:30 +03:30
trigger:
branch:
- main
steps:
- name: clang format
image: clang_format:latest
2025-07-11 13:04:38 +03:30
pull: if-not-exists
2025-07-11 13:02:30 +03:30
commands:
- |
set -e
clang-format --version
2025-07-15 16:18:51 +03:30
HAS_ISSUES=0
for file in $(find ./modules -name '*.?pp'); do
2025-07-11 13:02:30 +03:30
echo "Checking format for $file"
if ! clang-format --dry-run --Werror "$file"; then
echo "❌ Formatting issue detected in $file"
2025-07-15 16:18:51 +03:30
HAS_ISSUES=1
2025-07-11 13:02:30 +03:30
fi
done
2025-07-15 16:18:51 +03:30
if [ "$HAS_ISSUES" -eq 0 ]; then
echo "✅ All files are properly formatted! Well done! ^~^"
2025-07-15 16:23:06 +03:30
else
echo "❌ Senpai! There was some formatting issues :c"
fi
2025-07-15 16:18:51 +03:30
exit $HAS_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