CDash integration with GitHub
This post describes functionality introduced in CDash v2.4. For improved CDash/GitHub integration introduced in v2.6, see here.
CDash can now comment on your GitHub pull request, linking you directly to anything that went wrong.
Once you’ve enabled this feature, CDash will post a comment on your PR with a link to the first build error, configure error, or test failure that occurred.
Here’s how to set this up:
- Create a new GitHub user that CDash will use to post comments.
- Add this new user’s credentials to your CDash project. More on this below.
- In your CTest driver script, set CTEST_CHANGE_ID to the number of the pull request that you are currently testing.
To teach CDash about your new GitHub bot, begin by logging in as a user with administrative rights to the project in question. Next, navigate to the Project Settings page.
On the Repository tab, fill out the form like so:
- Repository Viewer URL: The URL of your GitHub project.
- Repository Viewer Type: set to GitHub.
- Repository: This should be the same value as Repository Viewer URL.
- Branch: Not used by this feature, but input ‘master’ just to be safe.
- Username: The name of the GitHub bot you created.
- Password: Your GitHub bot’s password.
Don’t forget to click Update Project when done.