Skip to content
Merged
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
237 changes: 237 additions & 0 deletions .github/workflows/netcdf4_adios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
# Test NetCDF4 and ADIOS
name: CI - NetCDF4 and ADIOS

permissions:
contents: read
pull-requests: write

on:
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.1'
- '**/*.jpg'
- '**/*.png'
- 'docs/*'
- 'test/test_installed/*'
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.1'
- '**/*.jpg'
- '**/*.png'
- 'docs/*'
- 'test/test_installed/*'

env:
LIBTOOL_VERSION: 2.5.4
MPICH_LATEST: 4.3.2
HDF5_VERSION: 1.14.6
NETCDF4_VERSION: 4.9.3
ADIOS_VERSION: 1.13.1

jobs:
build:
strategy:
fail-fast: false # This disables the default cancel-on-failure behavior

runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4

- name: Install autotools
run: |
set -x
sudo apt-get update
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install m4
# sudo apt-get install libtool libtool-bin
wget -q https://ftp.gnu.org/gnu/libtool/libtool-${LIBTOOL_VERSION}.tar.gz
gzip -dc libtool-${LIBTOOL_VERSION}.tar.gz | tar -xf -
cd libtool-${LIBTOOL_VERSION}
./configure --prefix=/usr --silent
sudo make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
sudo make -s LIBTOOLFLAGS=--silent V=1 -j 8 distclean >> qout 2>&1
which autoconf
autoconf --version
which automake
automake --version
which libtool
libtool --version
which m4
m4 --version

- name: Build and install MPICH
run: |
# MPICH versions older than 4.2.2 do not support the MPI large
# count feature.
echo "Install MPICH ${MPICH_LATEST} in ${GITHUB_WORKSPACE}/MPI"
wget -q https://www.mpich.org/static/downloads/${MPICH_LATEST}/mpich-${MPICH_LATEST}.tar.gz
gzip -dc mpich-${MPICH_LATEST}.tar.gz | tar -xf -
cd mpich-${MPICH_LATEST}
./configure --prefix=${GITHUB_WORKSPACE}/MPICH \
--silent \
--enable-romio \
--with-file-system=ufs \
--with-device=ch3:sock \
--enable-fortran \
CC=gcc FC=gfortran \
FFLAGS=-fallow-argument-mismatch \
FCFLAGS=-fallow-argument-mismatch
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
make -s LIBTOOLFLAGS=--silent V=1 -j 8 distclean >> qout 2>&1

- name: Build and install HDF5
if: ${{ success() }}
run: |
set -x
cd ${GITHUB_WORKSPACE}
rm -rf HDF5 ; mkdir HDF5 ; cd HDF5
curl -LO https://github.com/HDFGroup/hdf5/releases/download/hdf5_${HDF5_VERSION}/hdf5-${HDF5_VERSION}.tar.gz
tar -zxf hdf5-${HDF5_VERSION}.tar.gz
cd hdf5-${HDF5_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \
--silent \
--enable-hl \
--enable-parallel \
--enable-build-mode=production \
--disable-doxygen-doc \
--disable-doxygen-man \
--disable-doxygen-html \
--disable-tools \
--disable-tests \
--disable-fortran \
--disable-cxx \
CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
make -s distclean >> qout 2>&1

- name: Build and install NetCDF4
if: ${{ success() }}
run: |
set -x
cd ${GITHUB_WORKSPACE}
rm -rf NetCDF ; mkdir NetCDF ; cd NetCDF
curl -LO https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF4_VERSION}.tar.gz
tar -zxf v${NETCDF4_VERSION}.tar.gz
cd netcdf-c-${NETCDF4_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \
--silent \
--disable-doxygen \
--disable-mmap \
--disable-dap \
--disable-nczarr \
--disable-nczarr-filters \
--disable-filter-testing \
--disable-quantize \
--disable-byterange \
CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \
CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \
LDFLAGS="-L${GITHUB_WORKSPACE}/HDF5/lib" \
LIBS="-lhdf5"
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
make -s distclean >> qout 2>&1

- name: Build and install ADIOS
if: ${{ success() }}
run: |
cd ${GITHUB_WORKSPACE}
export PATH="${GITHUB_WORKSPACE}/MPICH/bin:${PATH}"
wget -q https://users.nccs.gov/~pnorbert/adios-${ADIOS_VERSION}.tar.gz
gzip -dc adios-${ADIOS_VERSION}.tar.gz | tar -xf -
cd adios-${ADIOS_VERSION}
mkdir build && cd build
../configure --prefix=${GITHUB_WORKSPACE}/ADIOS \
--silent \
--with-mpi=${GITHUB_WORKSPACE}/MPICH \
--disable-fortran
make -j 8 >> qout 2>&1
make -j 8 install >> qout 2>&1

- name: Build PnetCDF
if: ${{ success() }}
run: |
set -x
cd ${GITHUB_WORKSPACE}
which autoconf
autoconf --version
which automake
automake --version
which libtool
libtool --version
which m4
m4 --version
autoreconf -i
mkdir -p ${GITHUB_WORKSPACE}/pnetcdf_output
./configure --prefix=${GITHUB_WORKSPACE}/PnetCDF \
--enable-option-checking=fatal \
pnc_ac_debug=yes \
--with-netcdf4=${GITHUB_WORKSPACE}/NetCDF \
--with-adios=${GITHUB_WORKSPACE}/ADIOS \
--with-mpi=${GITHUB_WORKSPACE}/MPICH \
TESTOUTDIR=${GITHUB_WORKSPACE}/pnetcdf_output
make -s LIBTOOLFLAGS=--silent V=1 -j 8 tests

- name: Print config.log
if: ${{ always() }}
run: |
cat ${GITHUB_WORKSPACE}/config.log

- name: make check
if: ${{ success() }}
run: |
cd ${GITHUB_WORKSPACE}
make -s LIBTOOLFLAGS=--silent V=1 check

- name: Print test log files
if: ${{ always() }}
run: |
cd ${GITHUB_WORKSPACE}
fname=`find src test examples benchmarks -type f -name "*.log"`
for f in $fname ; do \
bname=`basename $f` ; \
if test "x$bname" != xconfig.log ; then \
echo "-------- dump $f ----------------------------" ; \
cat $f ; \
fi ; \
done

- name: make ptests
if: ${{ success() }}
run: |
cd ${GITHUB_WORKSPACE}
make -s LIBTOOLFLAGS=--silent V=1 ptests

- name: make distcheck
if: ${{ success() }}
run: |
cd ${GITHUB_WORKSPACE}
make -j 8 distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-mpi=${GITHUB_WORKSPACE}/MPICH"

- name: make install
if: ${{ success() }}
run: |
set -x
cd ${GITHUB_WORKSPACE}
prefix_path=${GITHUB_WORKSPACE}/pnetcdf_install
echo "---- test make install prefix=${prefix_path}"
make -s LIBTOOLFLAGS=--silent V=1 install prefix=${prefix_path}
test/tst_install.sh ${prefix_path}
prefix_path="/pnetcdf_install"
destdir_path=${GITHUB_WORKSPACE}/inst
echo "---- test make install prefix=${prefix_path} DESTDIR=${destdir_path}"
make -s LIBTOOLFLAGS=--silent V=1 install prefix=${prefix_path} DESTDIR=${destdir_path}
test/tst_install.sh ${prefix_path} ${destdir_path}

- name: Cleanup
if: ${{ always() }}
run: |
cd ${GITHUB_WORKSPACE}
make -s LIBTOOLFLAGS=--silent V=1 distclean
Loading