|
| 1 | +# Test NetCDF4 and ADIOS |
| 2 | +name: CI - NetCDF4 and ADIOS |
| 3 | + |
| 4 | +permissions: |
| 5 | + contents: read |
| 6 | + pull-requests: write |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: [ master ] |
| 11 | + paths-ignore: |
| 12 | + - '**/*.md' |
| 13 | + - '**/*.txt' |
| 14 | + - '**/*.1' |
| 15 | + - '**/*.jpg' |
| 16 | + - '**/*.png' |
| 17 | + - 'docs/*' |
| 18 | + - 'test/test_installed/*' |
| 19 | + pull_request: |
| 20 | + branches: [ master ] |
| 21 | + paths-ignore: |
| 22 | + - '**/*.md' |
| 23 | + - '**/*.txt' |
| 24 | + - '**/*.1' |
| 25 | + - '**/*.jpg' |
| 26 | + - '**/*.png' |
| 27 | + - 'docs/*' |
| 28 | + - 'test/test_installed/*' |
| 29 | + |
| 30 | +env: |
| 31 | + LIBTOOL_VERSION: 2.5.4 |
| 32 | + MPICH_LATEST: 4.3.2 |
| 33 | + HDF5_VERSION: 1.14.6 |
| 34 | + NETCDF4_VERSION: 4.9.3 |
| 35 | + ADIOS_VERSION: 1.13.1 |
| 36 | + |
| 37 | +jobs: |
| 38 | + build: |
| 39 | + strategy: |
| 40 | + fail-fast: false # This disables the default cancel-on-failure behavior |
| 41 | + |
| 42 | + runs-on: ubuntu-latest |
| 43 | + timeout-minutes: 120 |
| 44 | + |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4 |
| 47 | + |
| 48 | + - name: Install autotools |
| 49 | + run: | |
| 50 | + set -x |
| 51 | + sudo apt-get update |
| 52 | + sudo apt-get install autoconf |
| 53 | + sudo apt-get install automake |
| 54 | + sudo apt-get install m4 |
| 55 | + # sudo apt-get install libtool libtool-bin |
| 56 | + wget -q https://ftp.gnu.org/gnu/libtool/libtool-${LIBTOOL_VERSION}.tar.gz |
| 57 | + gzip -dc libtool-${LIBTOOL_VERSION}.tar.gz | tar -xf - |
| 58 | + cd libtool-${LIBTOOL_VERSION} |
| 59 | + ./configure --prefix=/usr --silent |
| 60 | + sudo make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 |
| 61 | + sudo make -s LIBTOOLFLAGS=--silent V=1 -j 8 distclean >> qout 2>&1 |
| 62 | + which autoconf |
| 63 | + autoconf --version |
| 64 | + which automake |
| 65 | + automake --version |
| 66 | + which libtool |
| 67 | + libtool --version |
| 68 | + which m4 |
| 69 | + m4 --version |
| 70 | +
|
| 71 | + - name: Build and install MPICH |
| 72 | + run: | |
| 73 | + # MPICH versions older than 4.2.2 do not support the MPI large |
| 74 | + # count feature. |
| 75 | + echo "Install MPICH ${MPICH_LATEST} in ${GITHUB_WORKSPACE}/MPI" |
| 76 | + wget -q https://www.mpich.org/static/downloads/${MPICH_LATEST}/mpich-${MPICH_LATEST}.tar.gz |
| 77 | + gzip -dc mpich-${MPICH_LATEST}.tar.gz | tar -xf - |
| 78 | + cd mpich-${MPICH_LATEST} |
| 79 | + ./configure --prefix=${GITHUB_WORKSPACE}/MPICH \ |
| 80 | + --silent \ |
| 81 | + --enable-romio \ |
| 82 | + --with-file-system=ufs \ |
| 83 | + --with-device=ch3:sock \ |
| 84 | + --enable-fortran \ |
| 85 | + CC=gcc FC=gfortran \ |
| 86 | + FFLAGS=-fallow-argument-mismatch \ |
| 87 | + FCFLAGS=-fallow-argument-mismatch |
| 88 | + make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 |
| 89 | + make -s LIBTOOLFLAGS=--silent V=1 -j 8 distclean >> qout 2>&1 |
| 90 | +
|
| 91 | + - name: Build and install HDF5 |
| 92 | + if: ${{ success() }} |
| 93 | + run: | |
| 94 | + set -x |
| 95 | + cd ${GITHUB_WORKSPACE} |
| 96 | + rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 |
| 97 | + curl -LO https://github.com/HDFGroup/hdf5/releases/download/hdf5_${HDF5_VERSION}/hdf5-${HDF5_VERSION}.tar.gz |
| 98 | + tar -zxf hdf5-${HDF5_VERSION}.tar.gz |
| 99 | + cd hdf5-${HDF5_VERSION} |
| 100 | + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ |
| 101 | + --silent \ |
| 102 | + --enable-hl \ |
| 103 | + --enable-parallel \ |
| 104 | + --enable-build-mode=production \ |
| 105 | + --disable-doxygen-doc \ |
| 106 | + --disable-doxygen-man \ |
| 107 | + --disable-doxygen-html \ |
| 108 | + --disable-tools \ |
| 109 | + --disable-tests \ |
| 110 | + --disable-fortran \ |
| 111 | + --disable-cxx \ |
| 112 | + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc |
| 113 | + make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 |
| 114 | + make -s distclean >> qout 2>&1 |
| 115 | +
|
| 116 | + - name: Build and install NetCDF4 |
| 117 | + if: ${{ success() }} |
| 118 | + run: | |
| 119 | + set -x |
| 120 | + cd ${GITHUB_WORKSPACE} |
| 121 | + rm -rf NetCDF ; mkdir NetCDF ; cd NetCDF |
| 122 | + curl -LO https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF4_VERSION}.tar.gz |
| 123 | + tar -zxf v${NETCDF4_VERSION}.tar.gz |
| 124 | + cd netcdf-c-${NETCDF4_VERSION} |
| 125 | + ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ |
| 126 | + --silent \ |
| 127 | + --disable-doxygen \ |
| 128 | + --disable-mmap \ |
| 129 | + --disable-dap \ |
| 130 | + --disable-nczarr \ |
| 131 | + --disable-nczarr-filters \ |
| 132 | + --disable-filter-testing \ |
| 133 | + --disable-quantize \ |
| 134 | + --disable-byterange \ |
| 135 | + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ |
| 136 | + CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ |
| 137 | + LDFLAGS="-L${GITHUB_WORKSPACE}/HDF5/lib" \ |
| 138 | + LIBS="-lhdf5" |
| 139 | + make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 |
| 140 | + make -s distclean >> qout 2>&1 |
| 141 | +
|
| 142 | + - name: Build and install ADIOS |
| 143 | + if: ${{ success() }} |
| 144 | + run: | |
| 145 | + cd ${GITHUB_WORKSPACE} |
| 146 | + export PATH="${GITHUB_WORKSPACE}/MPICH/bin:${PATH}" |
| 147 | + wget -q https://users.nccs.gov/~pnorbert/adios-${ADIOS_VERSION}.tar.gz |
| 148 | + gzip -dc adios-${ADIOS_VERSION}.tar.gz | tar -xf - |
| 149 | + cd adios-${ADIOS_VERSION} |
| 150 | + mkdir build && cd build |
| 151 | + ../configure --prefix=${GITHUB_WORKSPACE}/ADIOS \ |
| 152 | + --silent \ |
| 153 | + --with-mpi=${GITHUB_WORKSPACE}/MPICH \ |
| 154 | + --disable-fortran |
| 155 | + make -j 8 >> qout 2>&1 |
| 156 | + make -j 8 install >> qout 2>&1 |
| 157 | +
|
| 158 | + - name: Build PnetCDF |
| 159 | + if: ${{ success() }} |
| 160 | + run: | |
| 161 | + set -x |
| 162 | + cd ${GITHUB_WORKSPACE} |
| 163 | + which autoconf |
| 164 | + autoconf --version |
| 165 | + which automake |
| 166 | + automake --version |
| 167 | + which libtool |
| 168 | + libtool --version |
| 169 | + which m4 |
| 170 | + m4 --version |
| 171 | + autoreconf -i |
| 172 | + mkdir -p ${GITHUB_WORKSPACE}/pnetcdf_output |
| 173 | + ./configure --prefix=${GITHUB_WORKSPACE}/PnetCDF \ |
| 174 | + --enable-option-checking=fatal \ |
| 175 | + pnc_ac_debug=yes \ |
| 176 | + --with-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ |
| 177 | + --with-adios=${GITHUB_WORKSPACE}/ADIOS \ |
| 178 | + --with-mpi=${GITHUB_WORKSPACE}/MPICH \ |
| 179 | + TESTOUTDIR=${GITHUB_WORKSPACE}/pnetcdf_output |
| 180 | + make -s LIBTOOLFLAGS=--silent V=1 -j 8 tests |
| 181 | +
|
| 182 | + - name: Print config.log |
| 183 | + if: ${{ always() }} |
| 184 | + run: | |
| 185 | + cat ${GITHUB_WORKSPACE}/config.log |
| 186 | +
|
| 187 | + - name: make check |
| 188 | + if: ${{ success() }} |
| 189 | + run: | |
| 190 | + cd ${GITHUB_WORKSPACE} |
| 191 | + make -s LIBTOOLFLAGS=--silent V=1 check |
| 192 | +
|
| 193 | + - name: Print test log files |
| 194 | + if: ${{ always() }} |
| 195 | + run: | |
| 196 | + cd ${GITHUB_WORKSPACE} |
| 197 | + fname=`find src test examples benchmarks -type f -name "*.log"` |
| 198 | + for f in $fname ; do \ |
| 199 | + bname=`basename $f` ; \ |
| 200 | + if test "x$bname" != xconfig.log ; then \ |
| 201 | + echo "-------- dump $f ----------------------------" ; \ |
| 202 | + cat $f ; \ |
| 203 | + fi ; \ |
| 204 | + done |
| 205 | +
|
| 206 | + - name: make ptests |
| 207 | + if: ${{ success() }} |
| 208 | + run: | |
| 209 | + cd ${GITHUB_WORKSPACE} |
| 210 | + make -s LIBTOOLFLAGS=--silent V=1 ptests |
| 211 | +
|
| 212 | + - name: make distcheck |
| 213 | + if: ${{ success() }} |
| 214 | + run: | |
| 215 | + cd ${GITHUB_WORKSPACE} |
| 216 | + make -j 8 distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-mpi=${GITHUB_WORKSPACE}/MPICH" |
| 217 | +
|
| 218 | + - name: make install |
| 219 | + if: ${{ success() }} |
| 220 | + run: | |
| 221 | + set -x |
| 222 | + cd ${GITHUB_WORKSPACE} |
| 223 | + prefix_path=${GITHUB_WORKSPACE}/pnetcdf_install |
| 224 | + echo "---- test make install prefix=${prefix_path}" |
| 225 | + make -s LIBTOOLFLAGS=--silent V=1 install prefix=${prefix_path} |
| 226 | + test/tst_install.sh ${prefix_path} |
| 227 | + prefix_path="/pnetcdf_install" |
| 228 | + destdir_path=${GITHUB_WORKSPACE}/inst |
| 229 | + echo "---- test make install prefix=${prefix_path} DESTDIR=${destdir_path}" |
| 230 | + make -s LIBTOOLFLAGS=--silent V=1 install prefix=${prefix_path} DESTDIR=${destdir_path} |
| 231 | + test/tst_install.sh ${prefix_path} ${destdir_path} |
| 232 | +
|
| 233 | + - name: Cleanup |
| 234 | + if: ${{ always() }} |
| 235 | + run: | |
| 236 | + cd ${GITHUB_WORKSPACE} |
| 237 | + make -s LIBTOOLFLAGS=--silent V=1 distclean |
0 commit comments