diff --git a/.github/workflows/build_conda.yml b/.github/workflows/build_conda.yml new file mode 100644 index 00000000..1965b765 --- /dev/null +++ b/.github/workflows/build_conda.yml @@ -0,0 +1,29 @@ +name: build_conda +on: + pull_request: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + + container: + image: ghcr.io/noaa-gfdl/fre-cli:miniconda24.7.1_gcc14.2.0 + + steps: + - name: Checkout Files + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Run Conda to Build + run: | + # append the reqd channels + conda config --append channels conda-forge + conda config --append channels noaa-gfdl + + # install conda-build and conda-verify + conda install conda-build conda-verify + + # conda build + conda build . diff --git a/.github/workflows/distcheck.yml b/.github/workflows/distcheck.yml index c583b9c0..4229ca95 100644 --- a/.github/workflows/distcheck.yml +++ b/.github/workflows/distcheck.yml @@ -3,40 +3,40 @@ # CI testing for the FRE-NCtools repo, builds and runs unit tests # image dockerfile is maintained here: # https://gitlab.gfdl.noaa.gov/fre/hpc-me -name: FRE-NCtools CI -on: - workflow_run: - workflows: ["FRE-NCtools Check Expensive"] - types: - - completed -jobs: - CI: - runs-on: ubuntu-latest - strategy: - matrix: - with_mpi: ['','--with-mpi'] - enable_quad_precision: ['', '--enable-quad-precision'] - container: - image: ghcr.io/noaa-gfdl/fre-nctools-ci-rocky-gnu:14.2.0_v2 - env: - MPI: ${{ matrix.with_mpi }} - QUAD_P: ${{ matrix.enable_quad_precision }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Configure - run: | - mkdir build && cd build - autoreconf -i ../configure.ac - ../configure $MPI $QUAD_P || cat config.log - - name: Build distribution with check - run: make DISTCHECK_CONFIGURE_FLAGS="$MPI $QUAD_P" -C build -j - - name: Save log file on failure - uses: actions/upload-artifact@v4.4.0 - if: failure() - with: - name: test-suites - path: | - build/tests/test-suite.log +#name: FRE-NCtools CI +#on: +# workflow_run: +# workflows: ["FRE-NCtools Check Expensive"] +# types: +# - completed +#jobs: +# CI: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# with_mpi: ['','--with-mpi'] +# enable_quad_precision: ['', '--enable-quad-precision'] +# container: +# image: ghcr.io/noaa-gfdl/fre-nctools-ci-rocky-gnu:14.2.0_v2 +# env: +# MPI: ${{ matrix.with_mpi }} +# QUAD_P: ${{ matrix.enable_quad_precision }} +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# submodules: recursive +# - name: Configure +# run: | +# mkdir build && cd build +# autoreconf -i ../configure.ac +# ../configure $MPI $QUAD_P || cat config.log +# - name: Build distribution with check +# run: make DISTCHECK_CONFIGURE_FLAGS="$MPI $QUAD_P" -C build -j +# - name: Save log file on failure +# uses: actions/upload-artifact@v4.4.0 +# if: failure() +# with: +# name: test-suites +# path: | +# build/tests/test-suite.log diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 60f07dcf..bc8c62ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,38 +3,38 @@ # CI testing for the FRE-NCtools repo, builds and runs unit tests # image dockerfile is maintained here: # https://gitlab.gfdl.noaa.gov/fre/hpc-me -name: FRE-NCtools CI -on: [push, pull_request] -jobs: - CI: - runs-on: ubuntu-latest - strategy: - matrix: - with_mpi: ['','--with-mpi'] - enable_quad_precision: ['', '--enable-quad-precision'] - container: - image: ghcr.io/noaa-gfdl/fre-nctools-ci-rocky-gnu:14.2.0_v2 - env: - MPI: ${{ matrix.with_mpi }} - QUAD_P: ${{ matrix.enable_quad_precision }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Configure - run: | - mkdir build && cd build - autoreconf -i ../configure.ac - ../configure $MPI $QUAD_P || cat config.log - - name: Build - run: make -C build -j - - name: Run most tests (skip the slow ones) - run: make -C build -j check - - name: Save log file on failure - uses: actions/upload-artifact@v4.4.0 - if: failure() - with: - name: test-suites - path: | - build/tests/test-suite.log +#name: FRE-NCtools CI +#on: [push, pull_request] +#jobs: +# CI: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# with_mpi: ['','--with-mpi'] +# enable_quad_precision: ['', '--enable-quad-precision'] +# container: +# image: ghcr.io/noaa-gfdl/fre-nctools-ci-rocky-gnu:14.2.0_v2 +# env: +# MPI: ${{ matrix.with_mpi }} +# QUAD_P: ${{ matrix.enable_quad_precision }} +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# submodules: recursive +# - name: Configure +# run: | +# mkdir build && cd build +# autoreconf -i ../configure.ac +# ../configure $MPI $QUAD_P || cat config.log +# - name: Build +# run: make -C build -j +# - name: Run most tests (skip the slow ones) +# run: make -C build -j check +# - name: Save log file on failure +# uses: actions/upload-artifact@v4.4.0 +# if: failure() +# with: +# name: test-suites +# path: | +# build/tests/test-suite.log diff --git a/.github/workflows/main_expensive.yml b/.github/workflows/main_expensive.yml index c98c4fca..d6ed8e18 100644 --- a/.github/workflows/main_expensive.yml +++ b/.github/workflows/main_expensive.yml @@ -3,42 +3,42 @@ # CI testing for the FRE-NCtools repo, builds and runs unit tests # image dockerfile is maintained here: # https://gitlab.gfdl.noaa.gov/fre/hpc-me -name: FRE-NCtools Check Expensive -on: - workflow_run: - workflows: ["FRE-NCtools CI"] - types: - - completed -jobs: - CI: - runs-on: ubuntu-latest - strategy: - matrix: - with_mpi: ['','--with-mpi'] - enable_quad_precision: ['', '--enable-quad-precision'] - container: - image: ghcr.io/noaa-gfdl/fre-nctools-ci-rocky-gnu:14.2.0_v2 - env: - MPI: ${{ matrix.with_mpi }} - QUAD_P: ${{ matrix.enable_quad_precision }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Configure - run: | - mkdir build && cd build - autoreconf -i ../configure.ac - ../configure $MPI $QUAD_P || cat config.log - - name: Build - run: make -C build -j - - name: Run most tests (skip the slow ones) - run: make -C build check-very-expensive - - name: Save log file on failure - uses: actions/upload-artifact@v4.4.0 - if: failure() - with: - name: test-suites - path: | - build/tests/test-suite.log +#name: FRE-NCtools Check Expensive +#on: +# workflow_run: +# workflows: ["FRE-NCtools CI"] +# types: +# - completed +#jobs: +# CI: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# with_mpi: ['','--with-mpi'] +# enable_quad_precision: ['', '--enable-quad-precision'] +# container: +# image: ghcr.io/noaa-gfdl/fre-nctools-ci-rocky-gnu:14.2.0_v2 +# env: +# MPI: ${{ matrix.with_mpi }} +# QUAD_P: ${{ matrix.enable_quad_precision }} +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# submodules: recursive +# - name: Configure +# run: | +# mkdir build && cd build +# autoreconf -i ../configure.ac +# ../configure $MPI $QUAD_P || cat config.log +# - name: Build +# run: make -C build -j +# - name: Run most tests (skip the slow ones) +# run: make -C build check-very-expensive +# - name: Save log file on failure +# uses: actions/upload-artifact@v4.4.0 +# if: failure() +# with: +# name: test-suites +# path: | +# build/tests/test-suite.log diff --git a/build.sh b/build.sh new file mode 100644 index 00000000..ba8a0b5b --- /dev/null +++ b/build.sh @@ -0,0 +1,4 @@ +autoreconf -i +./configure --prefix=$PREFIX +make -j +make install diff --git a/environment.yml b/environment.yml new file mode 100644 index 00000000..5d93bbe6 --- /dev/null +++ b/environment.yml @@ -0,0 +1,14 @@ +name: fre-nctools +channels: + - conda-forge + - noaa-gfdl +dependencies: + - autoconf + - automake + - libnetcdf + - netcdf-fortran + - nco + - hdf5=1.14.*=mpi* + - openmp + - mpich + - tcsh diff --git a/man/Makefile.am b/man/Makefile.am index 72e38103..4b74e9e5 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -44,6 +44,7 @@ EXTRA_DIST = \ river_regrid.txt \ scatter-ncc.txt \ split_ncvars.pl.txt \ + split_ncvars.pl.1 \ timavg.txt \ timavg.csh.1 \ time_average.txt \ @@ -80,6 +81,7 @@ man_MANS += \ plevel.sh.1 \ river_regrid.1 \ scatter-ncc.1 \ + split_ncvars.pl.txt \ split_ncvars.pl.1 \ timavg.1 \ timavg.csh.1 \ diff --git a/man/split_ncvars.pl.1 b/man/split_ncvars.pl.1 new file mode 100644 index 00000000..4e505f9f --- /dev/null +++ b/man/split_ncvars.pl.1 @@ -0,0 +1 @@ +.so man1/split_ncvars.pl diff --git a/meta.yaml b/meta.yaml new file mode 100644 index 00000000..ddb008bf --- /dev/null +++ b/meta.yaml @@ -0,0 +1,34 @@ +package: + name: fre-nctools + version: alpha + +source: + path: . + +build: + number: 0 + +requirements: + build: + - conda-forge::autoconf + - conda-forge::automake + - conda-forge::libnetcdf + - conda-forge::netcdf-fortran + - conda-forge::nco + - conda-forge::hdf5=1.14.*=mpi* + - conda-forge::openmp + - conda-forge::mpich + - conda-forge::tcsh + run: + +test: + commands: + - echo 'yay! we made it!' + - pwd && ls + - autoreconf -i + - ./configure --prefix=$PREFIX + - make check RUN_EXPENSIVE_TESTS=yes + +about: + license: LGPL-3.0 + summary: Tools for manipulating and creating netCDF inputs for FMS managed models diff --git a/src/Makefile.am b/src/Makefile.am index 2aa22217..2b5eb8e9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -213,4 +213,4 @@ split_ncvars.pl: split_ncvars/split_ncvars.pl.in Makefile install-exec-hook: ln $(DESTDIR)$(bindir)/split_ncvars.pl $(DESTDIR)$(bindir)/split_ncvars install-data-hook: - ln $(DESTDIR)$(mandir)/man1/split_ncvars.pl.1 $(DESTDIR)$(mandir)/man1/split_ncvars.1 + ln $(DESTDIR)$(mandir)/man1/split_ncvars.pl.1 $(DESTDIR)$(mandir)/man1/split_ncvars.1 || echo OOPS