CDash integration with GitHub

February 28, 2016

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.

github_comment

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:

  1. Create a new GitHub user that CDash will use to post comments.
  2. Add this new user’s credentials to your CDash project.  More on this below.
  3. 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:

setup_bot

  • 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.

3 comments to CDash integration with GitHub

  1. I tried the above, and the link that gets posted in the comment on my pull request is broken. It points to [my cdash sever]/submit.php instead of [my cdash sever]/viewtest.php, though viewtest.php and the test ID appear later in the URL. There is a whole bunch of stuff between the submit.php and viewtest.php in the string.

    Any idea what I missed?

Leave a Reply