ci(amd64/clang/coverage): replace conan commands with cmake
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
f0f8836042
commit
0700ab282a
1 changed files with 14 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
|||
set -e
|
||||
cd $(git rev-parse --show-toplevel)/
|
||||
rm -rf ./build
|
||||
mkdir -p ./build/coverage/ && cd build
|
||||
mkdir build/ && cd build
|
||||
|
||||
Xvfb :99 -screen 0 1024x768x16 &
|
||||
export DISPLAY=:99
|
||||
|
@ -15,27 +15,27 @@ cmake .. \
|
|||
-DCMAKE_LINKER_TYPE=MOLD \
|
||||
-DENABLE_UNIT_TESTS=ON \
|
||||
-DENABLE_LLVM_COVERAGE=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
&& cmake --build . -j`nproc`
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_FLAGS="-std=c++23 -stdlib=libc++ -g -fno-omit-frame-pointer" \
|
||||
&& cmake --build . -j `nproc`
|
||||
|
||||
for test in $(find ./build -type f -name '*_tests' -executable); do
|
||||
export LLVM_PROFILE_FILE="./build/coverage/$(basename "$(dirname "$test")").profraw";
|
||||
echo ${LLVM_PROFILE_FILE} >> ./build/coverage/list;
|
||||
mkdir -p ./coverage/
|
||||
for test in $(find ./ -type f -name '*_tests' -executable); do
|
||||
export LLVM_PROFILE_FILE="./coverage/$(basename "$(dirname "$test")").profraw";
|
||||
echo ${LLVM_PROFILE_FILE} >> ./coverage/list;
|
||||
"$test"
|
||||
done
|
||||
|
||||
llvm-profdata merge --input-files './build/coverage/list' -o "./build/coverage/merged.profdata"
|
||||
llvm-profdata merge --input-files './coverage/list' -o "./coverage/merged.profdata"
|
||||
find ./modules -type f -name "*.profraw" -exec rm -fv {} +
|
||||
|
||||
# fix for imgui code is temporary
|
||||
# we will remove imgui as dependency in future versions
|
||||
LLVM_COV_SHOW=$(llvm-cov show \
|
||||
-instr-profile='./build/coverage/merged.profdata' \
|
||||
$(find ./build -type f -name '*_tests' -executable -exec printf -- '-object %s ' {} \;) \
|
||||
$(find ./build -type f -name '*\.a' -exec printf -- '-object %s ' {} \;) \
|
||||
-instr-profile='./coverage/merged.profdata' \
|
||||
$(find ./ -type f -name '*_tests' -executable -exec printf -- '-object %s ' {} \;) \
|
||||
$(find ./ -type f -name '*\.a' -exec printf -- '-object %s ' {} \;) \
|
||||
-ignore-filename-regex='\.test\.cpp$' \
|
||||
-ignore-filename-regex='./external/' \
|
||||
-ignore-filename-regex='\.fuzz\.cpp$'
|
||||
)
|
||||
|
||||
echo "${LLVM_COV_SHOW}" > './build/coverage/coverage.txt'
|
||||
echo "${LLVM_COV_SHOW}" > './coverage/coverage.txt'
|
||||
wget -qO- "https://codecov.io/bash" | bash
|
||||
|
|
Loading…
Add table
Reference in a new issue