Compare commits

...

2 commits

Author SHA1 Message Date
ae236efe2b
ci: add unit testing to drone-ci
Some checks failed
continuous-integration/drone/pr Build is failing
2025-07-16 11:03:42 +03:30
38cabb6b32 ci: add unit tests Dockerfile 2025-07-16 10:54:04 +03:30
2 changed files with 82 additions and 3 deletions

View file

@ -32,8 +32,43 @@ steps:
fi fi
exit ${has_fomatting_issues} exit ${has_fomatting_issues}
---
---
kind: pipeline
type: docker
name: unit tests
clone:
recursive: true
submodule_update_remote: true
trigger:
branch:
- main
steps:
- name: unit tests
image: unit_tests:latest
pull: if-not-exists
commands:
- |
git submodule update --init --recursive
conan build . \
-c tools.system.package_manager:mode=install \
-s build_type=Release \
-o enable_static_analysis=False \
-o enable_tests=True \
--build=missing
find ./build \
-type f \
-name '*_tests' \
-executable \
-exec sh -c \
'{}' \
\;
---
kind: pipeline kind: pipeline
type: docker type: docker
name: static analysis name: static analysis
@ -51,5 +86,12 @@ steps:
pull: if-not-exists pull: if-not-exists
privileged: true privileged: true
commands: commands:
- git submodule update --init --recursive - |
- conan build . -s build_type=Release -o enable_static_analysis=True --build=missing git submodule update --init --recursive
conan build . \
-c tools.system.package_manager:mode=install \
-s build_type=Release \
-o enable_static_analysis=True \
-o enable_tests=True \
--build=missing

View file

@ -0,0 +1,37 @@
FROM alpine:latest
RUN apk add --no-cache \
bash \
clang \
llvm \
cmake \
git \
make \
g++ \
python3 \
py3-pip \
mesa-dev \
mesa-gl \
pkgconf
RUN pip install --no-cache-dir --break-system-packages conan gitpython \
&& conan profile detect
RUN clang --version \
&& conan --version \
&& pip --version \
&& cmake --version \
&& clang --version
RUN git clone 'https://git.light7734.com/light7734/light.git' --recursive \
&& cd light \
&& conan install . \
-s build_type=Debug \
-c tools.system.package_manager:mode=install \
--build=missing \
&& conan install . \
-s build_type=Release \
-c tools.system.package_manager:mode=install \
--build=missing