-
Notifications
You must be signed in to change notification settings - Fork 45
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
Improve GitHub Actions and CDash integration (#154) #401
Improve GitHub Actions and CDash integration (#154) #401
Conversation
46eccca
to
16611c5
Compare
TriBITSPub#278) This was created by commit: 49d9c81 "tribits_ctest_driver(): Use more robust and better git commands and stronger testing (TriBITSPub#278, TRIL-260)" Author: Roscoe A. Bartlett <[email protected]> Date: Thu Feb 14 13:42:11 2019 -0700 A test/ctest_driver/TribitsExampleMetaProject/CMakeLists.txt
This were fixes from the previous comment: 49d9c81 "tribits_ctest_driver(): Use more robust and better git commands and stronger testing (TriBITSPub#278, TRIL-260)" Author: Roscoe A. Bartlett <[email protected]> Date: Thu Feb 14 13:42:11 2019 -0700
Can turn this on for things like GitHub Actions and other processes that take care of the repo versioning. This allows you to call ctest_update() and provide a link back to the commit on GitHub but not have ctest do any update action. This also removes the CTEST_UPDATE_COMMANDS_OUTPUT_FILE file before it gets created again to avoid printing an old file when CTEST_UPDATE_VERSION_ONLY=ON (a very rare case but still confusing). Added documentation for CTEST_UPDATE_VERSION_ONLY=ON. Added test for CTEST_UPDATE_VERSION_ONLY=ON. NOTE: I was not able to add a strong test to show that the Update.txt and the ctest_update() commands file are not written. That would be a harder thing to check for in the output.
It is not really possible to add a test for this. It is just a var you set and then CTest adds that to an XML file and that gets uploaded to CDash. There really is nothing to test locally. I just added reading in from env and documentation (with more detail that what is provided by offical CDash documentation).
Version of CMake 3.17 (and likely earlier) added the model in addition to group to the TAG file.
…riBITSPub#154) Need this for calling tribits_get_cdash_build_url_from_tag_file() from tribits_ctest_driver().
16611c5
to
60bf144
Compare
The final version of this is shown at: which shows: There we see the icon which links back to this PR. This shows setting the Note the "Revision" column showing the SHA1
What is interesting about this local merge commit 9fb34dd (that merges the tip of this PR topic branch at 60bf144 into the tip of master at 9c210c5) is that GitHub actually provides a link for this (as you can see by the hyperlink). (NOTE: The shortened SHA1 9fb34d is not long enough for GitHub to show the link. This shows that CTest or CDash is not checking with git to see how many chars of the SHA1 is needed for the repo, so you have to click on the link to get it the full SHA1.) From the CDash page clicked from 9fb34d to: if you click on which is the full set of commits against 'master'. But note that CTest or CDash does not do this for every CDash build (it seems to show the new commits from the previous matching build which in this case showed them all because this was a full rebase on top of 'master'). The matching GithHub Actions jobs for this last set of PR builds is at: You can see the links to the individual builds on CDash, for example which under "URL to results on CDash" provides the hyperlink: which shows: And one can see all of the builds for this PR at: which shows: What this demonstrates is:
I guess what is still missing is the ability to link from a CDash build back to the specific GitHub Action Job that ran it. For example, it might be possible to provide a URL link in a build note file back to the GitHub Action job like from the build https://testing.sandia.gov/cdash/index.php?project=TriBITS&parentid=9707974 back to https://github.com/TriBITSPub/TriBITS/runs/3293339241. That is the only link that I see that is missing in this setup that would be useful to have. But one can see all of the GitHub Actions runs for a given PR by running the query like: showing 8 GitHub Actions iterations showing: and then one can compare that to the builds on CDash at: (with output shown above showing 32 builds) and it is not too hard to match those up. But if we wanted to provide links from CDash builds to the exact GitHub Actions job that run it, it seems that info might be provided by one of the env vars listed at: That might be future work to cap that off if I decide to write a report on this or something. (Being able to link from CDash to the exact job that ran it is missing on most systems that I have seen.) |
With this review I think this is done and ready to merge (finally). |
Note, however, when there is an error in a PR build, the GitHub Actions job never executes the "URL to results on CDash" step and therefore the link to result on CDash is shown at the bottom in the "Run configure, build, test and submit to CDash" step as shown below. NOTE: The above PR iteration was before I added |
FYI, you can see an example of the hyperlink when a build fails at: showing: |
Brings in numerous refactorings to TriBITS over the last 3 months, but there should be no breaks in backward compatibility. Almost every file in TriBITS is changed due to the lower-casing of command, macro and function names in PR TriBITSPub/TriBITS#379. But the main driver for this snapshot is to bring in the change in PR TriBITSPub/TriBITS#413 that should make it so that Kokkos INTERFACE_COMPILE_OPTIONS get propagated to downstream targets in TriBITS and therefore to external customers through installed <Package>Config.cmake files and IMPORTED targets. I should have done several snapshots in the last few months and not done a big snapshot like this (but I have been testing with Trilinos locally along the way). Overall, this merge brings in changes from a bunch of TriBITS PRs including (from most recent): * TriBITSPub/TriBITS#413: Change internal TriBITS target_link_libraries() to PUBLIC (TriBITSPub/TriBITS#299) component: core type: enhancement * TriBITSPub/TriBITS#410: Upgrade from cmake 3.21.0 to 3.21.2 (TriBITSPub/TriBITS#363, TriBITSPub/TriBITS#394) * TriBITSPub/TriBITS#394: DO NOT MERGE: Show TriBITS test failures with CMake 3.21.0 that don't occur with CMake 3.17.5 (TriBITSPub/TriBITS#363) * TriBITSPub/TriBITS#409: Add getTestDictStatusField() to handle empty 'status' field (SESW-383) component: ci_support type: enhancement * TriBITSPub/TriBITS#408: Deal with spaces in CDash url parts (SESW-383) component: ci_support type: enhancement * TriBITSPub/TriBITS#403: Spelling fixes * TriBITSPub/TriBITS#407: Move tribits_get_build_url_and_write_to_file() to stand-alone module (TriBITSPub/TriBITS#154) component: ctest_driver type: enhancement * TriBITSPub/TriBITS#388: Fixing typos (TriBITSPub/TriBITS#377) * TriBITSPub/TriBITS#406: Fix tribits_ctest_driver() package-by-package mode for CMake 3.19+ (TriBITSPub/TriBITS#363, TriBITSPub/TriBITS#394) component: ctest_driver type: bug * TriBITSPub/TriBITS#401: Improve GitHub Actions and CDash integration (TriBITSPub/TriBITS#154) type: enhancement * TriBITSPub/TriBITS#366: CI: draft action yaml * TriBITSPub/TriBITS#402: Revert some incorrect uppercase->lowercase changes * TriBITSPub/TriBITS#387: Build and deploy TriBITS documentation with Sphinx (TriBITSPub/TriBITS#386) component: documentation type: enhancement * TriBITSPub/TriBITS#398: Deal with pr null in not preprending build name (TriBITSPub/TriBITS#363) type: bug * TriBITSPub/TriBITS#396: Send PR results to 'Pull Request' CDash group and add PR ID to build names (TriBITSPub/TriBITS#363) type: enhancement * TriBITSPub/TriBITS#397: Print the ninja path and version (TriBITSPub/TriBITS#363) * TriBITSPub/TriBITS#393: GitHub Actions based testing for TriBITS (TriBITSPub/TriBITS#363) type: enhancement * TriBITSPub/TriBITS#389: TriBITS CI testing with GitHub Actions (TriBITSPub/TriBITS#363) type: enhancement * TriBITSPub/TriBITS#392: Fix broken tests for non-Fortran and CMake 3.21 builds (TriBITSPub/TriBITS#363) component: core * TriBITSPub/TriBITS#391: Fix up build_docs.sh for Sphinx doc generation (TriBITSPub/TriBITS#386) component: documentation type: enhancement * TriBITSPub/TriBITS#390: Add test for doc generation and fix usage of Python3 component: documentation type: bug * TriBITSPub/TriBITS#385: Replace last few references to TribitsDevelopersGuide.html (TriBITSPub/TriBITS#381) component: documentation type: enhancement * TriBITSPub/TriBITS#384: Split TribitsDevelopersGuide.* into TribitsUsersGuide.* and TribitsMaintainersGuide.* (TriBITSPub/TriBITS#381) component: documentation type: enhancement * TriBITSPub/TriBITS#383: Remove endfunction(<string>) and endmacro(<string>) (TriBITSPub/TriBITS#274, TriBITSPub/TriBITS#382) component: common_tpls type: bug * TriBITSPub/TriBITS#380: More package-arch data-structure documentation updates (TriBITSPub/TriBITS#63) component: documentation type: enhancement * TriBITSPub/TriBITS#379: Convert TriBITS to lower-case CMake command, macro, and function names (TriBITSPub/TriBITS#274) The following files were conflicting where I went with what is on the Trilinos 'develop' branch: * cmake/tribits/common_tpls/FindTPLBLAS.cmake * cmake/tribits/common_tpls/FindTPLLAPACK.cmake * cmake/tribits/common_tpls/FindTPLNetcdf.cmake (It looks like the above changes never made it back into TriBITS proper. The conflicts were due to the case changes in cmake command calls in these files due to TriBITSPub/TriBITS#379.) There was also a conflict in the file: * cmake/tribits/core/installation/TribitsProjectConfigTemplate.cmake.in I looked at that one carefully and I think that may have been due to fixes on both sides and then the case changes from TriBITSPub/TriBITS#379.
See #154 and commits.