Skip to content

Commit 6ea721d

Browse files
authored
Merge pull request #2093 from Unidata/gh2091.wif
2091 + Github Action to test
2 parents fc53762 + 11040c5 commit 6ea721d

File tree

11 files changed

+1488
-11
lines changed

11 files changed

+1488
-11
lines changed

.github/workflows/run_tests.yml

Lines changed: 171 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
5858
nc-autotools:
5959

60-
needs: build-deps
60+
needs: [ nc-cmake-tests-oneoff, nc-ac-tests-oneoff ]
6161
runs-on: ubuntu-latest
6262

6363
strategy:
@@ -164,7 +164,7 @@ jobs:
164164

165165
nc-cmake:
166166

167-
needs: build-deps
167+
needs: [ nc-cmake-tests-oneoff, nc-ac-tests-oneoff ]
168168
runs-on: ubuntu-latest
169169

170170
strategy:
@@ -250,3 +250,172 @@ jobs:
250250
cd build
251251
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 .
252252
if: ${{ success() }}
253+
254+
- name: Verbose Output if CTest Failure
255+
shell: bash -l {0}
256+
run: |
257+
cd build
258+
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
259+
if: ${{ failure() }}
260+
261+
262+
#####
263+
# One-Off Autotools-based tests.
264+
#####
265+
nc-ac-tests-oneoff:
266+
267+
needs: build-deps
268+
runs-on: ubuntu-latest
269+
270+
strategy:
271+
matrix:
272+
hdf5: [ 1.10.7 ]
273+
steps:
274+
275+
- uses: actions/checkout@v2
276+
277+
- name: Install System dependencies
278+
shell: bash -l {0}
279+
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
280+
281+
###
282+
# Set Environmental Variables
283+
###
284+
285+
- run: echo "CFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}/include" >> $GITHUB_ENV
286+
- run: echo "LDFLAGS=-L${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
287+
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
288+
289+
290+
###
291+
# Fetch Cache
292+
###
293+
294+
- name: Fetch HDF Cache
295+
id: cache-hdf
296+
uses: actions/cache@v2
297+
with:
298+
path: ~/environments/${{ matrix.hdf5 }}
299+
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
300+
301+
- name: Check Cache
302+
shell: bash -l {0}
303+
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
304+
305+
###
306+
# Configure and build
307+
###
308+
309+
- name: Run autoconf
310+
shell: bash -l {0}
311+
run: autoreconf -if
312+
313+
- name: Configure
314+
shell: bash -l {0}
315+
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure --enable-hdf4 --enable-hdf5 --enable-dap --enable-dap-long-tests
316+
if: ${{ success() }}
317+
318+
- name: Look at config.log if error
319+
shell: bash -l {0}
320+
run: cat config.log
321+
if: ${{ failure() }}
322+
323+
- name: Print Summary
324+
shell: bash -l {0}
325+
run: cat libnetcdf.settings
326+
327+
- name: Build Library and Utilities
328+
shell: bash -l {0}
329+
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j
330+
if: ${{ success() }}
331+
332+
- name: Build Tests
333+
shell: bash -l {0}
334+
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check TESTS="" -j
335+
if: ${{ success() }}
336+
337+
- name: Run Tests
338+
shell: bash -l {0}
339+
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j
340+
if: ${{ success() }}
341+
342+
#####
343+
# One-Off CMake-based tests.
344+
#####
345+
346+
nc-cmake-tests-oneoff:
347+
348+
needs: build-deps
349+
runs-on: ubuntu-latest
350+
351+
strategy:
352+
matrix:
353+
hdf5: [ 1.10.7]
354+
355+
steps:
356+
357+
- uses: actions/checkout@v2
358+
359+
- name: Install System dependencies
360+
shell: bash -l {0}
361+
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
362+
363+
###
364+
# Set Environmental Variables
365+
###
366+
367+
- run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV
368+
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
369+
370+
###
371+
# Fetch Cache
372+
###
373+
374+
- name: Fetch HDF Cache
375+
id: cache-hdf5
376+
uses: actions/cache@v2
377+
with:
378+
path: ~/environments/${{ matrix.hdf5 }}
379+
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
380+
381+
- name: Check Cache
382+
shell: bash -l {0}
383+
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
384+
385+
###
386+
# Configure and build
387+
###
388+
389+
- name: Perform out-of-directory build
390+
shell: bash -l {0}
391+
run: |
392+
mkdir build
393+
cd build
394+
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
395+
396+
- name: Print Summary
397+
shell: bash -l {0}
398+
run: |
399+
cd build
400+
cat libnetcdf.settings
401+
402+
- name: Build All
403+
shell: bash -l {0}
404+
run: |
405+
cd build
406+
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j 12
407+
if: ${{ success() }}
408+
409+
- name: Run Tests
410+
shell: bash -l {0}
411+
run: |
412+
cd build
413+
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 .
414+
if: ${{ success() }}
415+
416+
- name: Verbose Output if CTest Failure
417+
shell: bash -l {0}
418+
run: |
419+
cd build
420+
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
421+
if: ${{ failure() }}

