Skip to content

Conversation

@jwaldrop107
Copy link
Member

Is this pull request associated with an issue(s)?
No

Description
This PR updates the way we're approaching common workflows for the organizations. Currently, the common workflows aggregate all of the jobs expected to be performed when a specific event is triggered (e.g. pull requests). This method makes reusing specific steps in those workflows (e.g. testing the library with non-default configurations) awkward because it may require calling a workflow while skipping most of the jobs in that workflow. An example in TensorWrapper would be testing the library with the optional dependency Sigma

jobs:
  Common-Pull-Request:
    uses: NWChemEx/.github/.github/workflows/common_pull_request.yaml@master
    with:
      config_file: '.github/.licenserc.yaml'
      source_dir: 'include src tests'
      compilers: '["gcc-11", "clang-14"]'
      doc_target: 'tensorwrapper_cxx_api'
    secrets: inherit
  Test-Enable-Sigma:
    uses: NWChemEx/.github/.github/workflows/common_pull_request.yaml@master
    with:
      config_file: ''
      source_dir: ''
      format_python: false
      compilers: '["gcc-11", "clang-14"]'
      repo_toolchain: ".github/enable_sigma.cmake"
      doc_target: ''
    secrets: inherit

where the Common-Pull-Request job performs all of the steps in the reusable workflow and Test-Enable-Sigma skips all steps except the testing.

The changes here break up the common workflows into more granular ones that can be better reused and composed into the repo workflows. The common_pull_request.yaml, for instance, is broken up into the check_formatting.yaml, test_nwx_docs.yaml, and test_nwx_library.yaml. Using these new workflows, the above example becomes

jobs:
  check_formatting:
    uses: NWChemEx/.github/.github/workflows/check_formatting.yaml@master
    with:
      license_config: ".github/.licenserc.yaml"

  test_nwx_docs:
    uses: NWChemEx/.github/.github/workflows/test_nwx_docs.yaml@master
    with:
      doc_target: "tensorwrapper_cxx_api"

  test_library:
    uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master
    with:
      compilers: '["gcc-11", "clang-14"]'

  test_library_with_sigma:
    uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master
    with:
      compilers: '["gcc-11", "clang-14"]'
      repo_toolchain: ".github/enable_sigma.cmake"

which is more explicit and doesn't have jobs that are being skipped.

Documentation updates and incidental changes also included.

@jwaldrop107 jwaldrop107 self-assigned this Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants