Skip to content

Commit

Permalink
Merge branch 'develop' into test/copygb
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Jun 23, 2023
2 parents 47f2e78 + 57100b1 commit 12476e6
Show file tree
Hide file tree
Showing 8 changed files with 303 additions and 40 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/Linux_external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ jobs:
FC: gfortran-11
CC: gcc-11
strategy:
fail-fast: true
matrix:
g2-version: [develop, v3.4.x]
g2-version: [develop, v3.5.x]
bacio-version: [2.5.0]
jasper-version: [2.0.33, 3.0.5, 4.0.0]
w3emc-version: [2.9.3]
w3emc-version: [2.9.3, 2.10.0]

steps:
- name: install-dependencies
Expand Down Expand Up @@ -126,7 +127,7 @@ jobs:
cd w3emc
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc
cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF ..
make -j2
make install
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/Linux_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ jobs:
FC: gfortran-11
CC: gcc-11
strategy:
fail-fast: true
matrix:
g2-version: [3.4.5, 3.4.x]
g2-version: [3.4.5, 3.5.x]
bacio-version: [2.4.1, 2.5.0]
jasper-version: [2.0.33]
w3emc-version: [2.9.2, 2.9.3]
w3emc-version: [2.9.2, 2.9.3, 2.10.0]

steps:
- name: install-dependencies
Expand Down Expand Up @@ -126,7 +127,7 @@ jobs:
cd w3emc
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc
cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF ..
make -j2
make install
Expand Down Expand Up @@ -155,6 +156,22 @@ jobs:
make -j2
make install
- name: checkout-g2c
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-g2c
path: g2c
ref: develop

- name: build-g2c
run: |
cd g2c
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/g2c -DCMAKE_PREFIX_PATH="~/jasper" ..
make -j2
make install
- name: cache-g2
id: cache-g2
uses: actions/cache@v2
Expand All @@ -176,7 +193,7 @@ jobs:
cd g2
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/g2 -DCMAKE_PREFIX_PATH="~/bacio;~/jasper;~/w3emc" ..
cmake -DCMAKE_INSTALL_PREFIX=~/g2 -DCMAKE_PREFIX_PATH="~/bacio;~/jasper;~/w3emc;~/g2c" ..
make -j2
make install
Expand All @@ -189,6 +206,7 @@ jobs:
run: |
cd grib_utils
mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH="~/bacio;~/jasper;~/sp;~/ip;~/w3emc;~/g2" ..
export LD_LIBRARY_PATH=/home/runner/jasper/lib
cmake -DCMAKE_PREFIX_PATH="~/bacio;~/jasper;~/sp;~/ip;~/w3emc;~/g2;~/g2c" ..
make -j2 VERBOSE=1
ctest --output-on-failure --rerun-failed --verbose
20 changes: 10 additions & 10 deletions .github/workflows/developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,37 @@ jobs:
FC: gfortran-11
CC: gcc-11
strategy:
fail-fast: true
matrix:
g2-branch: [develop, v3.4.x]
g2-branch: [develop, v3.5.x]

steps:
- name: install-dependencies
run: |
sudo apt-get update &> /dev/null
sudo apt-get install libpng-dev
sudo apt-get install libjpeg-dev doxygen
python3 -m pip install gcovr
sudo apt-get install libjpeg-dev doxygen gcovr
- name: checkout-jasper
uses: actions/checkout@v2
with:
repository: jasper-software/jasper
path: jasper
ref: version-3.0.5
ref: version-4.0.0

- name: cache-jasper
id: cache-jasper
uses: actions/cache@v2
with:
path: ~/jasper
key: jasper-${{ runner.os }}-2.0.33-1
key: jasper-${{ runner.os }}-4.0.0

- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
cd jasper
mkdir b && cd b
cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper
cmake -DCMAKE_INSTALL_PREFIX=~/jasper ..
make -j2
make install
Expand All @@ -66,7 +66,7 @@ jobs:
run: |
cd bacio
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio
cmake -DCMAKE_INSTALL_PREFIX=~/bacio ..
make -j2
make install
Expand All @@ -91,7 +91,7 @@ jobs:
cd sp
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/sp
cmake -DCMAKE_INSTALL_PREFIX=~/sp ..
make -j2
make install
Expand All @@ -107,7 +107,7 @@ jobs:
cd w3emc
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc
cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF ..
make -j2
make install
Expand All @@ -123,7 +123,7 @@ jobs:
cd ip
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/ip -DCMAKE_PREFIX_PATH=~/sp
cmake -DCMAKE_INSTALL_PREFIX=~/ip -DCMAKE_PREFIX_PATH=~/sp ..
make -j2
make install
Expand Down
107 changes: 107 additions & 0 deletions .github/workflows/spack-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# This is the GitHub actions workflow for building grib_utils with GNU using
# spack for dependencies.
#
# Ed Hartnett, 12/19/22
name: spack-macos
on:
push:
branches:
- develop
pull_request:
branches:
- develop

