strategy:
matrix:
include:
- - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !1233', config: '--enable-debug --disable-threaded-resolver --disable-proxy', name: '!proxy' }
- - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --disable-threaded-resolver', name: 'default' }
+ - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !1233', config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-proxy', name: '!proxy' }
+ - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --with-openssl --disable-threaded-resolver', name: 'default' }
- { build: 'cmake' , sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '-DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF', name: 'default' }
- - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '', name: 'default R' }
- - { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --disable-threaded-resolver --disable-curldebug --enable-static=no --without-zlib', name: 'default' }
- - { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: '' , config: '--enable-debug --enable-windows-unicode --enable-ares', name: 'c-ares U' }
+ - { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '--with-openssl', name: 'default R' }
+ - { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-curldebug --enable-static=no --without-zlib', name: 'default' }
+ - { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: '' , config: '--enable-debug --with-openssl --enable-windows-unicode --enable-ares', name: 'c-ares U' }
# FIXME: WebSockets test results ignored due to frequent failures on native Windows:
- { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: '' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_ARES=ON', type: 'Debug', name: 'schannel c-ares U' }
- { build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_CURLDEBUG=ON', type: 'Release', name: 'schannel R TrackMemory' }
- { build: 'cmake' , sys: 'clang64', env: 'clang-x86_64', tflags: 'skiprun' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_OPENSSL=ON -DENABLE_UNICODE=OFF', type: 'Release', name: 'openssl' }
- { build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON', type: 'Release', test: 'uwp', name: 'schannel' }
+ # { build: 'autotools', sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '--without-debug --with-schannel --enable-shared', type: 'Release', test: 'uwp', name: 'schannel' }
- { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DCMAKE_VERBOSE_MAKEFILE=ON', type: 'Debug', cflags: '-DCURL_SCHANNEL_DEV_DEBUG', name: 'schannel dev debug' }
- { build: 'cmake' , sys: 'mingw32', env: 'i686' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON', type: 'Release', name: 'schannel R' }
fail-fast: false
- name: 'configure'
timeout-minutes: 5
run: |
+ if [ '${{ matrix.test }}' = 'uwp' ]; then
+ CPPFLAGS='-DWINSTORECOMPAT -DWINAPI_FAMILY=WINAPI_FAMILY_APP'
+ if [[ '${{ matrix.env }}' != 'clang'* ]]; then
+ specs="$(realpath gcc-specs-uwp)"
+ gcc -dumpspecs | sed -e 's/-lmingwex/-lwindowsapp -lmingwex -lwindowsapp/' -e 's/-lmsvcrt/-lucrtapp/' > "${specs}"
+ CFLAGS="-specs=${specs}"
+ CFLAGS_CMAKE="-specs=$(cygpath -w "${specs}")"
+ fi
+ fi
if [ '${{ matrix.build }}' = 'cmake' ]; then
if [[ '${{ matrix.env }}' = 'clang'* ]]; then
options='-DCMAKE_C_COMPILER=clang'
else
options='-DCMAKE_C_COMPILER=gcc'
fi
- if [ '${{ matrix.test }}' = 'uwp' ]; then
- options+=' -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0'
- cflags='-DWINSTORECOMPAT -DWINAPI_FAMILY=WINAPI_FAMILY_APP'
- if [[ '${{ matrix.env }}' != 'clang'* ]]; then
- specs="$(realpath gcc-specs-uwp)"
- gcc -dumpspecs | sed -e 's/-lmingwex/-lwindowsapp -lmingwex -lwindowsapp/' -e 's/-lmsvcrt/-lucrtapp/' > "${specs}"
- cflags+=" -specs=$(cygpath -w "${specs}")"
- fi
- fi
+ [ '${{ matrix.test }}' = 'uwp' ] && options+=' -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0'
[ '${{ matrix.type }}' = 'Debug' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
[ '${{ matrix.type }}' = 'Release' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
cmake -B bld -G Ninja ${options} \
- "-DCMAKE_C_FLAGS=${{ matrix.cflags }} ${cflags}" \
+ "-DCMAKE_C_FLAGS=${{ matrix.cflags }} ${CFLAGS_CMAKE} ${CPPFLAGS}" \
'-DCMAKE_BUILD_TYPE=${{ matrix.type }}' \
-DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
-DCURL_WERROR=ON \
${{ matrix.config }}
else
+ export CFLAGS CPPFLAGS
mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \
--prefix="${HOME}"/install \
- --with-openssl \
--with-libssh2 \
--disable-dependency-tracking \
${{ matrix.config }}
CURL_CHECK_COMPILER
CURL_CHECK_NATIVE_WINDOWS
+
+curl_cv_winuwp='no'
+case $CPPFLAGS in
+ *-DWINSTORECOMPAT*) curl_cv_winuwp='yes';;
+esac
+
CURL_SET_COMPILER_BASIC_OPTS
CURL_SET_COMPILER_DEBUG_OPTS
CURL_SET_COMPILER_OPTIMIZE_OPTS
AC_MSG_RESULT(yes)
)
+if test "$curl_cv_winuwp" = 'yes'; then
+ AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
+ CURL_DISABLE_TELNET=1
+fi
+
AC_MSG_CHECKING([whether to support tftp])
AC_ARG_ENABLE(tftp,
AS_HELP_STRING([--enable-tftp],[Enable TFTP support])
])
fi
-if test "$HAVE_GETHOSTBYNAME" != "1"; then
+# In UWP mode gethostbyname gets detected via the core libs, but some
+# code (in6addr_any) still need ws2_32, so let us detect and add it.
+if test "$HAVE_GETHOSTBYNAME" != "1" -o "$curl_cv_winuwp" = "yes"; then
dnl This is for Winsock systems
if test "$curl_cv_native_windows" = "yes"; then
winsock_LIB="-lws2_32"
CURL_CHECK_HEADER_LDAP_SSL
if test -z "$LDAPLIBNAME"; then
- if test "$curl_cv_native_windows" = "yes"; then
+ if test "$curl_cv_native_windows" = "yes" -a "$curl_cv_winuwp" != "yes"; then
dnl Windows uses a single and unique LDAP library name
LDAPLIBNAME="wldap32"
LBERLIBNAME="no"
want_winuni="no"
if test "$curl_cv_native_windows" = "yes"; then
- AC_MSG_CHECKING([whether to enable Windows Unicode (Windows native builds only)])
- AC_ARG_ENABLE(windows-unicode,
+ if test "$curl_cv_winuwp" = 'yes'; then
+ want_winuni="yes"
+ else
+ AC_MSG_CHECKING([whether to enable Windows Unicode (Windows native builds only)])
+ AC_ARG_ENABLE(windows-unicode,
AS_HELP_STRING([--enable-windows-unicode],[Enable Windows Unicode])
AS_HELP_STRING([--disable-windows-unicode],[Disable Windows Unicode (default)]),
- [ case "$enableval" in
- yes)
- CPPFLAGS="${CPPFLAGS} -DUNICODE -D_UNICODE"
- want_winuni="yes"
- AC_MSG_RESULT([yes])
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac ],
- AC_MSG_RESULT([no])
- )
+ [ case "$enableval" in
+ yes)
+ want_winuni="yes"
+ AC_MSG_RESULT([yes])
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac ],
+ AC_MSG_RESULT([no])
+ )
+ fi
+
+ if test "$want_winuni" = "yes"; then
+ CPPFLAGS="${CPPFLAGS} -DUNICODE -D_UNICODE"
+ fi
fi
AM_CONDITIONAL([USE_UNICODE], [test "$want_winuni" = "yes"])