Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
4a7a220af8
fix: missing display env var
Some checks are pending
continuous-integration/drone/push Build is running
2025-09-05 12:21:44 +03:30
a43243ca3f
build: differentiate between test types
Some checks are pending
continuous-integration/drone/push Build is running
fix: #41
2025-09-05 12:15:40 +03:30
5d30a56e22
revert: uncommenting the whole .drone.yml
Some checks are pending
continuous-integration/drone/push Build is running
2025-09-05 11:36:29 +03:30
51e044065a ci: documentation pipelines (#39)
All checks were successful
continuous-integration/drone/push Build is passing
fix: #36
fix: #37
Co-authored-by: light7734 <light7734@tuta.io>
Co-committed-by: light7734 <light7734@tuta.io>
2025-08-23 11:36:02 +00:00
9 changed files with 70 additions and 11 deletions

View file

@ -87,3 +87,54 @@ steps:
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:
- pwd
- cd docs
- mkdir generated
- touch generated/changelogs.rst
- touch generated/api.rst
- sphinx-build -M html . .
- rm -rf /light_docs/*
- mv ./html/* /light_docs/

View file

@ -8,7 +8,8 @@ include(${CMAKE_DIR}/functions.cmake)
include(${CMAKE_DIR}/definitions.cmake)
include(${CMAKE_DIR}/dependencies.cmake)
add_option(ENABLE_TESTS "Enables the building of the test modules")
add_option(ENABLE_UNIT_TESTS "Enables the building of the unit test modules")
add_option(ENABLE_FUZZ_TESTS "Enables the building of the fuzz test modules")
add_option(ENABLE_STATIC_ANALYSIS "Makes clang-tidy checks mandatory for compilation")
if (ENABLE_STATIC_ANALYSIS)

View file

@ -11,7 +11,8 @@ class LightRecipe(ConanFile):
generators = "CMakeDeps"
options = {
"enable_tests": [True, False],
"enable_unit_tests": [True, False],
"enable_fuzz_tests": [True, False],
"enable_llvm_coverage": [True, False],
"enable_static_analysis": [True, False],
"use_mold": [True, False],
@ -19,7 +20,8 @@ class LightRecipe(ConanFile):
}
default_options = {
"enable_tests": True,
"enable_unit_tests": True,
"enable_fuzz_tests": False,
"enable_llvm_coverage": False,
"enable_static_analysis": False,
"use_mold": False,
@ -46,7 +48,8 @@ class LightRecipe(ConanFile):
tc.cache_variables["CMAKE_LINKER_TYPE"] = "MOLD"
tc.cache_variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = self.options.export_compile_commands
tc.cache_variables["ENABLE_TESTS"] = self.options.enable_tests
tc.cache_variables["ENABLE_UNIT_TESTS"] = self.options.enable_unit_tests
tc.cache_variables["ENABLE_FUZZ_TESTS"] = self.options.enable_fuzz_tests
tc.cache_variables["ENABLE_LLVM_COVERAGE"] = self.options.enable_llvm_coverage
tc.cache_variables["ENABLE_STATIC_ANALYSIS"] = self.options.enable_static_analysis

View file

@ -21,7 +21,8 @@ RUN pacman -S --noconfirm --disable-download-timeout \
curl \
wget \
zlib \
libc++
libc++ \
libinput
RUN pip install --no-cache-dir --break-system-packages conan gitpython \
&& conan profile detect
@ -37,7 +38,7 @@ RUN pip --version \
&& llvm-cov --version
RUN git clone 'https://git.light7734.com/light7734/light.git' \
&& cd light; git checkout 'ci/code_cov' \
&& cd light \
&& conan build . \
-c tools.system.package_manager:mode=install \
-c tools.cmake.cmaketoolchain:generator=Ninja \

View file

@ -1,5 +1,7 @@
#!/bin/bash
export DISPLAY=':0'
set -e
cd $(git rev-parse --show-toplevel)/
rm -rf ./build

View file

@ -8,7 +8,7 @@ conan build . \
-c tools.system.package_manager:mode=install \
-c tools.cmake.cmaketoolchain:generator=Ninja \
-s build_type=Release \
-o enable_tests=True \
-o enable_unit_tests=True \
-o use_mold=True \
--build=missing

View file

@ -8,7 +8,7 @@ conan build . \
-c tools.system.package_manager:mode=install \
-c tools.cmake.cmaketoolchain:generator=Ninja \
-s build_type=Release \
-o enable_tests=True \
-o enable_unit_tests=True \
-o use_mold=True \
--build=missing

View file

@ -14,6 +14,7 @@ conan build . \
-c tools.cmake.cmaketoolchain:generator=Ninja \
-s build_type=Release \
-o enable_static_analysis=True \
-o enable_tests=True \
-o enable_unit_tests=True \
-o enable_fuzz_tests=True \
-o use_mold=True \
--build=missing

View file

@ -78,7 +78,7 @@ function (add_executable_module exename)
endfunction ()
function (add_test_module target_lib_name)
if (NOT ${ENABLE_TESTS})
if (NOT ${ENABLE_UNIT_TESTS})
return()
endif ()
@ -114,7 +114,7 @@ function (add_test_module target_lib_name)
endfunction ()
function (add_fuzz_module target_lib_name)
if (NOT ${ENABLE_TESTS})
if (NOT ${ENABLE_FUZZ_TESTS})
return()
endif ()