# Use custom shell with -l so .bash_profile is sourced
# without having to do it in manually every step
defaults:
run:
shell: bash -leo pipefail {0}

env:
cache_key: gcc3 # The number (#) following the cache_key "gcc" is to flush Action cache.
CC: gcc-10
FC: gfortran-10
CXX: g++-10

# A note on flushing Action cache and relevance to "cache_key" above.
# There is no way to flush the Action cache, and hence a number (#) is appended
# to the "cache_key" (gcc).
# If the dependencies change, increment this number and a new cache will be
# generated by the dependency build step "spack-setup"
# There is a Github issue to force clear the cache.
# See discussion on:
# https://stackoverflow.com/questions/63521430/clear-cache-in-github-actions

# The jobs are split into:
# 1. a dependency build step (spack-setup), and
# 2. a UPP build step (spack-build)
# The setup is run once and the environment is cached,
# so each build of UPP can reuse the cached dependencies to save time (and compute).

jobs:
spack-setup:
runs-on: macos-latest

steps:
- name: checkout-grib_utils # This is for getting spack.yaml
uses: actions/checkout@v2
with:
path: grib_utils

# Cache spack, compiler and dependencies
- name: cache-env
id: cache-env
uses: actions/cache@v2
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('grib_utils/ci/spack.yaml') }}

# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
git clone -c feature.manyFiles=true https://github.com/spack/spack.git
source spack/share/spack/setup-env.sh
spack env create grib_utils-env grib_utils/ci/spack.yaml
spack env activate grib_utils-env
spack external find
spack add mpich@3.4.2
spack concretize
spack install -v --fail-fast --dirty
spack clean -a
spack-build:
needs: spack-setup
runs-on: ubuntu-latest

steps:
- name: checkout-grib_utils
uses: actions/checkout@v2
with:
path: grib_utils
submodules: true

- name: cache-env
id: cache-env
uses: actions/cache@v2
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('grib_utils/ci/spack.yaml') }}

- name: build-grib_utils
run: |
source spack/share/spack/setup-env.sh
sudo apt install cmake libxerces-c-dev
spack env activate grib_utils-env
export CC=mpicc
export FC=mpif90
cd grib_utils
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ..
make -j2 VERBOSE=1
ctest --output-on-failure --rerun-failed --verbose
make install
107 changes: 107 additions & 0 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# This is the GitHub actions workflow for building grib_utils with GNU using
# spack for dependencies.
#
# Ed Hartnett, 12/19/22
name: spack
on:
push:
branches:
- develop
pull_request:
branches:
- develop

# Use custom shell with -l so .bash_profile is sourced
# without having to do it in manually every step
defaults:
run:
shell: bash -leo pipefail {0}

env:
cache_key: gcc3 # The number (#) following the cache_key "gcc" is to flush Action cache.
CC: gcc-10
FC: gfortran-10
CXX: g++-10

# A note on flushing Action cache and relevance to "cache_key" above.
# There is no way to flush the Action cache, and hence a number (#) is appended
# to the "cache_key" (gcc).
# If the dependencies change, increment this number and a new cache will be
# generated by the dependency build step "spack-setup"
# There is a Github issue to force clear the cache.
# See discussion on:
# https://stackoverflow.com/questions/63521430/clear-cache-in-github-actions

# The jobs are split into:
# 1. a dependency build step (spack-setup), and
# 2. a UPP build step (spack-build)
# The setup is run once and the environment is cached,
# so each build of UPP can reuse the cached dependencies to save time (and compute).

jobs:
spack-setup:
runs-on: ubuntu-latest

steps:
- name: checkout-grib_utils # This is for getting spack.yaml
uses: actions/checkout@v2
with:
path: grib_utils

# Cache spack, compiler and dependencies
- name: cache-env
id: cache-env
uses: actions/cache@v2
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('grib_utils/ci/spack.yaml') }}

# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
git clone -c feature.manyFiles=true https://github.com/spack/spack.git
source spack/share/spack/setup-env.sh
spack env create grib_utils-env grib_utils/ci/spack.yaml
spack env activate grib_utils-env
spack external find
spack add mpich@3.4.2
spack concretize
spack install -v --fail-fast --dirty
spack clean -a
spack-build:
needs: spack-setup
runs-on: ubuntu-latest

steps:
- name: checkout-grib_utils
uses: actions/checkout@v2
with:
path: grib_utils
submodules: true

- name: cache-env
id: cache-env
uses: actions/cache@v2
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('grib_utils/ci/spack.yaml') }}

- name: build-grib_utils
run: |
source spack/share/spack/setup-env.sh
sudo apt install cmake libxerces-c-dev
spack env activate grib_utils-env
export CC=mpicc
export FC=mpif90
cd grib_utils
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ..
make -j2 VERBOSE=1
ctest --output-on-failure --rerun-failed --verbose
make install
Loading

0 comments on commit 12476e6

Please sign in to comment.