Skip to content

Commit e57e742

Browse files
authored
Merge pull request #2529 from DWesl/cygwin-ci-no-install-plugins
Add Cygwin CI and stop installing unwanted plugins
2 parents 7de5b8f + 4c1a39b commit e57e742

16 files changed

Lines changed: 343 additions & 146 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Run Cygwin-based tests
2+
3+
on: [pull_request, workflow_dispatch]
4+
5+
env:
6+
SHELLOPTS: igncr
7+
CHERE_INVOKING: 1
8+
CYGWIN_NOWINPATH: 1
9+
10+
jobs:
11+
build-and-test-autotools:
12+
runs-on: windows-latest
13+
defaults:
14+
run:
15+
shell: bash -eo pipefail -o igncr "{0}"
16+
17+
name: Cygwin-based Autotools tests
18+
19+
steps:
20+
- name: Fix line endings
21+
run: git config --global core.autocrlf input
22+
23+
- uses: actions/checkout@v2
24+
25+
- uses: cygwin/cygwin-install-action@v2
26+
with:
27+
platform: x86_64
28+
packages: >-
29+
git automake libtool autoconf2.5 make libhdf5-devel
30+
libhdf4-devel zipinfo libxml2-devel perl zlib-devel
31+
libzstd-devel libbz2-devel libaec-devel libzip-devel
32+
libdeflate-devel gcc-core
33+
34+
- name: (Autotools) Run autoconf and friends
35+
run: |
36+
cp -f /bin/dash /bin/sh
37+
mkdir m4
38+
/bin/dash /usr/bin/libtoolize --force --copy --verbose
39+
/usr/bin/autoreconf-2.69 --force --install --verbose --debug
40+
41+
- name: (Autotools) Configure in-tree build
42+
run: >-
43+
/bin/dash ./configure --enable-hdf5 --enable-shared
44+
--disable-static --enable-dap --disable-dap-remote-tests
45+
--enable-plugins --disable-nczarr-filters
46+
--disable-nczarr-s3 --disable-nczarr-s3-tests --disable-nczarr
47+
48+
- name: Look at config.log if error
49+
if: ${{ failure() }}
50+
run: cat config.log
51+
52+
- name: Print summary
53+
run: cat libnetcdf.settings
54+
55+
- name: (Autotools) Build library and utilities
56+
run: make -j8 SHELL=/bin/dash
57+
58+
- name: (Autotools) Test DESTDIR install
59+
run: |
60+
make install DESTDIR=/tmp/pretend-root SHELL=/bin/dash
61+
if [ -d "/tmp/pretend-root/$(pwd)" ];
62+
then
63+
find /tmp/pretend-root/$(pwd)
64+
if [ $(find /tmp/pretend-root/$(pwd) -type f | wc -l) -gt 0 ]; then exit 1; fi
65+
fi
66+
67+
- name: (Autotools) Build and run tests
68+
timeout-minutes: 30
69+
run: make check -j8 SHELL=/bin/dash

.github/workflows/run_tests_win_mingw.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66

77
name: Run MSYS2, MinGW64-based Tests
88

9+
env:
10+
CPPFLAGS: "-D_BSD_SOURCE"
911

1012
on: [pull_request, workflow_dispatch]
1113

1214
jobs:
1315

14-
build-and-test:
16+
build-and-test-autotools:
1517

1618
runs-on: windows-latest
1719
defaults:
@@ -35,7 +37,7 @@ jobs:
3537
run: autoreconf -if
3638

3739
- name: (Autotools) Configure Build
38-
run: ./configure --enable-hdf5 --enable-dap --disable-dap-remote-tests --disable-static --disable-plugins --disable-byterange --disable-dap-remote-tests --disable-logging
40+
run: ./configure --enable-hdf5 --enable-dap --disable-dap-remote-tests --disable-static --disable-byterange --disable-dap-remote-tests --disable-logging --enable-plugins --disable-nczarr-filters --disable-nczarr-s3 --disable-nczarr-s3-tests
3941
if: ${{ success() }}
4042

4143
- name: (Autotools) Look at config.log if error
@@ -46,9 +48,24 @@ jobs:
4648
run: cat libnetcdf.settings
4749

