Skip to content

Commit 33c77f3

Browse files
authored
Merge branch 'main' into tinyxmlupdate.dmh
2 parents 3e2971d + 2767c48 commit 33c77f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1036
-475
lines changed

.github/workflows/run_tests_cdash.yml

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
###
2+
# Build hdf5 dependencies and cache them in a combined directory.
3+
###
4+
5+
name: Run CDash Ubuntu/Linux netCDF Tests
6+
7+
on: workflow_dispatch
8+
9+
concurrency:
10+
group: ${{ github.workflow}}-${{ github.head_ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
15+
build-deps-cdash:
16+
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
matrix:
21+
hdf5: [ 1.10.8, 1.12.2, 1.14.0 ]
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
26+
- name: Install System dependencies
27+
shell: bash -l {0}
28+
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 doxygen openssl
29+
30+
###
31+
# Installing libhdf5
32+
###
33+
- name: Cache libhdf5-${{ matrix.hdf5 }}
34+
id: cache-hdf5
35+
uses: actions/cache@v3
36+
with:
37+
path: ~/environments/${{ matrix.hdf5 }}
38+
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
39+
40+
41+
- name: Build libhdf5-${{ matrix.hdf5 }}
42+
if: steps.cache-hdf5.outputs.cache-hit != 'true'
43+
run: |
44+
set -x
45+
46+
wget https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.15/src/hdf-4.2.15.tar.bz2
47+
tar -jxf hdf-4.2.15.tar.bz2
48+
pushd hdf-4.2.15
49+
./configure --prefix=${HOME}/environments/${{ matrix.hdf5 }} --disable-static --enable-shared --disable-fortran --disable-netcdf --with-szlib --enable-hdf4-xdr
50+
make -j
51+
make install -j
52+
popd
53+
54+
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-$(echo ${{ matrix.hdf5 }} | cut -d. -f 1,2)/hdf5-${{ matrix.hdf5 }}/src/hdf5-${{ matrix.hdf5 }}.tar.bz2
55+
tar -jxf hdf5-${{ matrix.hdf5 }}.tar.bz2
56+
pushd hdf5-${{ matrix.hdf5 }}
57+
./configure --disable-static --enable-shared --prefix=${HOME}/environments/${{ matrix.hdf5 }} --enable-hl --with-szlib
58+
make -j
59+
make install -j
60+
popd
61+
62+
63+
build-deps-parallel:
64+
65+
runs-on: ubuntu-latest
66+
67+
strategy:
68+
matrix:
69+
hdf5: [ 1.14.0 ]
70+
71+
steps:
72+
73+
- uses: actions/checkout@v3
74+
75+
- name: Install System dependencies
76+
shell: bash -l {0}
77+
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 mpich libmpich-dev
78+
79+
###
80+
# Installing libhdf5
81+
###
82+
- name: Cache libhdf5-parallel-${{ matrix.hdf5 }}
83+
id: cache-hdf5
84+
uses: actions/cache@v3
85+
with:
86+
path: ~/environments/${{ matrix.hdf5 }}
87+
key: hdf5-parallel-${{ runner.os }}-${{ matrix.hdf5 }}
88+
89+
90+
- name: Build libhdf5-${{ matrix.hdf5 }}-pnetcdf-1.12.3
91+
if: steps.cache-hdf5.outputs.cache-hit != 'true'
92+
run: |
93+
set -x
94+
95+
wget https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.15/src/hdf-4.2.15.tar.bz2
96+
tar -jxf hdf-4.2.15.tar.bz2
97+
pushd hdf-4.2.15
98+
CC=mpicc ./configure --prefix=${HOME}/environments/${{ matrix.hdf5 }} --disable-static --enable-shared --disable-fortran --disable-netcdf --with-szlib --enable-parallel --enable-hdf4-xdr
99+
make -j
100+
make install -j
101+
popd
102+
103+
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-$(echo ${{ matrix.hdf5 }} | cut -d. -f 1,2)/hdf5-${{ matrix.hdf5 }}/src/hdf5-${{ matrix.hdf5 }}.tar.bz2
104+
tar -jxf hdf5-${{ matrix.hdf5 }}.tar.bz2
105+
pushd hdf5-${{ matrix.hdf5 }}
106+
CC=mpicc ./configure --disable-static --enable-shared --prefix=${HOME}/environments/${{ matrix.hdf5 }} --enable-hl --with-szlib --enable-parallel
107+
make -j
108+
make install -j
109+
popd
110+
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.3.tar.gz
111+
tar -zxf pnetcdf-1.12.3.tar.gz
112+
pushd pnetcdf-1.12.3
113+
CC=mpicc ./configure --disable-static --enable-shared --prefix=${HOME}/environments/${{ matrix.hdf5 }}
114+
make -j
115+
make install -j
116+
popd
117+
118+
119+
###
120+
# Run CTest Serial Script
121+
###
122+
nc-ctest-serial:
123+
needs: build-deps-cdash
124+
runs-on: ubuntu-latest
125+
environment: CDashCI
126+
127+
strategy:
128+
matrix:
129+
hdf5: [ 1.10.8, 1.12.2, 1.14.0 ]
130+
131+
steps:
132+
- uses: actions/checkout@v3
133+
with:
134+
CDASH_TOKEN: ${{ secrets.CDASH_TOKEN }}
135+
env:
136+
CDASH_TOKEN: ${{ secrets.CDASH_TOKEN }}
137+
138+
- name: Install System dependencies
139+
shell: bash -l {0}
140+
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
141+
142+
###
143+
# Set Environmental Variables
144+
###
145+
146+
- run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV
147+
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
148+
- run: echo "CTEST_OUTPUT_ON_FAILURE=1" >> $GITHUB_ENV
149+
150+
###
151+
# Fetch Cache
152+
###
153+
154+
- name: Fetch HDF Cache
155+
id: cache-hdf5
156+
uses: actions/cache@v3
157+
with:
158+
path: ~/environments/${{ matrix.hdf5 }}
159+
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
160+
161+
- name: Check Cache
162+
shell: bash -l {0}
163+
run: ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
164+
165+
- name: Run ctest serial script
166+
shell: bash -l {0}
167+
env:
168+
CDASH_TOKEN: ${{ secrets.CDASH_TOKEN }}
169+
run: |
170+
mkdir build
171+
cd build
172+
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 -V -S ../ctest_scripts/ctest_serial.ctest
173+
174+
- name: Verbose Output if CTest Failure
175+
shell: bash -l {0}
176+
run: |
177+
cd build
178+
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
179+
if: ${{ failure() }}

.github/workflows/run_tests_osx.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66

77
name: Run macOS-based netCDF Tests
88

9-
109
on: [pull_request,workflow_dispatch]
1110

11+
concurrency:
12+
group: ${{ github.workflow}}-${{ github.head_ref }}
13+
cancel-in-progress: true
14+
1215
jobs:
1316

1417
build-deps-osx:

.github/workflows/run_tests_s3.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ name: Run S3 netCDF Tests (under Ubuntu Linux)
1111

1212
on: [workflow_dispatch]
1313

14+
concurrency:
15+
group: ${{ github.workflow}}-${{ github.head_ref }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519

1620
build-deps-serial:

.github/workflows/run_tests_ubuntu.yml

Lines changed: 89 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ name: Run Ubuntu/Linux netCDF Tests
66

77
on: [pull_request, workflow_dispatch]
88

9+
concurrency:
10+
group: ${{ github.workflow}}-${{ github.head_ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014

1115
build-deps-serial:
@@ -196,6 +200,19 @@ jobs:
196200
CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j
197201
if: ${{ success() }}
198202

203+
- name: Create source distribution
204+
shell: bash -l {0}
205+
if: ${{ success() }}
206+
run: make dist -j
207+
208+
- uses: actions/upload-artifact@v3
209+
with:
210+
name: netcdf-c-autotools-source-distribution
211+
path: |
212+
*.tar*
213+
*.zip
214+
*.tgz
215+
199216
##
200217
# Parallel
201218
##
@@ -449,7 +466,28 @@ jobs:
449466
use_nczarr: [ nczarr_off, nczarr_on ]
450467
steps:
451468

452-
- uses: actions/checkout@v3
469+
- uses: actions/download-artifact@v3
470+
with:
471+
name: netcdf-c-autotools-source-distribution
472+
473+
- name: Unpack source distribution
474+
shell: bash -l {0}
475+
run: |
476+
if [ -f *.zip ];
477+
then
478+
unzip *.zip
479+
else
480+
tar xvzf $(ls *.tar* *.tgz *.zip | head -1)
481+
fi
482+
ls -d netcdf-c*
483+
for name in netcdf-c*;
484+
do
485+
if [ -d ${name} ];
486+
then
487+
cd ${name}
488+
break
489+
fi
490+
done
453491
454492
- name: Install System dependencies
455493
shell: bash -l {0}
@@ -498,41 +536,85 @@ jobs:
498536

499537
- name: Run autoconf
500538
shell: bash -l {0}
501-
run: autoreconf -if
539+
run: |
540+
for name in netcdf-c*;
541+
do
542+
if [ -d ${name} ];
543+
then
544+
cd ${name}
545+
break
546+
fi
547+
done
548+
autoreconf -if
502549
503550
- name: Configure
504551
shell: bash -l {0}
505552
run: |
553+
for name in netcdf-c*;
554+
do
555+
if [ -d ${name} ];
556+
then
557+
cd ${name}
558+
break
559+
fi
560+
done
506561
current_directory="$(pwd)"
507562
mkdir ../build
508563
cd ../build && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} "${current_directory}/configure" ${ENABLE_HDF5} ${ENABLE_DAP} ${ENABLE_NCZARR}
509564
if: ${{ success() }}
510565

511566
- name: Look at config.log if error
512567
shell: bash -l {0}
513-
run: cd ../build && cat config.log
568+
run: |
569+
if [ -d ../build ];
570+
then
571+
cd ../build
572+
else
573+
cd build
574+
fi && cat config.log
514575
if: ${{ failure() }}
515576

516577
- name: Print Summary
517578
shell: bash -l {0}
518-
run: cd ../build && cat libnetcdf.settings
579+
run: |
580+
if [ -d ../build ];
581+
then
582+
cd ../build
583+
else
584+
cd build
585+
fi && cat libnetcdf.settings
519586
520587
- name: Build Library and Utilities
521588
shell: bash -l {0}
522589
run: |
523-
cd ../build && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j
590+
if [ -d ../build ];
591+
then
592+
cd ../build
593+
else
594+
cd build
595+
fi && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j
524596
if: ${{ success() }}
525597

526598
- name: Build Tests
527599
shell: bash -l {0}
528600
run: |
529-
cd ../build && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check TESTS="" -j
601+
if [ -d ../build ];
602+
then
603+
cd ../build
604+
else
605+
cd build
606+
fi && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check TESTS="" -j
530607
if: ${{ success() }}
531608

532609
- name: Run Tests
533610
shell: bash -l {0}
534611
run: |
535-
cd ../build && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j
612+
if [ -d ../build ];
613+
then
614+
cd ../build
615+
else
616+
cd build
617+
fi && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j
536618
if: ${{ success() }}
537619

538620
nc-cmake:

.github/workflows/run_tests_win_cygwin.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Run Cygwin-based tests
22

33
on: [pull_request,workflow_dispatch]
44

5+
concurrency:
6+
group: ${{ github.workflow}}-${{ github.head_ref }}
7+
cancel-in-progress: true
8+
59
env:
610
SHELLOPTS: igncr
711
CHERE_INVOKING: 1

.github/workflows/run_tests_win_mingw.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
# for information related to github runners.
55
###
66

7-
name: Run MSYS2, MinGW64-based Tests
7+
name: Run MSYS2, MinGW64-based Tests (Not Visual Studio)
88

99
env:
1010
CPPFLAGS: "-D_BSD_SOURCE"
1111

1212
on: [pull_request,workflow_dispatch]
1313

14+
concurrency:
15+
group: ${{ github.workflow}}-${{ github.head_ref }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519

1620
build-and-test-autotools:

CMakeInstallation.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ FIND_PROGRAM(NC_DPKG NAMES dpkg)
7474
IF(NC_DPKG)
7575
# Define a macro for getting the dpkg architecture.
7676
MACRO(getdpkg_arch arch)
77-
exec_program("${NC_DPKG}" ARGS "--print-architecture" OUTPUT_VARIABLE "${arch}")
77+
execute_process(COMMAND "${NC_DPKG}" "--print-architecture" OUTPUT_VARIABLE "${arch}" OUTPUT_STRIP_TRAILING_WHITESPACE)
7878
ENDMACRO(getdpkg_arch)
7979
getdpkg_arch(dpkg_arch)
8080

0 commit comments

Comments
 (0)