Skip to content
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

TriBITS CI testing with GitHub Actions (#363) #389

Conversation

marcinwrobel1986
Copy link
Collaborator

@marcinwrobel1986 marcinwrobel1986 commented Jul 15, 2021

Implements #363

This PR:

  • provides tribits testing as it was defined with .travis.yml file

  • testing with 4 different combinations:

    • gcc-9, g++-9, gfortran-9, python: "3.8"
    • gcc-10, g++-10, gfortran-10, python: "3.8"
    • gcc-9, g++-9, python: "3.8"
    • gcc-10, g++-10, python: "3.8"

    @bartlettroscoe please take a look if that's what you wanted, thanks!

Tasks:

  • Construct and pass in CTEST_BUILD_NAME that includes CMake version, generator and version (i.e. makefiles or ninja), compiler and version, no fortran (@bartlettroscoe)
  • Disable fortran in the no-fortran build (@bartlettroscoe)
  • Try to address the test failures with the non-Fortran and CMake 3.21 builds (@bartlettroscoe)
  • Create new branch '363-github-actions-tests' off this branch, create new PR off that branch, and close this PR to continue and complete the work.

@marcinwrobel1986 marcinwrobel1986 changed the title 377 provide feedback on tri bits package dependencies data structures ci 377 TriBITS CI testing with GitHub Actions Jul 15, 2021
@bartlettroscoe bartlettroscoe added this to In Progress in TriBITS Refactor via automation Jul 16, 2021
@bartlettroscoe
Copy link
Member

bartlettroscoe commented Jul 16, 2021

@marcinwrobel1986, thanks for putting this together. I can see this ran and submitted to CDash at:

Obviously the build names there are all Linux-UNKNOWN-SERIAL_DEBUG_TravisC which needs to get fixed but I will take care of of that.

As for the permutation of build jobs, switching up GCC and Fortran compiler versions does not really do as much to test TriBITS as varying other things (but it does not hurt). As stated in #363 (comment) what we really want to toggle the CMake versions, Python versions, Makefile and Ninja generators, Fortran enabled or not enabled, etc. So I think the four builds we want are:

  • CMake 3.17, Python 2.7, Makefiles generator, GCC 8
  • CMake 3.21, Python 3.x, Makefiles generator, GCC 9
  • CMake 3.17, Python 3.x, Ninja 1.10, GCC 10
  • CMake 3.17, Python 3.x,, Ninja 1.10, No Fortran, GCC 11

Is that possible to do with this setup?

@bartlettroscoe bartlettroscoe changed the title 377 TriBITS CI testing with GitHub Actions TriBITS CI testing with GitHub Actions (#363) Jul 16, 2021
Why not let the jobs run all at the same time?
We have a real GitHub Actions now.
The script now creates and cds into 'tribits-build' subdir.
…ng, improve output (TriBITSPub#363)

Hopefully this will run correctly now for all of the build from the GitHub
Actions YAML file.
We will need to install docutils if we want to test the generation of
documentation.
I suspect that some of the tests are not robust enough to work with Ninja as
the outer generator.  There are some tests that will use Ninja for the inner
configure to make sure that it works.

Making the entire TriBITS test suite pass using Ninja as the generator in
place of Makefiles would be a lot of work.  Or, we could conditionally enable
many of the tests that depend Unix Makefile logic.
Nice to set just for completeness.  Not really related to TriBITSPub#363 but I did this
while workoing on that.

I also moved -DDART_TESTING_TIMEOUT=60 up in the argument list because
-DCTEST_PARALLEL_LEVEL=16 these kind of go together.
This is one of the test cases being enabled for the GitHub Actions builds for
TriBITS in TriBITSPub#363.  Just reproducing locally and fixing.
…#363)

All of these tests fail to configure because we don't pass down the
ENABLE_Fortran configure option to the inner CMake configure and if a working
Fortran compiler does not even exist on the system, then these tests fail in
the configure of the inner project.  While I could pass down this info
somehow, a lot of these tests would fail anyway without some adjustment.

We don't need every test to run if we don't have a Fortran compiler.  We just
don't want the TriBITS test suite to have a bunch of failing tests if a user
clones the repo and tries to build and run the TriBITS test suite on a machine
with no Fortran compiler (like a Mac or a Windows machine).
…#314, TriBITSPub#363)

With CMake 3.21, with umask=g-rwx,o-rwx you need explicitly set g+rX for the
group permissions to be r-X when setting
<Project>_MAKE_INSTALL_WORLD_READABLE=ON which was doing just:

  chmod -R o+rX <dir>

Now, when you ony set <Project>_MAKE_INSTALL_WORLD_READABLE=ON, you get:

  chmod -R g+rX,o+rX <dir>

For some reason, with older verisons of CMake, it was setting the default
group permission as 'r-x' when it should not have been.  I ran exactly the
same build on the same machine (crf450) with the same env except I used CMake
3.21.0 vs. 3.17.1 and I had to make this change to get the same permissions on
the base install directory.  Strange.
For CMake 3.21 it prints a "could not find requested file" instead of "could
not find load file".  The latter was obviously a typo so it is good they fixed
it but I had this checked for in a test.  Now the test passes in both cases.
…riBITSPub#363)

Seems CMake 3.21 reports two install failures instead of just one as older
versions of CMake reported.  I guess it depends how you count.  Either way,
the number is greater than 0 so that is what matters really.
I searched the git logs and it looks like this change was pulled in the CMake
3.18.0 release.  But I only tested this with CMake 3.17.1 and 3.21.0.
…ging code (TriBITSPub#363)

With CMake 3.21, this was generating a deprecated warning.  With the rest of
TriBITS requiring CMake 3.17 it seems bad to have code that has min version
going back to 2.6.  However, this might change the behaivor of this code so
that is a warning.  (Fingers crossed.)
…ithub-actions-ci (TriBITSPub#363)

Merge in the fixes of the tests that should fix all of the nofortran failures
and three of the cmake-3.21 failures.  But we expect there to still be 10
failing cmake-3.21 failures due to changes in CMake 3.21 behavior vs. CMake
3.17 that appears to be regressions.
@bartlettroscoe
Copy link
Member

@marcinwrobel1986, I have just about got it. The only remaining failures are for changes in behavior of CMake 3.21 that I think are likely regressions in CMake 3.21 vs. CMake 3.17. I am going to create a new branch based on this branch 'marcinwrobel1986:377-provide-feedback-on-TriBITS-package-dependencies-data-structures-CI' with the new name '363-github-actions-tests' and a new PR. I will rebase and retain all of the commits (I will just rebase on top of 'master'). (The branch name '377-provide-feedback-on-TriBITS-package-dependencies-data-structures-CI' has the wrong GitHub Issue ID and is is not for the correct issue #363.)

On the new branch and PR I will:

  • Create a side branch '363-github-actions-tests-show-ctest-3.21-defects' and create a PR that demonstrates the failures with CMake 3.21 that don't occur with CMake 3.17, post SNL Kitware issue ...

  • Add install of docutils to github actions job and enable build_docs test ...

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

  • Add new triggers workflow_dispatch and schedule ...

  • Determine what branch the GitHub Action jobs was invoked on and send jobs to CDash to different CDash groups based on the event trigger: PRs and manual triggers to 'Experimental', pushes to 'master' to 'Continuous', cron jobs to 'Nightly' (see GITHUB_EVENT_NAME) ...

  • Set up TriBITS CDash site to send out emails if there are any failures reported to 'Continuous' or 'Nightly' dashboard' ...

  • Merge new PR branch ...

(I will add this task list to #363 to complete this.)

Some details notes from my latest work on this are given below.

DETAILED NOTES: (click to expand)

.

(7/19/2021)

Live testing with GitHub Actions is a pain in the rear and is very slow. Therefore, I do as much in a version-controlled script that can be tested locally as I can.

I have gotten the drivers working well and now I am just down to failing tests showing the results:

showing:

Site Build Name Conf Error Conf Warn Conf Test Time Build Error Build Warn Build Test Time Test Not Run Test Fail Test Pass Test Time Test Proc Time Start Test Time Labels
ubuntu-latest tribits_cmake-3.17.0_makefiles_python-3.8_g++-11_nofortran 0 0 4s 0 0 0s 0 32 331 2m 46s 16 hours ago
ubuntu-latest tribits_cmake-3.21.0_makefiles_python-3.8_g++-9 0 0 12s 0 0 1s 0 13 360 6m 40s 16 hours ago
ubuntu-latest tribits_cmake-3.17.0_makefiles_python-2.7_g++-8 0 0 6s 0 0 0s 0 0 373 5m 30s 16 hours ago
ubuntu-latest tribits_cmake-3.17.0_makefiles_python-3.8_g++-10 0 0 14s 0 0 1s 0 0 373 6m 20s 16 hours ago

There are 33 test errors for the build tribits_cmake-3.17.0_makefiles_python-3.8_g++-11_nofortran. Looking at some of these I am seeing configure errors in the inner configure. My guess is that many of these tests are expecting Fortran to exist and be configured even if the outer TriBITS configure does not enable Fortran. I suspect I have personally never actually run the TriBITS test suite on a machine that had a compatible Fortran compiler. Therefore, it could be some work to even figure out how to safely reproduce such a build so I can work through all of the details. (My guess is that I could create a local script 'gfortran' that is broken and then see what test fail.) ... I used a broken local 'gfortran' script to flag the problematic tests and I just disable them for a no-Fortran build for now. There is not not an easy way pass this info through to the inner configure with tribits_ctest_driver() (something that I should figure out at some point).

As for the build's tribits_cmake-3.21.0_makefiles_python-3.8_g++-9 13 failures, you can see those at:

Three of these tests failed due to changes in behavior of CMake 3.21 vs. CMake 3.17 that seem to be valid changes in behavior. I changed the TriBITS code or tests to adjust for this (and also pass with CMake 3.17). The tests I was able to address are:

  • TriBITS_CTestDriver_AAOP_CTEST_DO_INSTALL_FAIL_bad_intall_filename
  • TriBITS_TribitsHelloWorld_CONFIGURE_OPTIONS_FILE
  • TriBITS_TribitsExampleProject_ALL_ST_NoFortran_Ninja

(See the commits that impact those tests.)

(7/20/2021)

I was able to reproduce all of the test falures shown in the GitHub actions builds for the nofortran and cmake-3.21 builds. I have eliminated all of the errors for the no-Fortran builds and I have addressed changes in behavior for CMake 3.21 that appear not to be defects but just changes in behavior (and are possibily improvementments). However, there remains 10 test falures that I reproduced on my RHEL 7 machine crf450 with CMake 3.21 and I posted to CDash are shown at:

showing:

Site Build Name Test Name Status Time Details Build Time
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_PT_ALL_PASS_CALLS_2 Failed 18s 270ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_PT_ALL_PASS_CALLS_4 Failed 21s 460ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_ALL_COVERAGE Failed 20s 570ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_ALL_MEMORY Failed 21s 230ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_ALL_PASS Failed 18s 630ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakBuildAllOptionalPkg Failed 20s 160ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakBuildLibOptionalPkg Failed 17s 700ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakConfigureOptionalPkg Failed 16s 490ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakConfigureRequiredPkg Failed 15s 10ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakTestPkg Failed 19s 960ms Completed (Failed) 2021-07-20T11:11:48 EDT

These failures bread down into two sets of 5 failing tests. The first set of 5 are those that show runs of ctest -S scripts that should be passing but otherwise return 255 as the return code shown in:

showing:

Site Build Name Test Name Status Time Details Build Time
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_PT_ALL_PASS_CALLS_2 Failed 18s 270ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_PT_ALL_PASS_CALLS_4 Failed 21s 460ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_ALL_COVERAGE Failed 20s 570ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_ALL_MEMORY Failed 21s 230ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_ALL_PASS Failed 18s 630ms Completed (Failed) 2021-07-20T11:11:48 EDT

These are all cases where the ctest -S driver reports all passing and there is no hint in the output of anything failing but yet have the return code 255.

The second set of 5 failing tests are shown in:

showing:

Site Build Name Test Name Status Time Details Build Time
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakBuildAllOptionalPkg Failed 20s 160ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakBuildLibOptionalPkg Failed 17s 700ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakConfigureOptionalPkg Failed 16s 490ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakConfigureRequiredPkg Failed 15s 10ms Completed (Failed) 2021-07-20T11:11:48 EDT
crf450 Linux-TRIBITS_MPI_DEBUG_CMAKE_3.21 TriBITS_CTestDriver_PBP_ST_BreakTestPkg Failed 19s 960ms Completed (Failed) 2021-07-20T11:11:48 EDT

These are all cases that have build errors. It looks like CMake 3.21 is refusing to generate tests when there is a build error where CMake 3.17 still generated tests even when there was a build error. That is not good because we don't want to take down all of our testing just because one test executable does not build. I will need to report these errors.

@bartlettroscoe
Copy link
Member

Closing and moving remaining scope to new PR #393. Again, I did this so that I could change the branch name. (I also updated the git commit logs to reference the correct GitHub issue #363 instead of #377).

TriBITS Refactor automation moved this from In Progress to Done Jul 20, 2021
bartlettroscoe added a commit to bartlettroscoe/Trilinos that referenced this pull request Sep 4, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants