Repository navigation
[CI] Add nightly ELD code coverage workflow with regression detection - #1405
Saharsh Burra (bsaharsh) wants to merge 1 commit into
Conversation
7ab5f2f to
5cb95b0
Compare
| git config user.name 'github-actions' | ||
| git config user.email 'github-actions@github.com' | ||
|
|
||
| git checkout --orphan coverage-update |
There was a problem hiding this comment.
can we have this branch as code-coverage-reports ?
There was a problem hiding this comment.
Updated the name
| jobs: | ||
| coverage: | ||
| if: github.repository == 'qualcomm/eld' | ||
| runs-on: self-hosted |
There was a problem hiding this comment.
Shankar Easwaran (@quic-seaswara) is it okay to run this workflow on self-hosted? self-hosted here will make adding this workflow easier because we would not need to install/setup the cross-toolchains and qemu.
| repository: ${{ github.repository }} | ||
| ref: ${{ github.ref_name }} | ||
| path: llvm-project/llvm/tools/eld | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
We can likely remove fetch-depth: 0 from here.
There was a problem hiding this comment.
Updated
| ../llvm-project/llvm \ | ||
| -DCMAKE_BUILD_TYPE=Debug \ | ||
| -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \ | ||
| -DLLVM_ENABLE_PROJECTS="llvm;clang;clang-tools-extra" \ |
There was a problem hiding this comment.
Would it be possible to use the clang and the other tools from the nightly eld toolchain and only build eld with code-coverage enabled?
There was a problem hiding this comment.
Updated, but need to test it as fork won't be having the self hosted, may be we can use the workflow dispatch.
5cb95b0 to
0149db3
Compare
531af9e to
60cec40
Compare
aa5537f to
eb451ab
Compare
eb451ab to
10b8ddc
Compare
49d7a22 to
4cd34c6
Compare
4cd34c6 to
8fcbdc7
Compare
85f166b to
445434e
Compare
f7bb343 to
7e09cbc
Compare
7e09cbc to
15b56b4
Compare
Add nightly-eld-code-coverage.yml which runs daily after the nightly build. The workflow: - Builds LLVM+ELD with source-based coverage instrumentation (ELD_COVERAGE=ON) - Runs check-eld under LLVM_PROFILE_FILE to collect per-process .profraw files - Merges profiles and generates an HTML report with llvm-profdata / llvm-cov - Compares Line/Function/Region/Branch coverage against a baseline stored on the code-coverage-reports branch and fails if any metric regresses - Records the baseline on the first run when none exists - Publishes the HTML report and updated baseline to the code-coverage-reports branch Also updates CMakeLists.txt: ELD_COVERAGE now sets the llvm-cov source-based instrumentation flags (-fprofile-instr-generate -fcoverage-mapping). Signed-off-by: bsaharsh <bsaharsh@qti.qualcomm.com>
15b56b4 to
96e0a2c
Compare
Added a workflow which runs nightly and computes the code coverage, and when ran at first creates a baseline text file on orphan branch called code-coverage, and from the next time, it checks with the previous coverage numbers and if any metric goes down, it fails, and if no regression is detected then we push the html report and update the baseline text file.