Skip to content

Fix CI/CD workflow#975

Closed
dpsarmie wants to merge 7 commits into
NOAA-EMC:developfrom
dpsarmie:fix/cicd_fix_v2
Closed

Fix CI/CD workflow#975
dpsarmie wants to merge 7 commits into
NOAA-EMC:developfrom
dpsarmie:fix/cicd_fix_v2

Conversation

@dpsarmie
Copy link
Copy Markdown
Collaborator

@dpsarmie dpsarmie commented May 29, 2025

Description

The GitHub CI/CD workflow was broken after a recent PR. This PR will update the workflows to allow the check to be run again.

Two distinct issues were found so far:

  1. The addition of an FV3 option (in prep for MPAS) was not added to the CI workflow. That has now been added.
  2. A new path needed to be added because of the elimination of the FindESMF.cmake from the NOAA-EMC repo (Remove Modules/FindESMF.cmake - use ESMF's own version CMakeModules#71)

Issue(s) addressed

Testing

These changes were tested using the GitHub CI/CD workflow.

The changes were also tested on Hercules in UFS to make sure that there weren't any unexpected changes.

Dependencies

None

@dpsarmie
Copy link
Copy Markdown
Collaborator Author

As of now, the Docs workflow in the GitHub CI is 100% working.

There is still an issue with CCPP in the GCC workflow.

@dpsarmie
Copy link
Copy Markdown
Collaborator Author

dpsarmie commented Jun 2, 2025

Ok, this should be ready to get reviewed. All issues have been sorted out. Main issues were the change to the ESMF library (going from CMakeModules repo to ESMF) and splitting the FV3 library to ufsatmfv3.

I ran RTs on Hercules. There were no changes to fv3atm but I was checking to be cautious.

Here's the CI/CD passing on my develop fork of fv3atm.
image

@dpsarmie dpsarmie marked this pull request as ready for review June 2, 2025 15:12
Comment thread ci/CMakeLists.txt
Comment on lines +14 to +15
include_directories(${ESMF_ROOT}/include)
link_directories(${TEMP_DIR})
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these two (include_directories and link_directories) needed? If we use FindESMF.cmake from esmf's install tree, find_package (at line 65) should properly set esmf import targets.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There we two separate issues that I was running into when Github was running the CI. The first issue was the following:

2025-06-03T15:11:51.2167598Z [ 96%] Building Fortran object fv3/atmos_cubed_sphere/CMakeFiles/fv3.dir/driver/UFS/fv_nggps_diag.F90.o
2025-06-03T15:11:51.4050342Z /home/runner/work/fv3atm/fv3atm/fv3atm/fv3/atmos_cubed_sphere/driver/UFS/fv_nggps_diag.F90:1165:8:
2025-06-03T15:11:51.4051124Z 
2025-06-03T15:11:51.4051240Z  1165 |    use esmf
2025-06-03T15:11:51.4052000Z       |        1
2025-06-03T15:11:51.4052978Z Fatal Error: Cannot open module file ‘esmf.mod’ for reading at (1): No such file or directory
2025-06-03T15:11:51.4055508Z compilation terminated.
2025-06-03T15:11:51.4078729Z make[2]: *** [fv3/atmos_cubed_sphere/CMakeFiles/fv3.dir/build.make:650: fv3/atmos_cubed_sphere/CMakeFiles/fv3.dir/driver/UFS/fv_nggps_diag.F90.o] Error 1
2025-06-03T15:11:51.4079870Z make[2]: *** Waiting for unfinished jobs....
2025-06-03T15:11:51.6629706Z make[1]: *** [CMakeFiles/Makefile2:1458: fv3/atmos_cubed_sphere/CMakeFiles/fv3.dir/all] Error 2
2025-06-03T15:11:51.6632028Z make: *** [Makefile:146: all] Error 2
2025-06-03T15:11:51.6650138Z ##[error]Process completed with exit code 2.

which was resolved with line 14.

The second issue:

2025-06-03T16:44:49.8904603Z [100%] Built target ufsatm_fv3
2025-06-03T16:44:49.9029247Z [100%] Building Fortran object tests/CMakeFiles/test_post_nems_routines.dir/test_post_nems_routines.F90.o
2025-06-03T16:44:50.0182534Z [100%] Linking Fortran executable test_post_nems_routines
2025-06-03T16:44:50.1388910Z /usr/bin/ld: cannot find -lesmf: No such file or directory
2025-06-03T16:44:50.1550362Z collect2: error: ld returned 1 exit status
2025-06-03T16:44:50.1568824Z make[2]: *** [tests/CMakeFiles/test_post_nems_routines.dir/build.make:123: tests/test_post_nems_routines] Error 1
2025-06-03T16:44:50.1571012Z make[1]: *** [CMakeFiles/Makefile2:1424: tests/CMakeFiles/test_post_nems_routines.dir/all] Error 2
2025-06-03T16:44:50.1573892Z make: *** [Makefile:146: all] Error 2
2025-06-03T16:44:50.1594681Z ##[error]Process completed with exit code 2.
2025-06-03T16:44:50.1679520Z ##[group]Run actions/upload-artifact@v4

was only resolved when adding in Line 15.

I'm not as familiar with CMake and the ESMF libraries, so if there's something I'm missing or somewhere else I could be looking at, let me know.

dpsarmie added a commit to dpsarmie/ufsatm that referenced this pull request Jun 16, 2025
@dpsarmie
Copy link
Copy Markdown
Collaborator Author

Closing this PR since changes have been merged into #966.

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.

Github actions are failing in 'build_fv3atm' steps

3 participants