NOAA-OWP / ngen

Next Generation Water Modeling Engine and Framework Prototype
Other
84 stars 62 forks source link

ci: fix macos brew include paths. differ based on arch #804

Closed aaraney closed 5 months ago

aaraney commented 5 months ago

Homebrew puts headers files in /usr/local/include on x86 and /opt/homebrew/include on apple arm. Tests are failing in multiple repos b.c. they cannot find udunits2.h when the runner is apple arm. This fixes that issue and generalizes how the include path is determined.

aaraney commented 5 months ago

See https://github.com/NOAA-OWP/LGAR-C/actions/runs/8804814183/job/24166001315#step:13:396 as an example failure.

/Users/runner/work/LGAR-C/LGAR-C/include/core/mediator/UnitsHelper.hpp:14:14: fatal error: > 'udunits2.h' file not found
#    include <udunits2.h>
            ^~~~~~~~~~~~
1 error generated.