Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enable plugins and byterange in GitHub Action MinGW tests #2479

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/run_tests_win_mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,34 @@ jobs:
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2
install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip mingw-w64-x86_64-libxml2 libcurl-devel curl libxml2-devel

###
# Set environmental variable
###

- run: echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig" >> $GITHUB_ENV

###
# Configure and build
###

- name: Query libcurl
run: |
echo "pkg-config libcurl --libs:"
PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config libcurl --libs
echo "pkg-config libcurl --cflags"
PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config libcurl --cflags
echo "curl-config --cflags:"
curl-config --cflags
echo "curl-config --libs"
curl-config --libs

- name: (Autotools) Run autoconf
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: CFLAGS="$(PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config libcurl --cflags)" "LDFLAGS=$(PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config libcurl --libs)" ./configure --enable-hdf5 --enable-dap --disable-dap-remote-tests --disable-static --disable-plugins --disable-byterange --disable-logging
if: ${{ success() }}

- name: (Autotools) Look at config.log if error
Expand All @@ -46,7 +63,7 @@ jobs:
run: cat libnetcdf.settings

- name: (Autotools) Build Library and Utilities
run: make -j 8 LDFLAGS="-no-undefined -Wl,--export-all-symbols"
run: make -j 8 LDFLAGS="-no-undefined -Wl,--export-all-symbols $(pkg-config libcurl --libs)" CFLAGS="$(pkg-config libcurl --cflags)"
if: ${{ success() }}

- name: (Autotools) Build and Run Tests
Expand Down
6 changes: 1 addition & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,7 @@ test "x$enable_pnetcdf" = xyes || enable_pnetcdf=no
AC_MSG_RESULT($enable_pnetcdf)

# We need curl for remote operations
AC_CHECK_LIB([curl],[curl_easy_setopt],[found_curl=yes],[found_curl=no])
if test "x$found_curl" = "xyes" ; then
AC_SEARCH_LIBS([curl_easy_setopt],[curl curl.dll cygcurl.dll], [],[])
fi
AC_SEARCH_LIBS([curl_easy_setopt],[curl curl.dll cygcurl.dll libcurl.dll libcurl.dll.a], [found_curl=yes],[found_curl=no])

## Capture the state of the --enable-dap flag => enable dap2+dap4
AC_MSG_CHECKING([whether DAP client(s) are to be built])
Expand Down Expand Up @@ -457,7 +454,6 @@ AC_MSG_RESULT($enable_set_log_level_func)

# Save/restore CFLAGS
SAVECFLAGS="$CFLAGS"
CFLAGS="${curl_cflags}"

AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include "curl/curl.h"],
Expand Down
2 changes: 2 additions & 0 deletions libncpoco/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

# Get AM_CPPFLAGS and AM_LDFLAGS
include $(top_srcdir)/lib_flags.am
libncpoco_la_CPPFLAGS = ${AM_CPPFLAGS}

#AM_CPPFLAGS += -D_LARGEFILE_SOURCE
#AM_CPPFLAGS += -I$(top_srcdir)/libsrc4 -I$(top_srcdir)/libdap4
#libnczarr_la_CPPFLAGS = ${AM_CPPFLAGS}
Expand Down
1 change: 1 addition & 0 deletions libncpoco/cp_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <errhandlingapi.h>

#include "netcdf.h"
#include "ncconfigure.h"
#include "ncpoco.h"
#include "ncpathmgr.h"

Expand Down
4 changes: 2 additions & 2 deletions plugins/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ tmp_LTLIBRARIES =
# for information regarding incrementing `-version-info`.
plugin_version_info = -version-info 0:0:0

if ISMINGW
#if ISMINGW
LDADD = ${top_builddir}/liblib/libnetcdf.la
endif
#endif

EXTRA_DIST = CMakeLists.txt

Expand Down