Skip to content

MacOS CI fix + verbose builds on error#185

Merged
Hallberg-NOAA merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
marshallward:debug_macos_ci
Aug 8, 2022
Merged

MacOS CI fix + verbose builds on error#185
Hallberg-NOAA merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
marshallward:debug_macos_ci

Conversation

@marshallward
Copy link
Copy Markdown
Member

Two changes in this PR:

  • Resolves the MacOS build issues by removing the environment variables pointing to gcc-11 and gfortran-11 compiler (which seem to no longer be supported). The CC is removed and FC now just points to gfortran.

  • If the dependency ./configure fails for any reason, the config.log output is now streamed to the CI log, which should make future debugging easier.

This patch adds the `REPORT_ERROR_LOGS` variable to the .testing and
ac/deps makefiles.  When set to true, a failed FMS build will also echo
the contents of `config.log`, in order to diagnose remote CI builds.

The variable is disabled on default, to reduce the amount of output at
command line.  It has been added to the GitHub Actions CI, and is
propagated through `.testing/Makefile`.

Although not used in the MOM6 builds, it could be extended to them if it
proves useful.  Currently, these Makefiles always echo `config.log`
after a failed build.
This patch fixes the gcc compiler environment variables on their MacOS
systems.

GitHub recently made some GCC compiler changes on their MacOS machines;
specifically, `gcc-11` and `gfortran-11` appear to no longer be
available.  Previously, we were unable to use the default gcc and had to
use these executables.

On this newer version, we can use the default system gcc, and the `CC`
environment variable can be left unset.  We still need `FC` to point to
`gfortran`, since it otherwise tries to build with `f77`, which does not
exist.
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 6, 2022

Codecov Report

Merging #185 (00b0c9f) into dev/gfdl (1d054ef) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           dev/gfdl     #185   +/-   ##
=========================================
  Coverage     37.38%   37.38%           
=========================================
  Files           259      259           
  Lines         71997    71997           
  Branches      13515    13515           
=========================================
  Hits          26916    26916           
  Misses        40094    40094           
  Partials       4987     4987           

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Copy Markdown
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

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

This PR corrects problems that have recently arisen with the MacOS CI testing, and adds more verbosity when the CI testing encounters errors. This seems to me like a necessary change, preempting other PRs that have been awaiting action longer.

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/16312 without any changes to answers or output.

@Hallberg-NOAA Hallberg-NOAA merged commit 90cac5b into NOAA-GFDL:dev/gfdl Aug 8, 2022
@marshallward marshallward deleted the debug_macos_ci branch September 16, 2022 20:59
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.

2 participants