From 3fed6aa4f2239b96ac65434bf2dc7cdd71903f5c Mon Sep 17 00:00:00 2001 From: light7734 Date: Thu, 9 Oct 2025 19:53:18 +0330 Subject: [PATCH] wip --- .drone.yml | 252 +++++++++++++++++------------------ tools/ci/amd64/clang/lsan.sh | 4 +- tools/ci/amd64/clang/msan.sh | 10 +- 3 files changed, 135 insertions(+), 131 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9abc962..6857bc5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,42 +1,42 @@ ---- -kind: pipeline -type: exec -name: amd64 — msvc -trigger: - branch: - - main -platform: - os: windows - arch: amd64 - -steps: -- name: unit tests - shell: powershell - commands: - - ./tools/ci/amd64/msvc/unit_tests.ps1 - ---- -kind: pipeline -type: docker -name: amd64 — gcc -trigger: - branch: - - main - -steps: -- name: unit tests - image: ci:latest - pull: if-not-exists - commands: - - ./tools/ci/amd64/gcc/unit_tests.sh - -- name: valgrind - image: ci:latest - pull: if-not-exists - commands: - - ./tools/ci/amd64/gcc/valgrind.sh - ---- +# --- +# kind: pipeline +# type: exec +# name: amd64 — msvc +# trigger: +# branch: +# - main +# platform: +# os: windows +# arch: amd64 +# +# steps: +# - name: unit tests +# shell: powershell +# commands: +# - ./tools/ci/amd64/msvc/unit_tests.ps1 +# +# --- +# kind: pipeline +# type: docker +# name: amd64 — gcc +# trigger: +# branch: +# - main +# +# steps: +# - name: unit tests +# image: ci:latest +# pull: if-not-exists +# commands: +# - ./tools/ci/amd64/gcc/unit_tests.sh +# +# - name: valgrind +# image: ci:latest +# pull: if-not-exists +# commands: +# - ./tools/ci/amd64/gcc/valgrind.sh +# +# --- kind: pipeline type: docker name: amd64 — clang @@ -45,95 +45,95 @@ trigger: - main steps: -- name: code coverage - image: ci:latest - pull: if-not-exists - environment: - CODECOV_TOKEN: - from_secret: CODECOV_TOKEN - commands: - - ./tools/ci/amd64/clang/coverage.sh - -- name: leak sanitizer - image: ci:latest - pull: if-not-exists - commands: - - ./tools/ci/amd64/clang/lsan.sh - +# - name: code coverage +# image: ci:latest +# pull: if-not-exists +# environment: +# CODECOV_TOKEN: +# from_secret: CODECOV_TOKEN +# commands: +# - ./tools/ci/amd64/clang/coverage.sh +# +# - name: leak sanitizer +# image: ci:latest +# pull: if-not-exists +# commands: +# - ./tools/ci/amd64/clang/lsan.sh +# - name: memory sanitizer image: ci:latest pull: if-not-exists commands: - ./tools/ci/amd64/clang/msan.sh - ---- -kind: pipeline -type: docker -name: static analysis -trigger: - branch: - - main - -steps: -- name: clang tidy - image: ci:latest - pull: if-not-exists - privileged: true - commands: - - ./tools/ci/static_analysis/clang_tidy.sh - -- name: clang format - image: ci:latest - pull: if-not-exists - commands: - - ./tools/ci/static_analysis/clang_format.sh - ---- -kind: pipeline -type: docker -name: documentation — development -node: - environment: ryali -trigger: - branch: - - main - -steps: -- name: build and deploy - image: documentation:latest - pull: if-not-exists - commands: - - pwd - - cd docs - - mkdir generated - - touch generated/changelogs.rst - - touch generated/api.rst - - sphinx-build -M html . . - - - rm -rf /light_docs_dev/* - - mv ./html/* /light_docs_dev/ - ---- - -kind: pipeline -type: docker -name: documentation — production -node: - environment: ryali -trigger: - event: - - tag - -steps: -- name: build and deploy - image: documentation:latest - pull: if-not-exists - commands: - - cd docs - - mkdir generated - - touch generated/changelogs.rst - - touch generated/api.rst - - sphinx-build -M html . . - - - rm -rf /light_docs/* - - mv ./html/* /light_docs/ +# +# --- +# kind: pipeline +# type: docker +# name: static analysis +# trigger: +# branch: +# - main +# +# steps: +# - name: clang tidy +# image: ci:latest +# pull: if-not-exists +# privileged: true +# commands: +# - ./tools/ci/static_analysis/clang_tidy.sh +# +# - name: clang format +# image: ci:latest +# pull: if-not-exists +# commands: +# - ./tools/ci/static_analysis/clang_format.sh +# +# --- +# kind: pipeline +# type: docker +# name: documentation — development +# node: +# environment: ryali +# trigger: +# branch: +# - main +# +# steps: +# - name: build and deploy +# image: documentation:latest +# pull: if-not-exists +# commands: +# - pwd +# - cd docs +# - mkdir generated +# - touch generated/changelogs.rst +# - touch generated/api.rst +# - sphinx-build -M html . . +# +# - rm -rf /light_docs_dev/* +# - mv ./html/* /light_docs_dev/ +# +# --- +# +# kind: pipeline +# type: docker +# name: documentation — production +# node: +# environment: ryali +# trigger: +# event: +# - tag +# +# steps: +# - name: build and deploy +# image: documentation:latest +# pull: if-not-exists +# commands: +# - cd docs +# - mkdir generated +# - touch generated/changelogs.rst +# - touch generated/api.rst +# - sphinx-build -M html . . +# +# - rm -rf /light_docs/* +# - mv ./html/* /light_docs/ diff --git a/tools/ci/amd64/clang/lsan.sh b/tools/ci/amd64/clang/lsan.sh index a074829..9b9822f 100755 --- a/tools/ci/amd64/clang/lsan.sh +++ b/tools/ci/amd64/clang/lsan.sh @@ -17,9 +17,9 @@ cmake . \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_FLAGS=" \ -fsanitize=leak \ +-fno-omit-frame-pointer \ -fno-common \ -g \ --fno-omit-frame-pointer \ -std=c++23 \ -nostdinc++ \ -isystem /libcxx_lsan/include/c++/v1/" \ @@ -29,7 +29,7 @@ cmake . \ -lc++ \ -lc++abi \ -Wl,-rpath,/libcxx_lsan/lib" \ -&& cmake --build ./build --target='renderer_tests' -j`nproc` +&& cmake --build ./build -j`nproc` export LSAN_OPTIONS="suppressions=$(git rev-parse --show-toplevel)/tools/ci/amd64/clang/lsan.supp:fast_unwind_on_malloc=0:verbosity=1:report_objects=1" export LSAN_SYMBOLIZER_PATH="$(which llvm-symbolizer)" diff --git a/tools/ci/amd64/clang/msan.sh b/tools/ci/amd64/clang/msan.sh index 5cc6321..bedbf68 100755 --- a/tools/ci/amd64/clang/msan.sh +++ b/tools/ci/amd64/clang/msan.sh @@ -8,10 +8,14 @@ Xvfb :99 -screen 0 1024x768x16 & export CXX=$(which clang++) export CC=$(which clang) export DISPLAY=:99 +export PKG_CONFIG_PATH=/msan/lib/pkgconfig:${PKG_CONFIG_PATH} cmake . \ -Bbuild \ -GNinja \ +-DCMAKE_INCLUDE_PATH=/msan/include \ +-DCMAKE_LIBRARY_PATH=/msan/lib \ +-DCMAKE_PREFIX_PATH=/msan \ -DCMAKE_LINKER_TYPE=MOLD \ -DENABLE_UNIT_TESTS=ON \ -DCMAKE_BUILD_TYPE=Release \ @@ -26,10 +30,10 @@ cmake . \ -DCMAKE_EXE_LINKER_FLAGS=" \ -fsanitize=memory \ -fsanitize-memory-track-origins \ --L/libcxx_msan/lib \ +-L/msan/lib -Wl,-rpath,/msan/lib \ +-L/libcxx_msan/lib -Wl,-rpath,/libcxx_msan/lib \ -lc++ \ --lc++abi \ --Wl,-rpath,/libcxx_msan/lib" \ +-lc++abi" \ && cmake --build ./build -j`nproc` for test in $(find ./build -type f -name '*_tests' -executable); do