CI: add test timeouts, more cmake build tests, fix VS2010 C warning
- GHA/macos: set timeout for test runs. Double the value for autotools to fit torture tests. - GHA/cygwin: reduce test run timeout for autotools. - GHA/cygwin: enable building tests with cmake. - GHA/windows: enable building tests with MSYS cmake. - GHA/windows: enable building tests with MSVC UWP. - appveyor: enable building tests with VS2008 x86 and VS2010 x64. - tests: add workaround compiler warnings when building with VS2010: ``` tests\server\util.c(482): warning C4306: 'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' of greater size tests\server\util.c(486): warning C4306: 'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' of greater size tests\server\util.c(490): warning C4306: 'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' of greater size tests\server\util.c(720): warning C4306: 'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' of greater size tests\server\util.c(726): warning C4306: 'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' of greater size tests\server\util.c(732): warning C4306: 'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' of greater size tests\server\util.c(781): warning C4306: 'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' of greater size tests\server\util.c(785): warning C4306: 'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' of greater size tests\server\util.c(789): warning C4306: 'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' of greater size ``` Ref: https://ci.appveyor.com/project/curlorg/curl/builds/50485633/job/4ujlwxod3cexmn2q#L1535 With this, tests are built in all GHA cygwin/windows jobs. Timeouts avoid long runs with runaway issues, example: https://github.com/curl/curl/actions/runs/10575522173 Closes #14700
This commit is contained in:
parent
2625360b5e
commit
d620ec6791
4
.github/workflows/cygwin.yml
vendored
4
.github/workflows/cygwin.yml
vendored
@ -51,7 +51,7 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- { build: 'automake', platform: 'x86_64', tflags: '' , config: '--enable-debug --disable-threaded-resolver', name: 'openssl' }
|
||||
- { build: 'cmake' , platform: 'x86_64', tflags: 'skipall', config: '-DCURL_USE_OPENSSL=ON', name: 'openssl R' }
|
||||
- { build: 'cmake' , platform: 'x86_64', tflags: 'skiprun', config: '-DCURL_USE_OPENSSL=ON', name: 'openssl R' }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- run: git config --global core.autocrlf input
|
||||
@ -118,7 +118,7 @@ jobs:
|
||||
|
||||
- name: 'autotools run tests'
|
||||
if: ${{ matrix.build == 'automake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
||||
timeout-minutes: 40
|
||||
timeout-minutes: 15
|
||||
run: |
|
||||
export TFLAGS='-j8 ${{ matrix.tflags }}'
|
||||
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
||||
|
||||
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
@ -253,6 +253,7 @@ jobs:
|
||||
run: make -C bld V=1 -C tests
|
||||
|
||||
- name: 'run tests'
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
export TFLAGS='${{ matrix.tflags }} -j10'
|
||||
TFLAGS+=' ~2037 ~2041' # flaky
|
||||
@ -385,6 +386,7 @@ jobs:
|
||||
run: make -C bld testdeps
|
||||
|
||||
- name: 'cmake run tests'
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
export TFLAGS='${{ matrix.build.tflags }} -j10'
|
||||
TFLAGS+=' ~2037 ~2041' # flaky
|
||||
|
||||
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@ -50,7 +50,7 @@ jobs:
|
||||
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: '!19 !504 !704 !705 !1233', config: '--enable-debug --disable-threaded-resolver', name: 'default' }
|
||||
- { build: 'cmake' , sys: 'msys' , env: 'x86_64' , tflags: 'skipall' , config: '-DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF', name: 'default' }
|
||||
- { build: 'cmake' , sys: 'msys' , env: 'x86_64' , tflags: 'skiprun' , 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', name: 'default' }
|
||||
- { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: '~472 ~1299 ~1613' , config: '--enable-debug --with-windows-unicode --enable-ares', name: 'c-ares U' }
|
||||
@ -438,7 +438,7 @@ jobs:
|
||||
arch: 'x64'
|
||||
plat: 'uwp'
|
||||
type: 'Debug'
|
||||
tflags: 'skipall'
|
||||
tflags: 'skiprun'
|
||||
config: '-DENABLE_DEBUG=ON -DENABLE_UNICODE=OFF -DCURL_USE_SCHANNEL=OFF -DCURL_BROTLI=ON -DCURL_ZSTD=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON -DCURL_USE_LIBPSL=OFF'
|
||||
- name: 'libressl'
|
||||
install: 'brotli zlib zstd libpsl nghttp2 libressl libssh2[core,zlib]'
|
||||
|
||||
@ -59,6 +59,7 @@ environment:
|
||||
ENABLE_UNICODE: 'OFF'
|
||||
HTTP_ONLY: 'OFF'
|
||||
SHARED: 'ON'
|
||||
TFLAGS: 'skiprun'
|
||||
- job_name: 'CMake, VS2022, Release, x64, OpenSSL 3.2, WebSockets, Build-only'
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
|
||||
BUILD_SYSTEM: CMake
|
||||
@ -91,6 +92,7 @@ environment:
|
||||
SCHANNEL: 'ON'
|
||||
ENABLE_UNICODE: 'OFF'
|
||||
HTTP_ONLY: 'OFF'
|
||||
TFLAGS: 'skiprun'
|
||||
- job_name: 'CMake, VS2022, Debug, x64, Schannel, Static, Unicode, Build-only'
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
|
||||
BUILD_SYSTEM: CMake
|
||||
|
||||
@ -466,6 +466,13 @@ long timediff(struct timeval newer, struct timeval older)
|
||||
|
||||
typedef void (*SIGHANDLER_T)(int);
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER == 1600
|
||||
/* Workaround for warning C4306:
|
||||
'type cast' : conversion from 'int' to 'void (__cdecl *)(int)' */
|
||||
#undef SIG_ERR
|
||||
#define SIG_ERR ((SIGHANDLER_T)(size_t)-1)
|
||||
#endif
|
||||
|
||||
#ifdef SIGHUP
|
||||
static SIGHANDLER_T old_sighup_handler = SIG_ERR;
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user