-
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
Set up TriBITS testing using GitHub Actions #363
Comments
As part of the IDEAS-ECP project, I have been looking into GHA so it seems like a good time to try setting up TriBITS testing (and posting to CDash) using GHA. Some good starting references I was pointed to were:
Those link to other pages with lots more information. Some info on doing C++ testing with CMake can be found at: That shows how to test with CMake + Ninja and does so on Linux and Windows! This will take some time to adapt, but it should do it hopefully. |
@keita, @fnrizzi, @marcinwrobel1986, @MikolajZuzek, Any of you guys have GitHub Actions experience that you could use to help set up automated testing on GitHub for TriBITS to help drive the TriBITS refactoring work? |
@bartlettroscoe |
@fnrizzi, it turns out that TriBITS testing is basically C++ and Python testing. If you can test C++ and Python where CMake is building the C++ code, that is all that is needed for building and running the native TriBITS test suite. I could use some help getting a starting GHA workflow in place with a few different jobs as described above. I have learned some about GHA in the last month from working on the backend workflow for https://bssw.io and the bssw.io GitHub project.
Yes, let's coordinate this offline. |
@bartlettroscoe if you want, over the next few days I can try to setup a minimal GA workflow file that builds and runs the TriBITS tests to get started with. It would be minimal, but at least something to start from. It should be relatively easy to do since you said testing works like testing in C++. Would that be useful for you? And we can coordinate offline with Keita how to move forward. |
@fnrizzi, that would be great! If the env has C, C++, Fortran, MPI, CMake 3.17, and Python 2.7+, then it should be as easy as:
If you can get that to configure, build, and run the tests, then I can take it from there and get this to submit to CDash and put in a nice link. I guess you need to develop and test this GA workflow file in your fork of TriBITS (on the 'master' branch)? That seems the only way to test and experiment with GA workflows before going into production. |
@bartlettroscoe ok, will try to have this ready by Monday or so, and will ping you then! |
@bartlettroscoe Some tests fail though: I can change the action to run |
@fnrizzi, very nice! I will take this and and see if can't match the cases listed above. (I think there is 4 build cases to start out with.)
I will set it up to post to CDash so we will be able to see the details very well there (and then I can fix any test failures). I have a few questions ... It would be nice to have a single job first run for the configuration:
and if that passes, then run a set of other configurations like:
That would reduce a lot of wasted computer cycles in case that single build did not work. Does GitHub Actions support that? I see this is running with |
@bartlettroscoe Thanks! Do you want me to open a pull request or you just grab the yaml file?
It is possible to do so, see
Not sure! I actually read once that it is a reasonable assumption, and has always worked fine for me, but I can dig more to see if that really works or if there is a way to automate detecting the parallelism level (I think that is possible to do in Azure for instance) |
@fnrizzi, can you go ahead and clean up your git commits and post a PR? That way you will get credit for this in git. |
@bartlettroscoe thanks! |
The OS name is in the site name.
…well (#363) This should help show when CMake introduced the changes that broke these TriBITS tests.
Where there is not an active PR, the 'pull_number' comes back 'null'. In this case, we don't want to append the build name.
Deal with pr null in not preprending build name (#363)
I just had to fix a minor defect in tribits/doc/build_ref/create-build-ref.sh and now this works fine with building the Sphinx documentation.
There is no need to cd into that directory anymore. It knows where it is and how to build the docs in-source.
I just had to fix a minor defect in tribits/doc/build_ref/create-build-ref.sh and now this works fine with building the Sphinx documentation.
There is no need to cd into that directory anymore. It knows where it is and how to build the docs in-source.
…re failures (#363) This is to make it so that it is easy for Kitware to reproduce the CMake 3.21.0 issues. This commit should only exist on this side branch '363-github-actions-tests-show-ctest-3.21-failures' in a temp PR for testing purposes. I also commented out the disables of the tests that show the CMake 3.21 failures.
…well (#363) This should help show when CMake introduced the changes that broke these TriBITS tests.
….19+ (TriBITSPub#363, TriBITSPub#394) I also added another test case for when libs are broken in required upstream package. See the detailed comments, especially in the file TribitsCTestDriverCoreHelpers.cmake.
…for CMake 3.21 (TriBITSPub#363, TriBITSPub#394) Now that TriBITS has a workaround for new CMake 3.19 behavior, this test passes. The rest of the tests can be enabled once CMake 3.21.2 is released and the GitHub Actions workflow is updated to use that version (see TriBITSPub#394).
…tests-show-ctest-3.21-failures (#363, #394) I resolved conflicts in the following files: * cmake/ctest/github_actions/tribits_cmake-3.21.0_makefiles_python-3.8_g++-9_tweaks.cmake: * Removed the commented out fixed test * test/ctest_driver/TribitsExampleProject/CMakeLists.txt: * Took what is on 'master' * tribits/core/package_arch/TribitsGlobalMacros.cmake: * Took what is on 'master'
Also remove all of the test disables as cmake 3.21.2 has a patch that fixes all of the test failures.
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.
CC: @keita, @fnrizzi, @marcinwrobel1986, @MikolajZuzek
With a lot of work on TriBITS going on and coming up (i.e. #63, #299, etc.) we need solid testing for TriBITS. I have solid testing of TriBITS on local machines set up using the checkin-test.py script (see checkin-test-crf450.sh and those it calls) but we really need to have this for PR testing as well. In the past, I did that with Travis CI. But for reasons that I can't go into here, Travis CI is not a viable option going forward.
The obvious choice for this would seem to be to use GitHub Actions (GHA) for this. But I don't know anything about GHA so this will be a learning curve.
For dependencies I need:
Other dependencies that would be nice to have:
And this would post to CDash at:
At a minimum, there needs to be a build with:
Other builds that would be nice to have include:
Tasks:
tribits_cmake-3.21.0_makefiles_python-3.8_g++-9_tweaks.cmake
disables for cmake-3.21.0 GHA build to disable tests that fail with CMake 3.20.workflow_dispatch
andschedule
.workflow_dispatch
trigger works and submits to theExperimental
CDash group.schedule
trigger works and submits to the 'Nightly' CDash group.pr-null_
in build name of push testing to master ... PR Deal with pr null in not preprending build name (#363) #398The text was updated successfully, but these errors were encountered: