-
Notifications
You must be signed in to change notification settings - Fork 292
Add Cygwin CI and stop installing unwanted plugins #2529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
844480a
a69308e
086eed0
0eed60a
927829e
f000e15
1ef000c
5c9722f
c805b02
d33e315
a71c606
8b600d3
543e27c
b85c929
adde7f5
a6d0bcc
f28dcaa
18b76ba
a0aa2b3
4046afd
1ed8ab1
fb02ff8
4ef6874
3b74e0b
4c1a39b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Run Cygwin-based tests | ||
|
|
||
| on: [pull_request, workflow_dispatch] | ||
|
|
||
| env: | ||
| SHELLOPTS: igncr | ||
| CHERE_INVOKING: 1 | ||
| CYGWIN_NOWINPATH: 1 | ||
|
|
||
| jobs: | ||
| build-and-test-autotools: | ||
| runs-on: windows-latest | ||
| defaults: | ||
| run: | ||
| shell: bash -eo pipefail -o igncr "{0}" | ||
|
|
||
| name: Cygwin-based Autotools tests | ||
|
|
||
| steps: | ||
| - name: Fix line endings | ||
| run: git config --global core.autocrlf input | ||
|
|
||
| - uses: actions/checkout@v2 | ||
|
|
||
| - uses: cygwin/cygwin-install-action@v2 | ||
| with: | ||
| platform: x86_64 | ||
| packages: >- | ||
| git automake libtool autoconf2.5 make libhdf5-devel | ||
| libhdf4-devel zipinfo libxml2-devel perl zlib-devel | ||
| libzstd-devel libbz2-devel libaec-devel libzip-devel | ||
| libdeflate-devel gcc-core | ||
|
|
||
| - name: (Autotools) Run autoconf and friends | ||
| run: | | ||
| cp -f /bin/dash /bin/sh | ||
| mkdir m4 | ||
| /bin/dash /usr/bin/libtoolize --force --copy --verbose | ||
| /usr/bin/autoreconf-2.69 --force --install --verbose --debug | ||
|
|
||
| - name: (Autotools) Configure in-tree build | ||
| run: >- | ||
| /bin/dash ./configure --enable-hdf5 --enable-shared | ||
| --disable-static --enable-dap --disable-dap-remote-tests | ||
| --enable-plugins --disable-nczarr-filters | ||
| --disable-nczarr-s3 --disable-nczarr-s3-tests --disable-nczarr | ||
|
|
||
| - name: Look at config.log if error | ||
| if: ${{ failure() }} | ||
| run: cat config.log | ||
|
|
||
| - name: Print summary | ||
| run: cat libnetcdf.settings | ||
|
|
||
| - name: (Autotools) Build library and utilities | ||
| run: make -j8 SHELL=/bin/dash | ||
|
|
||
| - name: (Autotools) Test DESTDIR install | ||
| run: | | ||
| make install DESTDIR=/tmp/pretend-root SHELL=/bin/dash | ||
| if [ -d "/tmp/pretend-root/$(pwd)" ]; | ||
| then | ||
| find /tmp/pretend-root/$(pwd) | ||
| if [ $(find /tmp/pretend-root/$(pwd) -type f | wc -l) -gt 0 ]; then exit 1; fi | ||
| fi | ||
|
|
||
| - name: (Autotools) Build and run tests | ||
| timeout-minutes: 30 | ||
| run: make check -j8 SHELL=/bin/dash |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,12 +6,14 @@ | |
|
|
||
| name: Run MSYS2, MinGW64-based Tests | ||
|
|
||
| env: | ||
| CPPFLAGS: "-D_BSD_SOURCE" | ||
|
|
||
| on: [pull_request, workflow_dispatch] | ||
|
|
||
| jobs: | ||
|
|
||
| build-and-test: | ||
| build-and-test-autotools: | ||
|
|
||
| runs-on: windows-latest | ||
| defaults: | ||
|
|
@@ -35,7 +37,7 @@ jobs: | |
| run: autoreconf -if | ||
|
|
||
| - name: (Autotools) Configure Build | ||
| run: ./configure --enable-hdf5 --enable-dap --disable-dap-remote-tests --disable-static --disable-plugins --disable-byterange --disable-dap-remote-tests --disable-logging | ||
| 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 | ||
| if: ${{ success() }} | ||
|
|
||
| - name: (Autotools) Look at config.log if error | ||
|
|
@@ -46,9 +48,24 @@ jobs: | |
| run: cat libnetcdf.settings | ||
|
|
||
| - name: (Autotools) Build Library and Utilities | ||
| run: make -j 8 LDFLAGS="-no-undefined -Wl,--export-all-symbols" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why remove the -no-undefined?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's already in the I tried removing |
||
| run: make -j 8 LDFLAGS="-Wl,--export-all-symbols" | ||
| if: ${{ success() }} | ||
|
|
||
| - name: Check for plugins | ||
| run: | | ||
| dir ./plugins | ||
| dir ./plugins/.libs | ||
|
|
||
| - name: (Autotools) Build and Run Tests | ||
| run: make check -j 8 | ||
| run: make check -j 8 LDFLAGS="-Wl,--export-all-symbols" | ||
| if: ${{ success() }} | ||
| id: tests | ||
|
|
||
| - name: Upload test failures | ||
| if: ${{ failure() && steps.tests.conclusion == 'failure' }} | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: mingw-autotools-test-logs | ||
| path: | | ||
| */*.log | ||
| */*.trs | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,20 @@ dap4_test/findtestserver4.c | |
| dap4_test/pingurl4.c | ||
| ncdap_test/findtestserver.c | ||
|
|
||
| Makefile.in | ||
| aclocal.m4 | ||
| compile | ||
| config.guess | ||
| config.h.in | ||
| config.sub | ||
| configure | ||
| depcomp | ||
| install-sh | ||
| ltmain.sh | ||
| m4 | ||
| missing | ||
| test-driver | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure that test--driver and ltmain.sh should be ignored?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the developers' git repository? Almost certainly. For release tarballs (made with On a related note, what is the policy on building GitHub's automatic repository tarballs? Do you assume everyone has a full Autotools or CMake install (the assumption I made here) or only POSIX Make and Bourne Shell (the assumption made for Autotools release tarballs)?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We turn on maintainer mode in the release branches, so full installs should not be required. A lot of the generated files are explicitly kept out of version tracking, and only added to the 'v[xyz]-release' branch which gets tagged.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will help keep the generated files out of version tracking, but will make adding them to the release branches a bit trickier unless the release branches drop this part of the E.g. # Autotools-generated files
# Delete this section on release branches |
||
|
|
||
| ##### | ||
| # End ignored generated files. | ||
| ##### | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,21 +102,23 @@ AM_INIT_AUTOMAKE([foreign dist-zip subdir-objects]) | |
| AC_CONFIG_SRCDIR([include/netcdf.h]) | ||
|
|
||
| # Figure out platforms of special interest | ||
| case "`uname`" in | ||
| CYGWIN*) ISCYGWIN=yes;; | ||
| Darwin*) ISOSX=yes;; | ||
| WIN*) ISMSVC=yes;; | ||
| MINGW*) ISMINGW=yes;; | ||
| MSYS*) ISMINGW=yes;; | ||
| esac | ||
| AC_CANONICAL_HOST | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I vaguely recall that we had problems in the past using AC_CANONICAL_HOST.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It won't auto-discover MSVC, but it should help with #2396, since the current assumption made in using |
||
| AS_CASE([$host], | ||
| [*-*-cygwin], [ISCYGWIN=yes], | ||
| [*-*-darwin*], [ISOSX=yes], | ||
| [*-*-mingw*], [ISMINGW=yes], | ||
| [*-*-msys], [ISMINGW=yes], | ||
| [*-*-win*], [ISMSVC=yes], | ||
| [] | ||
| ) | ||
|
|
||
| if test "x$MSYSTEM" != x ; then | ||
| ISMINGW=yes | ||
| ISMSYS=yes | ||
| fi | ||
|
|
||
| # Get windows version info | ||
| if text "x$ISMSVC" = xyes ; then | ||
| if test "x$ISMSVC" = xyes ; then | ||
| WINVER=`systeminfo | sed -e '/^OS Version:/p' -ed | sed -e 's|[^0-9]*\([0-9.]*\).*|\1|'` | ||
| else | ||
| WINVER="0.0.0" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.