ci: structural refactors
This commit is contained in:
parent
9189d2b374
commit
8b20546c1a
16 changed files with 48 additions and 37 deletions
27
.drone.yml
27
.drone.yml
|
@ -13,7 +13,7 @@ steps:
|
||||||
- name: unit tests
|
- name: unit tests
|
||||||
shell: powershell
|
shell: powershell
|
||||||
commands:
|
commands:
|
||||||
- ./tools/ci/steps/amd64/msvc/unit-tests.ps1
|
- ./tools/ci/amd64/msvc/unit-tests.ps1
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -28,13 +28,13 @@ steps:
|
||||||
image: unit_tests:latest
|
image: unit_tests:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands:
|
||||||
- ./tools/ci/steps/amd64/gcc/unit-tests.sh
|
- ./tools/ci/amd64/gcc/unit-tests.sh
|
||||||
|
|
||||||
- name: valgrind
|
- name: valgrind
|
||||||
image: valgrind:latest
|
image: valgrind:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands:
|
||||||
- ./tools/ci/steps/amd64/gcc/valgrind.sh
|
- ./tools/ci/amd64/gcc/valgrind.sh
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -49,13 +49,13 @@ steps:
|
||||||
image: leak_sanitizer:latest
|
image: leak_sanitizer:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands:
|
||||||
- ./tools/ci/steps/amd64/clang/lsan.sh
|
- ./tools/ci/amd64/clang/lsan.sh
|
||||||
|
|
||||||
- name: memory sanitizer
|
- name: memory sanitizer
|
||||||
image: memory_sanitizer:latest
|
image: memory_sanitizer:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
commands:
|
commands:
|
||||||
- ./tools/ci/steps/amd64/clang/msan.sh
|
- ./tools/ci/amd64/clang/msan.sh
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -66,24 +66,15 @@ trigger:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: static_analysis
|
- name: clang tidy
|
||||||
image: static_analysis:latest
|
image: clang_tidy:latest
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
privileged: true
|
privileged: true
|
||||||
commands:
|
commands:
|
||||||
- ./tools/ci/steps/static_analysis.sh
|
- ./tools/ci/static_analysis/clang_tidy.sh
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: style
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
|
|
||||||
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:
|
||||||
- ./tools/ci/steps/style.sh
|
- ./tools/ci/static_analysis/clang_format.sh
|
||||||
|
|
26
tools/ci/amd64/clang/coverage.sh
Executable file
26
tools/ci/amd64/clang/coverage.sh
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
cd $(git rev-parse --show-toplevel)/
|
||||||
|
rm -rf ./build
|
||||||
|
|
||||||
|
conan build . \
|
||||||
|
-c tools.system.package_manager:mode=install \
|
||||||
|
-c tools.cmake.cmaketoolchain:generator=Ninja \
|
||||||
|
-c tools.build:cxxflags='["-fprofile-instr-generate", "-fcoverage-mapping"]' \
|
||||||
|
-c tools.build:sharedlinkflags='["-fprofile-instr-generate", "-fcoverage-mapping"]' \
|
||||||
|
-c tools.build:exelinkflags='["-fprofile-instr-generate", "-fcoverage-mapping"]' \
|
||||||
|
-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
|
||||||
|
|
|
@ -1,30 +1,24 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
IMAGE_DIR="$(git rev-parse --show-toplevel)/tools/ci/images"
|
CI_DIR="$(git rev-parse --show-toplevel)/tools/ci/"
|
||||||
|
|
||||||
echo "==> Building image: clang format"
|
echo "==> Building image: clang_format"
|
||||||
cd "$IMAGE_DIR/clang_format"
|
docker build -t clang_format -f $CI_DIR/static_analysis/clang_format.dockerfile .
|
||||||
docker build -t clang_format .
|
|
||||||
|
|
||||||
echo "==> Building image: static analysis"
|
echo "==> Building image: static_analysis"
|
||||||
cd "$IMAGE_DIR/static_analysis"
|
docker build -t clang_tidy -f $CI_DIR/static_analysis/clang_tidy.dockerfile .
|
||||||
docker build -t static_analysis .
|
|
||||||
|
|
||||||
echo "==> Building image: unit tests"
|
echo "==> Building image: amd64_gcc_unit_tests"
|
||||||
cd "$IMAGE_DIR/unit_tests"
|
docker build -t amd64_gcc_unit_tests -f $CI_DIR/amd64/gcc/unit_tests.dockerfile .
|
||||||
docker build -t unit_tests .
|
|
||||||
|
|
||||||
echo "==> Building image: valgrind"
|
echo "==> Building image: amd64_gcc_valgrind"
|
||||||
cd "$IMAGE_DIR/valgrind"
|
docker build -t amd64_gcc_valgrind -f $CI_DIR/amd64/gcc/valgrind.dockerfile .
|
||||||
docker build -t valgrind .
|
|
||||||
|
|
||||||
echo "==> Building image: leak_sanitizer"
|
echo "==> Building image: amd64_clang_lsan"
|
||||||
cd "$IMAGE_DIR/leak_sanitizer"
|
docker build -t amd64_clang_lsan -f $CI_DIR/amd64/clang/lsan.dockerfile .
|
||||||
docker build -t leak_sanitizer .
|
|
||||||
|
|
||||||
echo "==> Building image: memory_sanitizer"
|
echo "==> Building image: amd64_clang_lsan"
|
||||||
cd "$IMAGE_DIR/memory_sanitizer"
|
docker build -t amd64_clang_lsan -f $CI_DIR/amd64/clang/lsan.dockerfile .
|
||||||
docker build -t memory_sanitizer .
|
|
||||||
|
|
||||||
echo "WOOOOOOOOOOOOOOOOH!!! DONE :D"
|
echo "WOOOOOOOOOOOOOOOOH!!! DONE :D"
|
||||||
|
|
Loading…
Add table
Reference in a new issue