light/.drone.yml

171 lines
4.1 KiB
YAML
Raw Normal View History

---
kind: pipeline
type: exec
2025-07-20 07:28:21 +03:30
name: amd64_msvc — tests
2025-07-20 05:52:32 +03:30
trigger:
branch:
- main
platform:
os: windows
arch: amd64
steps:
2025-07-20 07:28:21 +03:30
- name: tests
2025-07-20 06:10:27 +03:30
shell: powershell
2025-07-20 07:30:59 +03:30
commands: |
conan profile detect
2025-07-20 07:28:21 +03:30
2025-07-20 07:30:59 +03:30
conan build . -s compiler.cppstd=20 -s build_type=Release
2025-07-20 07:28:21 +03:30
2025-07-20 07:30:59 +03:30
$tests = Get-ChildItem -Path "./build" -Recurse -File | Where-Object {
$_.Name -like "*_tests.exe"
}
2025-07-20 07:28:21 +03:30
2025-07-20 07:30:59 +03:30
foreach ($test in $tests) {
Write-Host "Running $($test.FullName)"
& $test.FullName
if ($LASTEXITCODE -ne 0) {
Write-Error "Test $($test.Name) failed! T_T"
exit $LASTEXITCODE
}
}
---
2025-07-11 13:02:30 +03:30
kind: pipeline
type: docker
2025-07-20 07:28:21 +03:30
name: amd64_gcc — tests
2025-07-11 13:02:30 +03:30
trigger:
branch:
- main
steps:
2025-07-20 07:28:21 +03:30
- name: tests
image: unit_tests:latest
2025-07-11 13:04:38 +03:30
pull: if-not-exists
2025-07-20 07:30:59 +03:30
commands: |
set -e
conan build . \
-c tools.system.package_manager:mode=install \
-c tools.cmake.cmaketoolchain:generator=Ninja \
-s build_type=Release \
-o enable_tests=True \
-o use_mold=True \
--build=missing
for test in $(find ./build -type f -name '*_tests' -executable); do
echo "Running $test"
"$test"
done
2025-07-16 11:03:42 +03:30
---
2025-07-16 11:03:42 +03:30
kind: pipeline
type: docker
2025-07-20 07:28:21 +03:30
name: amd64_gcc — valgrind
2025-07-16 11:03:42 +03:30
trigger:
branch:
- main
2025-07-16 11:03:42 +03:30
steps:
- name: valgrind
image: valgrind:latest
2025-07-16 11:03:42 +03:30
pull: if-not-exists
2025-07-20 07:30:59 +03:30
commands: |
set -e
conan build . \
-c tools.system.package_manager:mode=install \
-c tools.cmake.cmaketoolchain:generator=Ninja \
-s build_type=Release \
-o enable_tests=True \
-o use_mold=True \
--build=missing
find ./build -type f -name "*_tests" -executable | xargs -I {} bash -c 'valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --error-exitcode=255 {}' || exit 1
2025-07-16 11:03:42 +03:30
---
kind: pipeline
type: docker
2025-07-20 07:28:21 +03:30
name: amd64_clang — sanitizer — leak
trigger:
branch:
- main
steps:
- name: leak sanitizer
image: leak_sanitizer:latest
pull: if-not-exists
2025-07-20 07:30:59 +03:30
commands: |
set -e
conan build . \
-c tools.system.package_manager:mode=install \
-c tools.cmake.cmaketoolchain:generator=Ninja \
-c tools.build:cxxflags='["-g", "-fno-omit-frame-pointer", "-nostdinc++", "-isystem", "/libcxx_lsan/include/c++/v1/", "-fsanitize=leak"]' \
-c tools.build:sharedlinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \
-c tools.build:exelinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \
-c tools.info.package_id:confs='["tools.build:cxxflags","tools.build:sharedlinkflags","tools.build:exelinkflags"]' \
-c tools.build:compiler_executables='{"c": "clang", "cpp": "clang++"}' \
-s build_type=Release \
-s compiler=clang \
-s compiler.version=20 \
-s compiler.libcxx=libc++ \
-o use_mold=True \
--build=missing
for test in $(find ./build -type f -name '*_tests' -executable); do
echo "Running $test"
"$test"
done
2025-07-16 11:03:42 +03:30
---
kind: pipeline
type: docker
name: static analysis
trigger:
branch:
- main
steps:
- name: static_analysis
image: static_analysis:latest
pull: if-not-exists
privileged: true
commands:
2025-07-16 11:03:42 +03:30
- |
conan build . \
-c tools.system.package_manager:mode=install \
-c tools.cmake.cmaketoolchain:generator=Ninja \
2025-07-20 05:52:32 +03:30
-s build_type=Release \
2025-07-16 11:03:42 +03:30
-o enable_static_analysis=True \
-o enable_tests=True \
2025-07-20 05:52:32 +03:30
-o use_mold=True \
2025-07-16 11:03:42 +03:30
--build=missing
---
kind: pipeline
type: docker
2025-07-20 07:28:21 +03:30
name: style
trigger:
branch:
- main
steps:
- name: clang format
image: clang_format:latest
pull: if-not-exists
2025-07-20 07:30:59 +03:30
commands: |
set -e
clang-format --version
has_fomatting_issues=0
for file in $(find ./modules -name '*.?pp'); 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
2025-07-20 07:30:59 +03:30
done
if [ "$has_fomatting_issues" -eq 0 ]; then
echo "✅ All files are properly formatted! Well done! ^~^"
fi
2025-07-20 07:30:59 +03:30
exit ${has_fomatting_issues}