Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

347 conda packaging reboot #348

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/build_conda.yml
Original file line number Diff line number Diff line change
@@ -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 .
74 changes: 37 additions & 37 deletions .github/workflows/distcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
# if: failure()
# with:
# name: test-suites
# path: |
# build/tests/test-suite.log
70 changes: 35 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
# if: failure()
# with:
# name: test-suites
# path: |
# build/tests/test-suite.log
78 changes: 39 additions & 39 deletions .github/workflows/main_expensive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
# if: failure()
# with:
# name: test-suites
# path: |
# build/tests/test-suite.log
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
autoreconf -i
./configure --prefix=$PREFIX
make -j
make install
14 changes: 14 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions man/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions man/split_ncvars.pl.1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man1/split_ncvars.pl
34 changes: 34 additions & 0 deletions meta.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading