Skip to content

CI/CD Use Cases/Considerations #105

@ryanmrichard

Description

@ryanmrichard

Managing the CI for NWChemEx is a tall order. To afford the maintainers the largest amount of creativity possible I propose we put together a list of use cases/considerations. Any solution which addresses these use cases is fine.

Architecture

  • Spans several GitHub orgs
    • CI/CD may need to trigger/monitor these organizations
  • Many repos (all on GitHub)
    • CI/CD may need to trigger/monitor these repos
  • Many dependencies
    • Most can be built by CMaize, but not all of them
    • Have dependency diamonds (two projects, A and B, depend on the same dependency, C, then another project D, depends on both A and B)
    • Want to pin/follow specific versions.
  • Code is mix of C++/Python
    • C++17 assumed (and used)
    • Python 3 (not sure about minor we are targeting)
    • Dependencies vary from repo to repo, but there is a set common to many repos
  • Documentation is mix of Sphinx-based reST, markdown, and Doxygen
    • Sphinx supports plugins and the plugins needed by each repo may vary
    • N.B. Sphinx plugins are installed via pip
  • Build system is CMake based
    • Usually on bleeding edge, but should also maintain some minimum version support
    • Using Ninja under CMake is recommended, but realize make files are the default (i.e. we may want to test as well)
  • GitHub actions/workflow is GitHub's native solution
    • Should be preferred as much as possible
    • Dropping down to bash scripts can happen, but realize GitHub can't see contents
    • Large selection of actions available on GitHub, try to avoid writing our own

PR CI (think merging into a dev branch):

  • Test multiple operating systems
    • Prioritize Linux and Mac, but Windows would be great...
  • Test multiple versions of languages
  • Test multiple compilers
  • Test multiple versions of dependencies
    • Dependencies we build may couple differently based on compilers
  • Test debug and release builds
    • In practice bugs can exist in one vs. the other
  • Test optional configurations
    • List of optional configuration varies from repo to repo
  • Check files are licensed
  • Check files are formatted correctly
  • Check code compiles warning free
  • Check code for coverage
  • Ensure author's have signed contributor agreement
  • Ideally should build in less than 5 minutes
    • Will rely on parallelization of workflows, containers, and cacheing
  • Test documentation builds
    • Should also build warning free
  • Test unit tests pass
  • Subsequent runs of failed CI
  • Tests should integrate with branch protection rules to avoid accidental merges
  • Special workflows for doc only changes?
  • PRs may be dependent (changes needed in multiple repos)

Release Deployment (think merging dev to master):

  • Longer acceptance tests happen here
  • Ensure release builds do not break downstream stake-holders
  • Releases should be tagged according to semantic versioning
  • Releases should trigger deploying documentation
  • Provide containers of releases
    • Likely only a few build types
    • Ideally small size (no extras)
    • Should be built in release mode and as performant as possible
      • Dependencies may need different configurations
      • Configuration will need different options
  • Ideally release packages too (Conan, Spack, PyPI, Linux...)
    • Release of packages should be triggered by new releases of source
  • A failed dev to master pipeline should revert dev and reopen the original PR with the new issues
    • Fixing a failed dev branch requires a new PR to dev workflow
  • May need to do performance testing outside the GitHub ecosystem
  • Need to extract module/property type documentation from code developed with PluginPlay
  • PRs may be dependent (changes needed in multiple repos)

CI Maintenance

  • .github for CI infrastructure which can be factored out
  • individual repos for CI specific to repo
  • Want to decouple .github maintenance from maintenance of individual repos
    • Adding a decadency to a single repo shouldn't involve .github
    • May need extra workflows for some repos
  • The .github repo couples many orgs together
    • Need a way to ensure .github changes don't break everything
  • Developer docs so people can go in and work on CI
    • Explanation of overall solution
    • How tos
      • Add a new dependency globally (in .github) vs locally
      • Add new PR checks
      • Add new dev to master checks
  • Auto assign PR reviewers (GitHub has a concept of code ownership)
  • Notify reviewers when PRs are r2g (maybe a button or a label authors can click/add?)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions