Skip to content

Commit

Permalink
Reenable macos workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DusanJovic-NOAA committed Aug 14, 2024
1 parent ad48a6b commit b7ee6c3
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 118 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build macOS

on: [push, pull_request]

env:
CC: gcc-13
CXX: g++-13
FC: gfortran-13

jobs:
build:

runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Update brew packages
run: |
brew install autoconf automake bison coreutils open-mpi
echo "/opt/homebrew/opt/bison/bin" >> $GITHUB_PATH
echo "/opt/homebrew/opt/coreutils/libexec/gnubin" >> $GITHUB_PATH
- name: Fetch dependencies
run: |
./get.sh
- name: Build
run: |
./build.sh gnu -all
rm -rf libs/ufslibs/build
- name: Run
run: |
cd run
sed -i -e 's/NHOURS_FCST=24/NHOURS_FCST=3/g' configuration.sh
sed -i -e 's/NFHMAX_HF=12/NFHMAX_HF=3/g' configuration.sh
./fetch_fix_data.sh
./fetch_input_data.sh
./run.sh
ls -l preproc_run
ls -l model_run
ls -l post_run
113 changes: 0 additions & 113 deletions .github/workflows/build_macos.yml.disabled

This file was deleted.

8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ echo "BUILD_POST = ${BUILD_POST}"

readonly MYDIR=$(cd "$(dirname "$(readlink -n "${BASH_SOURCE[0]}" )" )" && pwd -P)

export OMPI_CC=${CC}
export OMPI_CXX=${CXX}
export OMPI_FC=${FC}

# print compiler version
echo
echo "CC = ${CC}"
Expand All @@ -120,10 +124,6 @@ echo
cmake --version | head -1
echo

export OMPI_CC=${CC}
export OMPI_CXX=${CXX}
export OMPI_FC=${FC}

#
# ufslibs
#
Expand Down
5 changes: 4 additions & 1 deletion libs/ufslibs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ ExternalProject_Add_StepDependencies(hdf5 build zlib zstd)
##
## netcdf
##
if(NOT APPLE)
set(_disable_libxml2 "--disable-libxml2")
endif()
ExternalProject_Add(netcdf
URL https://github.com/Unidata/netcdf-c/archive/v4.9.2.tar.gz
URL_HASH MD5=84acd096ab4f3300c20db862eecdf7c7
Expand All @@ -144,7 +147,7 @@ ExternalProject_Add(netcdf
--libdir=${install_prefix}/netcdf/lib
--enable-cdf5
--disable-dap
--disable-libxml2
${_disable_libxml2}
--disable-byterange
--enable-netcdf-4
--disable-doxygen
Expand Down

0 comments on commit b7ee6c3

Please sign in to comment.