-
Notifications
You must be signed in to change notification settings - Fork 285
[CI] Port CMake Codecov job from Codebuild to Github Actions. #5809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -385,3 +385,34 @@ jobs: | |
| docker run -v ${PWD}/.github/workflows/smoke_test_assets:/mnt/smoke -t cbmc jbmc --classpath /mnt/smoke Test | ||
| - name: Smoke test goto-analyzer | ||
| run: docker run -v ${PWD}/.github/workflows/smoke_test_assets:/mnt/smoke -t cbmc goto-analyzer /mnt/smoke/test.goto --unreachable-functions | ||
|
|
||
| codecov-coverage-report: | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - name: Clone repository | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| - name: Download testing and coverage dependencies | ||
| env: | ||
| # This is needed in addition to -yq to prevent apt-get from asking for | ||
| # user input | ||
| DEBIAN_FRONTEND: noninteractive | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install --no-install-recommends -y g++ gcc binutils flex bison cmake maven jq libxml2-utils openjdk-11-jdk-headless lcov | ||
| - name: Configure CMake CBMC build with coverage instrumentation parameters | ||
| run: cmake -S . -Bbuild -Denable_coverage=1 -Dparallel_tests=2 -DCMAKE_CXX_COMPILER=/usr/bin/g++ | ||
| - name: Execute CMake CBMC build | ||
| run: cmake --build build --target coverage -- -j2 | ||
| - name: Collect coverage statistics | ||
| run: | | ||
| lcov --capture --directory build --output-file lcov.info | ||
| lcov --remove lcov.info '/usr/*' --output-file lcov.info | ||
| - name: Upload coverage statistics to Codecov | ||
| uses: codecov/codecov-action@v1 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| files: ./lcov.info | ||
| fail_ci_if_error: true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Last concern here: Is this a required status check? I don't think it should be, given how codecov has been a bit flaky in the past. IMHO codecov checks should be advisory.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've marked it However, it's not marked as a required check in Github, and as a result, a possible failure of this job doesn't block the merging of a PR. |
||
| verbose: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,6 +149,8 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR | |
| "$<TARGET_FILE:jbmc>" | ||
| "$<TARGET_FILE:jdiff>" | ||
| "$<TARGET_FILE:smt2_solver>" | ||
| "$<TARGET_FILE:symtab2gb>" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW all this "$<TARGET_FILE:` stuff in here isn't invalid per se, but it also doesn't help. Just listing the target names here would work just as well and look less confusing.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hannes-steffenhagen-diffblue Would it be worth doing a cleanup across the code base? Would you mind driving this as my CMake expertise is, well, not really existent? |
||
| "libour_archive.a" | ||
| WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
| ) | ||
| endif() | ||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything else that could be removed from trace file (e.g. miniSAT/or other SAT solver files)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I'm not sure to be honest, and I'd rather not play around with the contents of the files for now, as this is supposed to be just a port with functionality parity.
Attempting any changes like this would cause us to need extra time to validate/test those changes. I am happy however to add them on a todo list for later inspection/implementation. Does that work for you, @piotr-grabalski ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is OK for me.
I've been wondering if the report could be more accurate and display the test coverage of the code that is a part of CBMC rather than some third-party stuff that we are not involved in. I don't know how much of external code is going into the statistics so, as you said, more investigation will be required.