Raffaello / sdl2-vga-terminal

SDL2 VGA Terminal
MIT License
6 stars 1 forks source link

[azure-pipelines | analyzer] Integrate Code Coverage #106

Closed Raffaello closed 4 years ago

Raffaello commented 4 years ago

Scenario: Linux CI images are probably headless and no video drivers, so impossible to init SDL2 for testing. consequently:


[Optional] Try other CI tools


Raffaello commented 4 years ago

this is the snippet (BASH/UNIX-Debian) to generate and publish results in codecov

sudo apt-get install -y lcov 
#find . -name *gcda
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter system-files
lcov --list coverage.info # debug info
bash <(curl -s https://codecov.io/bash) -t [codecov token]
Raffaello commented 4 years ago

too many linking problem just to compile it and not a way to have on local env at the moment. should try once a container test for linux to run on a windows or mac vm, if that is possible than should be ok

ref: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops

Container Jobs in Azure Pipelines and TFS - Azure Pipelines
Run pipeline jobs inside of a container
Raffaello commented 4 years ago

check this one now:

https://llvm.org/docs/CommandGuide/llvm-cov.html

llvm-cov - emit coverage information — LLVM 10 documentation
Raffaello commented 4 years ago

this is the snippet (BASH/UNIX-Debian) to generate and publish results in codecov

sudo apt-get install -y lcov 
#find . -name *gcda
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter system-files
lcov --list coverage.info # debug info
bash <(curl -s https://codecov.io/bash) -f coverage.info -t [codecov token]

for clang: https://github.com/codecov/codecov-python/issues/52#issuecomment-180151746

Raffaello commented 4 years ago

https://www.jetbrains.com/help/clion/code-coverage-clion.html

Code Coverage - Help | CLion
Raffaello commented 4 years ago

try this: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html

Source-based Code Coverage — Clang 11 documentation