-
Notifications
You must be signed in to change notification settings - Fork 11
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
Measure code coverage in CI #98
Comments
Related to EinsteinToolkit/tests#41 |
You could consider Codecov, which is free for public repos. It has hooks for GitHub Actions, and I use it for GRHayL. I have a code-coverage action which runs gcovr and then calls the codecov action to submit and compile all the different CI reports into a single report. |
We will also need a set of configure options to tell the compiler to emit code that measures the coverage. |
I also have those set up in my compilation action for GRHayL (not the toolkit). I just add the cflags "-ftest-coverage -fprofile-arcs". These flags exist for gcc, clang, and Intel. I will note that I have only had success getting this to work for the gcc compiler. The clang compiler needs to somehow use the llvm-cov, but I haven't spent the time to figure this out. This can be seen in my code coverage action. I have the llvm-cov running, but either the coverage files aren't being properly generated or the gcovr command is incorrect when used with llvm-cov. I don't know how to do it for the Intel compiler, so if someone figures that out or the clang issue please let me know. I'm also currently only collecting data from the Ubuntu tests, so I don't know if MacOS has additional hoops to jump through. |
No description provided.
The text was updated successfully, but these errors were encountered: