Merge pull request #2093 from Unidata/gh2091.wif

2091 + Github Action to test
This commit is contained in:
Ward Fisher 2021-08-25 16:03:27 -06:00 committed by GitHub
commit 6ea721dddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 1488 additions and 11 deletions

View File

@ -57,7 +57,7 @@ jobs:
nc-autotools:
needs: build-deps
needs: [ nc-cmake-tests-oneoff, nc-ac-tests-oneoff ]
runs-on: ubuntu-latest
strategy:
@ -164,7 +164,7 @@ jobs:
nc-cmake:
needs: build-deps
needs: [ nc-cmake-tests-oneoff, nc-ac-tests-oneoff ]
runs-on: ubuntu-latest
strategy:
@ -250,3 +250,172 @@ jobs:
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 .
if: ${{ success() }}
- name: Verbose Output if CTest Failure
shell: bash -l {0}
run: |
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
if: ${{ failure() }}
#####
# One-Off Autotools-based tests.
#####
nc-ac-tests-oneoff:
needs: build-deps
runs-on: ubuntu-latest
strategy:
matrix:
hdf5: [ 1.10.7 ]
steps:
- uses: actions/checkout@v2
- name: Install System dependencies
shell: bash -l {0}
run: sudo apt update && sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev
###
# Set Environmental Variables
###
- run: echo "CFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}/include" >> $GITHUB_ENV
- run: echo "LDFLAGS=-L${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
###
# Fetch Cache
###
- name: Fetch HDF Cache
id: cache-hdf
uses: actions/cache@v2
with:
path: ~/environments/${{ matrix.hdf5 }}
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
- name: Check Cache
shell: bash -l {0}
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
###
# Configure and build
###
- name: Run autoconf
shell: bash -l {0}
run: autoreconf -if
- name: Configure
shell: bash -l {0}
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure --enable-hdf4 --enable-hdf5 --enable-dap --enable-dap-long-tests
if: ${{ success() }}
- name: Look at config.log if error
shell: bash -l {0}
run: cat config.log
if: ${{ failure() }}
- name: Print Summary
shell: bash -l {0}
run: cat libnetcdf.settings
- name: Build Library and Utilities
shell: bash -l {0}
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j
if: ${{ success() }}
- name: Build Tests
shell: bash -l {0}
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check TESTS="" -j
if: ${{ success() }}
- name: Run Tests
shell: bash -l {0}
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j
if: ${{ success() }}
#####
# One-Off CMake-based tests.
#####
nc-cmake-tests-oneoff:
needs: build-deps
runs-on: ubuntu-latest
strategy:
matrix:
hdf5: [ 1.10.7]
steps:
- uses: actions/checkout@v2
- name: Install System dependencies
shell: bash -l {0}
run: sudo apt update && sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev
###
# Set Environmental Variables
###
- run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
###
# Fetch Cache
###
- name: Fetch HDF Cache
id: cache-hdf5
uses: actions/cache@v2
with:
path: ~/environments/${{ matrix.hdf5 }}
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
- name: Check Cache
shell: bash -l {0}
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
###
# Configure and build
###
- name: Perform out-of-directory build
shell: bash -l {0}
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DENABLE_HDF4=TRUE -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D ENABLE_DAP_LONG_TESTS=TRUE
- name: Print Summary
shell: bash -l {0}
run: |
cd build
cat libnetcdf.settings
- name: Build All
shell: bash -l {0}
run: |
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j 12
if: ${{ success() }}
- name: Run Tests
shell: bash -l {0}
run: |
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 .
if: ${{ success() }}
- name: Verbose Output if CTest Failure
shell: bash -l {0}
run: |
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
if: ${{ failure() }}

View File