4850
- name: (Autotools) Build Library and Utilities
49-
run: make -j 8 LDFLAGS="-no-undefined -Wl,--export-all-symbols"
51+
run: make -j 8 LDFLAGS="-Wl,--export-all-symbols"
5052
if: ${{ success() }}
5153

54+
- name: Check for plugins
55+
run: |
56+
dir ./plugins
57+
dir ./plugins/.libs
58+
5259
- name: (Autotools) Build and Run Tests
53-
run: make check -j 8
60+
run: make check -j 8 LDFLAGS="-Wl,--export-all-symbols"
5461
if: ${{ success() }}
62+
id: tests
63+
64+
- name: Upload test failures
65+
if: ${{ failure() && steps.tests.conclusion == 'failure' }}
66+
uses: actions/upload-artifact@v3
67+
with:
68+
name: mingw-autotools-test-logs
69+
path: |
70+
*/*.log
71+
*/*.trs

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@ dap4_test/findtestserver4.c
1616
dap4_test/pingurl4.c
1717
ncdap_test/findtestserver.c
1818

19+
Makefile.in
20+
aclocal.m4
21+
compile
22+
config.guess
23+
config.h.in
24+
config.sub
25+
configure
26+
depcomp
27+
install-sh
28+
ltmain.sh
29+
m4
30+
missing
31+
test-driver
32+
1933
#####
2034
# End ignored generated files.
2135
#####

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake DESTINATION ${CMAKE_CURR
215215

216216
# Set Memory test program for non-MSVC based builds.
217217
# Assume valgrind for now.
218-
IF((NOT MSVC) AND (NOT MINGW))
218+
IF((NOT MSVC) AND (NOT MINGW) AND (NOT ISCYGWIN))
219219
SET(CTEST_MEMORYCHECK_COMMAND valgrind CACHE STRING "")
220220
ENDIF()
221221

RELEASE_NOTES.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,13 @@ See [GitHub #1251](https://github.com/Unidata/netcdf-c/issues/1251).
277277
### 4.5.0-rc1 - June 5, 2017
278278

279279
* [Enhancement] DAP4 is now included. Since dap2 is the default for urls, dap4 must be specified by
280-
(1) using "dap4:" as the url protocol, or
281-
(2) appending "#protocol=dap4" to the end of the url, or
282-
(3) appending "#dap4" to the end of the url
283-
Note that dap4 is enabled by default but remote-testing is
284-
disabled until the testserver situation is resolved.
280+
1. using "dap4:" as the url protocol, or
281+
2. appending "\#protocol=dap4" to the end of the url, or
282+
3. appending "\#dap4" to the end of the url
283+
284+
Note that dap4 is enabled by default but remote-testing is
285+
disabled until the testserver situation is resolved.
286+
285287
* [Enhancement] The remote testing server can now be specified with the `--with-testserver` option to ./configure.
286288
* [Enhancement] Modified netCDF4 to use ASCII for NC_CHAR. See [Github Pull request #316](https://github.com/Unidata/netcdf-c/pull/316) for more information.
287289
* [Bug Fix] Corrected an error with how dimsizes might be read. See [Github #410](https://github.com/unidata/netcdf-c/issues/410) for more information.

configure.ac

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,15 @@ AM_INIT_AUTOMAKE([foreign dist-zip subdir-objects])
102102
AC_CONFIG_SRCDIR([include/netcdf.h])
103103

104104
# Figure out platforms of special interest
105-
case "`uname`" in
106-
CYGWIN*) ISCYGWIN=yes;;
107-
Darwin*) ISOSX=yes;;
108-
WIN*) ISMSVC=yes;;
109-
MINGW*) ISMINGW=yes;;
110-
MSYS*) ISMINGW=yes;;
111-
esac
105+
AC_CANONICAL_HOST
106+
AS_CASE([$host],
107+
[*-*-cygwin], [ISCYGWIN=yes],
108+
[*-*-darwin*], [ISOSX=yes],
109+
[*-*-mingw*], [ISMINGW=yes],
110+
[*-*-msys], [ISMINGW=yes],
111+
[*-*-win*], [ISMSVC=yes],
112+
[]
113+
)
112114

