ci: update .drone.yml
This commit is contained in:
parent
57031ee44e
commit
3520ae36a6
1 changed files with 72 additions and 80 deletions
152
.drone.yml
152
.drone.yml
|
@ -12,24 +12,23 @@ platform:
|
||||||
steps:
|
steps:
|
||||||
- name: tests
|
- name: tests
|
||||||
shell: powershell
|
shell: powershell
|
||||||
commands:
|
commands: |
|
||||||
- |
|
conan profile detect
|
||||||
conan profile detect
|
|
||||||
|
|
||||||
conan build . -s compiler.cppstd=20 -s build_type=Release
|
conan build . -s compiler.cppstd=20 -s build_type=Release
|
||||||
|
|
||||||
$tests = Get-ChildItem -Path "./build" -Recurse -File | Where-Object {
|
$tests = Get-ChildItem -Path "./build" -Recurse -File | Where-Object {
|
||||||
$_.Name -like "*_tests.exe"
|
$_.Name -like "*_tests.exe"
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($test in $tests) {
|
foreach ($test in $tests) {
|
||||||
Write-Host "Running $($test.FullName)"
|
Write-Host "Running $($test.FullName)"
|
||||||
& $test.FullName
|
& $test.FullName
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
Write-Error "Test $($test.Name) failed! T_T"
|
Write-Error "Test $($test.Name) failed! T_T"
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -43,22 +42,20 @@ steps:
|
||||||
- name: tests
|
- name: tests
|
||||||
image: unit_tests:latest
|
image: unit_tests:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands: |
|
||||||
- |
|
set -e
|
||||||
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
|
||||||
|
|
||||||
conan build . \
|
for test in $(find ./build -type f -name '*_tests' -executable); do
|
||||||
-c tools.system.package_manager:mode=install \
|
echo "Running $test"
|
||||||
-c tools.cmake.cmaketoolchain:generator=Ninja \
|
"$test"
|
||||||
-s build_type=Release \
|
done
|
||||||
-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
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -72,19 +69,17 @@ steps:
|
||||||
- name: valgrind
|
- name: valgrind
|
||||||
image: valgrind:latest
|
image: valgrind:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands: |
|
||||||
- |
|
set -e
|
||||||
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
|
||||||
|
|
||||||
conan build . \
|
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
|
||||||
-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
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -98,28 +93,26 @@ steps:
|
||||||
- name: leak sanitizer
|
- name: leak sanitizer
|
||||||
image: leak_sanitizer:latest
|
image: leak_sanitizer:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands: |
|
||||||
- |
|
set -e
|
||||||
set -e
|
conan build . \
|
||||||
|
-c tools.system.package_manager:mode=install \
|
||||||
conan build . \
|
-c tools.cmake.cmaketoolchain:generator=Ninja \
|
||||||
-c tools.system.package_manager:mode=install \
|
-c tools.build:cxxflags='["-g", "-fno-omit-frame-pointer", "-nostdinc++", "-isystem", "/libcxx_lsan/include/c++/v1/", "-fsanitize=leak"]' \
|
||||||
-c tools.cmake.cmaketoolchain:generator=Ninja \
|
-c tools.build:sharedlinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \
|
||||||
-c tools.build:cxxflags='["-g", "-fno-omit-frame-pointer", "-nostdinc++", "-isystem", "/libcxx_lsan/include/c++/v1/", "-fsanitize=leak"]' \
|
-c tools.build:exelinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \
|
||||||
-c tools.build:sharedlinkflags='["-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:exelinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \
|
-c tools.build:compiler_executables='{"c": "clang", "cpp": "clang++"}' \
|
||||||
-c tools.info.package_id:confs='["tools.build:cxxflags","tools.build:sharedlinkflags","tools.build:exelinkflags"]' \
|
-s build_type=Release \
|
||||||
-c tools.build:compiler_executables='{"c": "clang", "cpp": "clang++"}' \
|
-s compiler=clang \
|
||||||
-s build_type=Release \
|
-s compiler.version=20 \
|
||||||
-s compiler=clang \
|
-s compiler.libcxx=libc++ \
|
||||||
-s compiler.version=20 \
|
-o use_mold=True \
|
||||||
-s compiler.libcxx=libc++ \
|
--build=missing
|
||||||
-o use_mold=True \
|
for test in $(find ./build -type f -name '*_tests' -executable); do
|
||||||
--build=missing
|
echo "Running $test"
|
||||||
for test in $(find ./build -type f -name '*_tests' -executable); do
|
"$test"
|
||||||
echo "Running $test"
|
done
|
||||||
"$test"
|
|
||||||
done
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -157,22 +150,21 @@ steps:
|
||||||
- name: clang format
|
- name: clang format
|
||||||
image: clang_format:latest
|
image: clang_format:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands: |
|
||||||
- |
|
set -e
|
||||||
set -e
|
clang-format --version
|
||||||
clang-format --version
|
has_fomatting_issues=0
|
||||||
has_fomatting_issues=0
|
|
||||||
|
|
||||||
for file in $(find ./modules -name '*.?pp'); do
|
for file in $(find ./modules -name '*.?pp'); do
|
||||||
echo "Checking format for $file"
|
echo "Checking format for $file"
|
||||||
if ! clang-format --dry-run --Werror "$file"; then
|
if ! clang-format --dry-run --Werror "$file"; then
|
||||||
echo "❌ Formatting issue detected in $file"
|
echo "❌ Formatting issue detected in $file"
|
||||||
has_fomatting_issues=1
|
has_fomatting_issues=1
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$has_fomatting_issues" -eq 0 ]; then
|
|
||||||
echo "✅ All files are properly formatted! Well done! ^~^"
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
exit ${has_fomatting_issues}
|
if [ "$has_fomatting_issues" -eq 0 ]; then
|
||||||
|
echo "✅ All files are properly formatted! Well done! ^~^"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit ${has_fomatting_issues}
|
||||||
|
|
Loading…
Add table
Reference in a new issue