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

Add Github Action on macOS and clang #842

Merged
merged 14 commits into from
Aug 18, 2023

Conversation

aerorahul
Copy link
Contributor

@aerorahul aerorahul commented Aug 16, 2023

DESCRIPTION OF CHANGES:

This repository is missing a CI for macOS.

This PR:

  • adds a github action for macOS with clang.
  • uses v3 of cache in the workflows.
  • Removes old and broken workflows.

TESTS CONDUCTED:

The changes in this PR have no impact on current configuration on on-prem systems. No tests were conducted on HPC platforms.

Additional github action for macOS + clang was added.
The software dependencies are built with spack and are cached.

ufs-utils fails to build on macOS which highlights that the ufs-utils is not portable to macOS platform. This
PR does not fix this problem, it only baselines a workflow for macOS. I

DEPENDENCIES:

None

DOCUMENTATION:

None

ISSUE:

Fixes #756

CONTRIBUTORS:

None

@aerorahul
Copy link
Contributor Author

@GeorgeGayno-NOAA @edwardhartnett
The Clang macOS Build and Test / ufs_utils step of https://github.com/ufs-community/UFS_UTILS/actions/runs/5883650102/job/15958702123?pr=842 is expected to fail.
UFS-utils does not build on macOS.

I suggest disabling this workflow until someone fixes ufs-utils to be macOS compatible.

@edwardhartnett
Copy link
Collaborator

Seems like the errors are caused by a c99 flag. Can that be turned off?

/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/create_xgrid.c:1602:6: error: implicit declaration of function 'insertIntersect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            insertIntersect(grid1List, intersect[0], intersect[1], intersect[2], 0.0, u2, inbound, p1_1[0], p1_1[1], p1_1[2]);
            ^
/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/create_xgrid.c:1602:6: note: did you mean 'isIntersect'?
/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/mosaic_util.h:78:5: note: 'isIntersect' declared here
int isIntersect(struct Node node);
    ^
/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/create_xgrid.c:1605:6: error: implicit declaration of function 'insertIntersect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            insertIntersect(grid1List, intersect[0], intersect[1], intersect[2], u1, u2, inbound, p1_0[0], p1_0[1], p1_0[2]);
            ^
/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/create_xgrid.c:2118:8: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]

Copy link
Collaborator

@edwardhartnett edwardhartnett left a comment

Choose a reason for hiding this comment

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

Thanks for getting the CI system working again!!

@aerorahul
Copy link
Contributor Author

Seems like the errors are caused by a c99 flag. Can that be turned off?

/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/create_xgrid.c:1602:6: error: implicit declaration of function 'insertIntersect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            insertIntersect(grid1List, intersect[0], intersect[1], intersect[2], 0.0, u2, inbound, p1_1[0], p1_1[1], p1_1[2]);
            ^
/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/create_xgrid.c:1602:6: note: did you mean 'isIntersect'?
/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/mosaic_util.h:78:5: note: 'isIntersect' declared here
int isIntersect(struct Node node);
    ^
/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/create_xgrid.c:1605:6: error: implicit declaration of function 'insertIntersect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            insertIntersect(grid1List, intersect[0], intersect[1], intersect[2], u1, u2, inbound, p1_0[0], p1_0[1], p1_0[2]);
            ^
/Users/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/fre-nctools.fd/shared_lib/create_xgrid.c:2118:8: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]

@edwardhartnett Yes. I tried that, but there are more (other) errors and I don't want to capture enabling CI on macOS and fixing errors on macOS in the same PR. It is also a rabbit-hole I do not wish to enter. I will leave that to someone else.

@GeorgeGayno-NOAA GeorgeGayno-NOAA merged commit 4656e9f into ufs-community:develop Aug 18, 2023
5 of 6 checks passed
@aerorahul aerorahul deleted the feature/spack_mac branch August 18, 2023 20:44
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.

MacOS CI build breaking
3 participants