113115
if test "x$MSYSTEM" != x ; then
114116
ISMINGW=yes

docs/filters.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ This means that some mechanism is needed to translate between the HDF5 id+parame
438438
3. It must be possible to modify the set of visible parameters in response to environment information such as the type of the associated variable; this is required to mimic the corresponding HDF5 capability.
439439
4. It must be possible to use filters even if HDF5 support is disabled.
440440

441-
Note that the term "visible parameters" is used here to refer to the parameters provided by "nc_def_var_filter" or those stored in the dataset's metadata as provided by the JSON codec. The term "working parameters" refers to the parameters given to the compressor itself and derived from the visible parameters.
441+
Note that the term "visible parameters" is used here to refer to the parameters provided by `nc_def_var_filter` or those stored in the dataset's metadata as provided by the JSON codec. The term "working parameters" refers to the parameters given to the compressor itself and derived from the visible parameters.
442442

443443
The standard authority for defining Zarr filters is the list supported by the NumCodecs project [7].
444444
Comparing the set of standard filters (aka codecs) defined by NumCodecs to the set of standard filters defined by HDF5 [3], it can be seen that the two sets overlap, but each has filters not defined by the other.
@@ -514,8 +514,8 @@ This interrogation operates by seeing if certain well-known (function) names are
514514

515515
There will be two library types:
516516

517-
1. HDF5 — exports a specific API: "H5Z_plugin_type" and "H5Z_get_plugin_info".
518-
2. Codec — exports a specific API: "NCZ_get_codec_info"
517+
1. HDF5 — exports a specific API: `H5Z_plugin_type` and `H5Z_get_plugin_info`.
518+
2. Codec — exports a specific API: `NCZ_get_codec_info`
519519

520520
Note that a given library can export either or both of these APIs.
521521
This means that we can have three types of libraries:
@@ -605,7 +605,7 @@ is stored in the JSON dictionary form described earlier.
605605

606606
The Codec style, using JSON, has the ability to provide very complex parameters that may be hard to encode as a vector of unsigned integers.
607607
It might be desirable to consider exporting a JSON-base API out of the netcdf-c API to support user access to this complexity.
608-
This would mean providing some alternate version of "nc_def_var_filter" that takes a string-valued argument instead of a vector of unsigned ints.
608+
This would mean providing some alternate version of `nc_def_var_filter` that takes a string-valued argument instead of a vector of unsigned ints.
609609
This extension is unlikely to be implemented until a compelling use-case is encountered.
610610

611611
One bad side-effect of this is that we then may have two classes of plugins.
@@ -812,7 +812,7 @@ The h5 tag indicates that they assume that the result of the parse is a set of u
812812
* idp will contain the first constant — the filter id
813813
* nparamsp will contain the number of params
814814
* paramsp will contain a vector of params — the caller must free
815-
This function can parse single filter spec strings as defined in the section on \ref filters_syntax.
815+
This function can parse single filter spec strings as defined in the section on [Filter Specification Syntax](#filters_syntax).
816816
2. *int ncaux\_h5filterspec\_parselist(const char* txt, int* formatp, size\_t* nspecsp, struct NC\_H5\_Filterspec*** vectorp);*
817817
* txt contains the text of a sequence '|' separated filter specs.
818818
* formatp currently always returns 0.
@@ -852,7 +852,7 @@ The include file *netcdf\_meta.h* contains the following definition.
852852
````
853853
#define NC_HAS_MULTIFILTERS 1
854854
````
855-
This, in conjunction with the error code *NC\_ENOFILTER* in *netcdf.h* can be used to see what filter mechanism is in place as described in the section on \ref filters_compatibility.
855+
This, in conjunction with the error code *NC\_ENOFILTER* in *netcdf.h* can be used to see what filter mechanism is in place as described in the section on [incompatibities](#filters_compatibility).
856856

857857
1. !defined(NC\_ENOFILTER) && !defined(NC\_HAS\_MULTIFILTERS) — indicates that the old pre-4.7.4 mechanism is in place.
858858
It does not support multiple filters.

0 commit comments

Comments
 (0)