Skip to content

Containerize CAM-SIMA unit tests and clean up CI infrastructure#511

Open
kuanchihwang wants to merge 14 commits into
ESCOMP:developmentfrom
kuanchihwang:staging/containerize-cam-sima-ftn-ci
Open

Containerize CAM-SIMA unit tests and clean up CI infrastructure#511
kuanchihwang wants to merge 14 commits into
ESCOMP:developmentfrom
kuanchihwang:staging/containerize-cam-sima-ftn-ci

Conversation

@kuanchihwang

Copy link
Copy Markdown
Collaborator

Tag name

None (Bit for bit)

Originator(s)

kuanchihwang

Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number)

This PR containerizes the CAM-SIMA unit tests with an expanded compiler matrix (GNU 11-15, Intel oneAPI 2024, and 2025). The bootstrap overhead of compiling pFUnit, ParallelIO, and installing various other dependencies has been eliminated, resulting in faster and more consistent CI time.

In addition, this PR brings general maintenance for the CAM-SIMA CI infrastructure, including:

  • Remove stale and unused test infrastructure to reduce clutter.
  • Migrate lightweight CI jobs to run on the ubuntu-slim runner to improve CI startup time.
  • Update GitHub actions to the latest versions to resolve the Node.js 20 deprecation.
  • Run Fortran unit tests only when there are actual Fortran source code changes.
  • Remove hard-coded include paths in various CMakeLists.txt.

Describe any changes made to the build system

None

Describe any changes made to the namelist

None

List any changes to the defaults for the input datasets (e.g., initial, boundary datasets)

None

List all files eliminated and why

D       .github/workflows/fortran_unit_tests.yml
  * Rename CI workflow for better organization and future expansion

D       test/CMakeLists.txt
D       test/cmake/SetDefaults.cmake
D       test/cmake/TestUtils.cmake
D       test/docker/Dockerfile
D       test/unit/CMakeLists.txt
D       test/unit/physics/CMakeLists.txt
D       test/unit/physics/utils/CMakeLists.txt
D       test/unit/physics/utils/test_orbital_data.F90
D       test/unit/physics/utils/test_orbital_data_stubs.F90
D       test/valgrind.supp
  * Clean up stale and unused test infrastructure

List all files added and what they do

A       .github/workflows/cam_sima_fortran_ci.yml
  * Rename CI workflow for better organization and future expansion
  * Standardize workflow-level CI configuration between CAM-SIMA and MPAS dycore
  * Standardize job-level CI configuration between CAM-SIMA and MPAS dycore
  * Containerize CAM-SIMA unit tests
  * Add conditional check to CAM-SIMA Fortran CI for future expansion

List all existing files that have been modified, and describe the changes

M       .github/workflows/branch_push_workflow.yml
M       .github/workflows/build_and_run_cirrus.yml
M       .github/workflows/fleximod_test.yaml
M       .github/workflows/python_unit_tests.yml
M       .github/workflows/source_code_lint.yml
  * Migrate lightweight CI jobs to run on `ubuntu-slim`
  * Update GitHub actions to latest versions

M       .github/workflows/mpas_dynamical_core_ci.yml
  * Break long commands into separate lines for better readability
  * Rearrange YAML keys for better readability
  * Update container image version

M       src/core_utils/CMakeLists.txt
M       src/physics/utils/CMakeLists.txt
M       test/unit/fortran/CMakeLists.txt
M       test/unit/fortran/ccpp_framework_stub/CMakeLists.txt
M       test/unit/fortran/ccpp_framework_stub/ccpp_kinds.F90
M       test/unit/fortran/mock_routines/CMakeLists.txt
M       test/unit/fortran/src/pio_reader/CMakeLists.txt
  * Remove hard-coded include paths from unit test build infrastructure

M       test/unit/fortran/src/core_utils/test_string_core_utils.pf
M       test/unit/fortran/src/pio_reader/test_pio_reader.pf
  * Work around Intel compiler issue

Regression tests

  • derecho/aux_sima_gnu
SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam (Overall: FAIL) details:
  FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam RUN time=10

Known failing test.

  • derecho/aux_sima_intel
SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: NLFAIL) details:
  FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape NLCOMP

Known failing test.

  • derecho/aux_sima_nvhpc

Pass.

@kuanchihwang kuanchihwang temporarily deployed to CI-tests-on-CIRRUS June 17, 2026 18:39 — with GitHub Actions Inactive
@kuanchihwang kuanchihwang marked this pull request as ready for review June 18, 2026 03:34
@kuanchihwang kuanchihwang requested a review from nusbaume June 18, 2026 03:34
@kuanchihwang

Copy link
Copy Markdown
Collaborator Author

@nusbaume

Merging this PR will require the following checks to be removed from the branch ruleset:

  • Build and run with GCC 12
  • Build and run with GCC 13
  • Build and run with GCC 14
  • Overall status

After merging, we can then add back the following new checks to the branch ruleset:

  • Overall status (CAM-SIMA Fortran CI)
  • Overall status (MPAS Dynamical Core CI)

This design allows us to make changes to the CI workflows more easily without having to adjust the branch ruleset all the time.

For future work, I will be adding Fortran source code linting to some parts of CAM-SIMA. I will also consolidate the remaining Python tests (git-fleximod, source code linting, doctests, etc.) into one unified workflow file, so we can replace them with a single entry, "Overall status (CAM-SIMA Python CI)", in the branch ruleset.

Let me know if you have any questions or suggestions about the proposed CAM-SIMA CI roadmap.

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.

1 participant