docs/windows-binaries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
noInstalling and Using netCDF-C Libraries in Windows {#winbin}
1+
Installing and Using netCDF-C Libraries in Windows {#winbin}
22
==================================================
33

44
\brief NetCDF-C Libraries in a Windows Environment may be used under multiple sets of circumstances.

ncdap_test/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ IF(ENABLE_TESTS)
3535
IF(BUILD_UTILITIES)
3636
add_sh_test(ncdap tst_ncdap3)
3737
add_sh_test(ncdap testpathcvt)
38-
ENDIF()
38+
SET_TESTS_PROPERTIES(ncdap_tst_ncdap3 ncdap_testpathcvt PROPERTIES RUN_SERIAL TRUE)
39+
ENDIF()
3940

4041
IF(NOT MSVC)
4142
add_bin_env_test(ncdap t_dap3a)
@@ -55,8 +56,11 @@ IF(ENABLE_TESTS)
5556
IF(ENABLE_DAP_LONG_TESTS)
5657
add_sh_test(ncdap tst_longremote3)
5758
add_bin_test(ncdap test_manyurls)
59+
SET_TESTS_PROPERTIES(ncdap_tst_longremote3 ncdap_test_manyurls PROPERTIES RUN_SERIAL TRUE)
5860
ENDIF(ENABLE_DAP_LONG_TESTS)
5961

62+
SET_TESTS_PROPERTIES(ncdap_tst_remote3 PROPERTIES RUN_SERIAL TRUE)
63+
6064
ENDIF(BUILD_UTILITIES)
6165

6266
IF(ENABLE_DAP_AUTH_TESTS)

ncdap_test/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ TESTS += test_partvar
5656

5757
if ENABLE_DAP_LONG_TESTS
5858
TESTS += tst_longremote3.sh
59+
tst_longremote3.log: tst_remote3.log
5960
check_PROGRAMS += test_manyurls
6061
TESTS += test_manyurls
62+
test_manyurls.log: tst_longremote3.log
6163
endif
6264

6365
test_partvar_SOURCES = test_partvar.c
@@ -92,7 +94,7 @@ SUBDIRS = testdata3 expected3 expectremote3
9294
EXTRA_DIST = tst_ncdap3.sh \
9395
tst_remote3.sh \
9496
tst_longremote3.sh \
95-
tst_zero_len_var.sh \
97+
tst_zero_len_var.sh \
9698
tst_filelists.sh tst_urls.sh tst_utils.sh \
9799
t_dap.c CMakeLists.txt tst_formatx.sh testauth.sh testurl.sh \
98100
t_ncf330.c tst_ber.sh tst_fillmismatch.sh tst_encode.sh testpathcvt.sh \

0 commit comments

Comments
 (0)