@ -1,4 +1,4 @@
noInstalling and Using netCDF-C Libraries in Windows {#winbin}
Installing and Using netCDF-C Libraries in Windows {#winbin}
==================================================
\brief NetCDF-C Libraries in a Windows Environment may be used under multiple sets of circumstances.

View File

@ -35,7 +35,8 @@ IF(ENABLE_TESTS)
IF(BUILD_UTILITIES)
add_sh_test(ncdap tst_ncdap3)
add_sh_test(ncdap testpathcvt)
ENDIF()
SET_TESTS_PROPERTIES(ncdap_tst_ncdap3 ncdap_testpathcvt PROPERTIES RUN_SERIAL TRUE)
ENDIF()
IF(NOT MSVC)
add_bin_env_test(ncdap t_dap3a)
@ -55,8 +56,11 @@ IF(ENABLE_TESTS)
IF(ENABLE_DAP_LONG_TESTS)
add_sh_test(ncdap tst_longremote3)
add_bin_test(ncdap test_manyurls)
SET_TESTS_PROPERTIES(ncdap_tst_longremote3 ncdap_test_manyurls PROPERTIES RUN_SERIAL TRUE)
ENDIF(ENABLE_DAP_LONG_TESTS)
SET_TESTS_PROPERTIES(ncdap_tst_remote3 PROPERTIES RUN_SERIAL TRUE)
ENDIF(BUILD_UTILITIES)
IF(ENABLE_DAP_AUTH_TESTS)

View File

@ -56,8 +56,10 @@ TESTS += test_partvar
if ENABLE_DAP_LONG_TESTS
TESTS += tst_longremote3.sh
tst_longremote3.log: tst_remote3.log
check_PROGRAMS += test_manyurls
TESTS += test_manyurls
test_manyurls.log: tst_longremote3.log
endif
test_partvar_SOURCES = test_partvar.c
@ -92,7 +94,7 @@ SUBDIRS = testdata3 expected3 expectremote3
EXTRA_DIST = tst_ncdap3.sh \
tst_remote3.sh \
tst_longremote3.sh \
tst_zero_len_var.sh \
tst_zero_len_var.sh \
tst_filelists.sh tst_urls.sh tst_utils.sh \
t_dap.c CMakeLists.txt tst_formatx.sh testauth.sh testurl.sh \
t_ncf330.c tst_ber.sh tst_fillmismatch.sh tst_encode.sh testpathcvt.sh \

1302
ncdap_test/manyurls.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@ VALGRIND="valgrind -q --error-exitcode=2 --leak-check=full"
fi
rm -fr ${RESULTSDIR}
mkdir "${RESULTSDIR}"
mkdir -p "${RESULTSDIR}"
rm -f ./.dodsrc ./.ocrc ./.daprc
passcount=0

View File

@ -34,7 +34,7 @@ EXPECTED="$expected3"
RESULTSDIR="file_results"
rm -fr ${RESULTSDIR}
mkdir "${RESULTSDIR}"
mkdir -p "${RESULTSDIR}"
echo "*** Testing $TITLE "
echo " Base URL: ${TESTURL}"

View File

@ -195,7 +195,7 @@ fi
if test "x$timing" = "x1" ; then TIMECMD="time"; else TIMECMD=""; fi
rm -fr ${RESULTSDIR}
mkdir "${RESULTSDIR}"
mkdir -p "${RESULTSDIR}"
passcount=0
xfailcount=0

View File

@ -26,7 +26,7 @@ EXPECTED="$expected3"
RESULTSDIR="remote_results"
rm -fr ${RESULTSDIR}
mkdir "${RESULTSDIR}"
mkdir -p "${RESULTSDIR}"
echo "*** Testing $TITLE "
echo " Base URL: ${DTS}"

View File

@ -69,7 +69,7 @@ VALGRIND="valgrind -q --error-exitcode=2 --leak-check=full"
fi
rm -fr ${RESULTSDIR}
mkdir "${RESULTSDIR}"
mkdir -p "${RESULTSDIR}"
passcount=0
xfailcount=0

View File

@ -96,7 +96,7 @@ VALGRIND="valgrind -q --error-exitcode=2 --leak-check=full"
fi
rm -fr ${RESULTSDIR}
mkdir "${RESULTSDIR}"
mkdir -p "${RESULTSDIR}"
passcount=0
xfailcount=0