appveyor: replace PowerShell with bash + parallel autotools
PowerShell works (after a steep development curve), but one property of
it stuck and kept causing unresolvable usability issues: With
`$ErrorActionPreference=Stop`, it does abort on failures, but shows only
the first line of the error message. In `Continue` mode, it shows the
full error message, but doesn't stop on all errors. Another issue is
PowerShell considering any stderr output as if the command failed (this
has been improved in 7.2 (2021-Nov), but fixed versions aren't running
in CI and will not be for a long time in all test images.)
Thus, we're going with bash.
Also:
- use `-j2` with autotools tests, making them finish 5-15 minutes per
job faster.
- omit `POSIX_PATH_PREFIX`.
- use `WINDIR`.
- prefer forward slashes.
Follow-up to: 75078a415d #11999
Ref: #12444
Fixes #12560
Closes #12572
This commit is contained in:
parent
a6bbc87f9e
commit
2d4d0c1fd3
@ -37,7 +37,7 @@ trigger:
|
||||
- '.cirrus.yml'
|
||||
- '.github/*'
|
||||
- '.github/workflows/*'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'packages/*'
|
||||
- 'plan9/*'
|
||||
|
||||
@ -51,7 +51,7 @@ pr:
|
||||
- '.cirrus.yml'
|
||||
- '.github/*'
|
||||
- '.github/workflows/*'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'packages/*'
|
||||
- 'plan9/*'
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ freebsd_task:
|
||||
'.azure-pipelines.yml',
|
||||
'.circleci/**',
|
||||
'.github/**',
|
||||
'appveyor.yml',
|
||||
'appveyor.*',
|
||||
'CMake/**',
|
||||
'packages/**',
|
||||
'plan9/**',
|
||||
|
||||
4
.github/labeler.yml
vendored
4
.github/labeler.yml
vendored
@ -84,7 +84,7 @@ CI:
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- '.github/**'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'scripts/ci*'
|
||||
- 'tests/azure.pm'
|
||||
- 'tests/appveyor.pm'
|
||||
@ -481,7 +481,7 @@ Windows:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files:
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/Platforms/WindowsCache.cmake'
|
||||
- 'lib/*win32*'
|
||||
- 'lib/curl_multibyte.*'
|
||||
|
||||
4
.github/workflows/awslc.yml
vendored
4
.github/workflows/awslc.yml
vendored
@ -14,7 +14,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
- 'projects/**'
|
||||
@ -27,7 +27,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
- 'projects/**'
|
||||
|
||||
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
@ -14,7 +14,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'docs/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
@ -29,7 +29,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'docs/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
|
||||
4
.github/workflows/fuzz.yml
vendored
4
.github/workflows/fuzz.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
@ -31,7 +31,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
|
||||
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
@ -14,7 +14,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
- 'projects/**'
|
||||
@ -27,7 +27,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
- 'projects/**'
|
||||
|
||||
4
.github/workflows/linux32.yml
vendored
4
.github/workflows/linux32.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
@ -30,7 +30,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
|
||||
4
.github/workflows/macos.yml
vendored
4
.github/workflows/macos.yml
vendored
@ -14,7 +14,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
- 'projects/**'
|
||||
@ -27,7 +27,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
- 'projects/**'
|
||||
|
||||
4
.github/workflows/ngtcp2-linux.yml
vendored
4
.github/workflows/ngtcp2-linux.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
@ -30,7 +30,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
|
||||
4
.github/workflows/quiche-linux.yml
vendored
4
.github/workflows/quiche-linux.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
@ -30,7 +30,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
|
||||
4
.github/workflows/torture.yml
vendored
4
.github/workflows/torture.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
@ -30,7 +30,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
|
||||
4
.github/workflows/wolfssl.yml
vendored
4
.github/workflows/wolfssl.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
@ -30,7 +30,7 @@ on:
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- '.cirrus.yml'
|
||||
- 'appveyor.yml'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'packages/**'
|
||||
- 'plan9/**'
|
||||
|
||||
156
appveyor.sh
Normal file
156
appveyor.sh
Normal file
@ -0,0 +1,156 @@
|
||||
#!/usr/bin/env bash
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
# are also available at https://curl.se/docs/copyright.html.
|
||||
#
|
||||
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
# copies of the Software, and permit persons to whom the Software is
|
||||
# furnished to do so, under the terms of the COPYING file.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# shellcheck disable=SC3040,SC2039
|
||||
set -eux; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o pipefail
|
||||
|
||||
# build
|
||||
|
||||
if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = 'Visual Studio 2022' ]; then
|
||||
openssl_root_win='C:/OpenSSL-v30-Win64'
|
||||
else
|
||||
openssl_root_win='C:/OpenSSL-v111-Win64'
|
||||
fi
|
||||
openssl_root="$(cygpath -u "${openssl_root_win}")"
|
||||
|
||||
if [ "${BUILD_SYSTEM}" = 'CMake' ]; then
|
||||
options=''
|
||||
[[ "${TARGET:-}" = *'ARM64'* ]] && SKIP_RUN='ARM64 architecture'
|
||||
[ "${OPENSSL}" = 'ON' ] && options+=" -DOPENSSL_ROOT_DIR=${openssl_root_win}"
|
||||
[ "${OPENSSL}" = 'ON' ] && options+=" -DOPENSSL_ROOT_DIR=${openssl_root_win}"
|
||||
[ "${PRJ_CFG}" = 'Debug' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
|
||||
[ "${PRJ_CFG}" = 'Release' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
|
||||
[[ "${PRJ_GEN}" = *'Visual Studio'* ]] && options+=' -DCMAKE_VS_GLOBALS=TrackFileAccess=false'
|
||||
# Fails to run without this run due to missing MSVCR90.dll
|
||||
[ "${PRJ_GEN}" = 'Visual Studio 9 2008' ] && options+=' -DCURL_STATIC_CRT=ON'
|
||||
# shellcheck disable=SC2086
|
||||
cmake -B _bld "-G${PRJ_GEN}" ${TARGET:-} ${options} \
|
||||
"-DCURL_USE_OPENSSL=${OPENSSL}" \
|
||||
"-DCURL_USE_SCHANNEL=${SCHANNEL}" \
|
||||
"-DHTTP_ONLY=${HTTP_ONLY}" \
|
||||
"-DBUILD_SHARED_LIBS=${SHARED}" \
|
||||
"-DBUILD_TESTING=${TESTING}" \
|
||||
"-DENABLE_WEBSOCKETS=${WEBSOCKETS:-}" \
|
||||
"-DCMAKE_UNITY_BUILD=${UNITY}" \
|
||||
'-DCURL_WERROR=ON' \
|
||||
"-DENABLE_DEBUG=${DEBUG}" \
|
||||
"-DENABLE_UNICODE=${ENABLE_UNICODE}" \
|
||||
'-DCMAKE_INSTALL_PREFIX=C:/CURL' \
|
||||
"-DCMAKE_BUILD_TYPE=${PRJ_CFG}"
|
||||
# shellcheck disable=SC2086
|
||||
cmake --build _bld --config "${PRJ_CFG}" --parallel 2 --clean-first -- ${BUILD_OPT:-}
|
||||
if [ "${SHARED}" = 'ON' ]; then
|
||||
cp -f -p _bld/lib/*.dll _bld/src/
|
||||
fi
|
||||
if [ "${OPENSSL}" = 'ON' ]; then
|
||||
cp -f -p "${openssl_root}"/*.dll _bld/src/
|
||||
fi
|
||||
curl='_bld/src/curl.exe'
|
||||
elif [ "${BUILD_SYSTEM}" = 'VisualStudioSolution' ]; then
|
||||
(
|
||||
cd projects
|
||||
./generate.bat "${VC_VERSION}"
|
||||
msbuild.exe -maxcpucount "-property:Configuration=${PRJ_CFG}" "Windows\\${VC_VERSION}\\curl-all.sln"
|
||||
)
|
||||
curl="build/Win32/${VC_VERSION}/${PRJ_CFG}/curld.exe"
|
||||
elif [ "${BUILD_SYSTEM}" = 'winbuild_vs2015' ]; then
|
||||
./buildconf.bat
|
||||
(
|
||||
cd winbuild
|
||||
cat << EOF > _make.bat
|
||||
call "C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin/SetEnv.cmd" /x64
|
||||
call "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat" x86_amd64
|
||||
nmake -f Makefile.vc mode=dll VC=14 "SSL_PATH=${openssl_root_win}" WITH_SSL=dll MACHINE=x64 DEBUG=${DEBUG} ENABLE_UNICODE=${ENABLE_UNICODE}
|
||||
EOF
|
||||
./_make.bat
|
||||
rm _make.bat
|
||||
)
|
||||
curl="builds/libcurl-vc14-x64-${PATHPART}-dll-ssl-dll-ipv6-sspi/bin/curl.exe"
|
||||
elif [ "${BUILD_SYSTEM}" = 'winbuild_vs2017' ]; then
|
||||
./buildconf.bat
|
||||
(
|
||||
cd winbuild
|
||||
cat << EOF > _make.bat
|
||||
call "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat"
|
||||
nmake -f Makefile.vc mode=dll VC=14.10 "SSL_PATH=${openssl_root_win}" WITH_SSL=dll MACHINE=x64 DEBUG=${DEBUG} ENABLE_UNICODE=${ENABLE_UNICODE}
|
||||
EOF
|
||||
./_make.bat
|
||||
rm _make.bat
|
||||
)
|
||||
curl="builds/libcurl-vc14.10-x64-${PATHPART}-dll-ssl-dll-ipv6-sspi/bin/curl.exe"
|
||||
elif [ "${BUILD_SYSTEM}" = 'autotools' ]; then
|
||||
autoreconf -fi
|
||||
(
|
||||
mkdir _bld
|
||||
cd _bld
|
||||
# shellcheck disable=SC2086
|
||||
../configure ${CONFIG_ARGS:-}
|
||||
make -j2 V=1
|
||||
make -j2 V=1 examples
|
||||
cd tests
|
||||
make -j2 V=1
|
||||
)
|
||||
curl='_bld/src/curl.exe'
|
||||
fi
|
||||
|
||||
find . -name '*.exe' -o -name '*.dll'
|
||||
if [ -z "${SKIP_RUN:-}" ]; then
|
||||
"${curl}" --version
|
||||
else
|
||||
echo "Skip running curl.exe. Reason: ${SKIP_RUN}"
|
||||
fi
|
||||
|
||||
if false; then
|
||||
for log in CMakeFiles/CMakeConfigureLog.yaml CMakeFiles/CMakeOutput.log CMakeFiles/CMakeError.log; do
|
||||
[ -r "_bld/${log}" ] && cat "_bld/${log}"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "${TESTING}" = 'ON' ] && [ "${BUILD_SYSTEM}" = 'CMake' ]; then
|
||||
cmake --build _bld --config "${PRJ_CFG}" --parallel 2 --target testdeps
|
||||
fi
|
||||
|
||||
# test
|
||||
|
||||
if [ "${TESTING}" = 'ON' ]; then
|
||||
acurl=''
|
||||
[ -x "$(cygpath -u "C:/msys64/usr/bin/curl.exe")" ] && acurl="-ac $(cygpath -u "C:/msys64/usr/bin/curl.exe")"
|
||||
[ -x "$(cygpath -u "${WINDIR}/System32/curl.exe")" ] && acurl="-ac $(cygpath -u "${WINDIR}/System32/curl.exe")"
|
||||
if [ "${BUILD_SYSTEM}" = 'CMake' ]; then
|
||||
ls _bld/lib/*.dll >/dev/null 2>&1 && cp -f -p _bld/lib/*.dll _bld/tests/libtest/
|
||||
TFLAGS="${acurl} ${DISABLED_TESTS:-}" cmake --build _bld --config "${PRJ_CFG}" --target test-ci
|
||||
elif [ "${BUILD_SYSTEM}" = 'autotools' ]; then
|
||||
(
|
||||
cd _bld
|
||||
make -j2 V=1 TFLAGS="${acurl} ${DISABLED_TESTS:-}" test-ci
|
||||
)
|
||||
else
|
||||
(
|
||||
cd _bld/tests
|
||||
# shellcheck disable=SC2086
|
||||
./runtests.pl -a -p !flaky -r -rm ${acurl} ${DISABLED_TESTS:-}
|
||||
)
|
||||
fi
|
||||
fi
|
||||
162
appveyor.yml
162
appveyor.yml
@ -85,7 +85,6 @@ environment:
|
||||
HTTP_ONLY: 'OFF'
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!1139 !1501'
|
||||
ADD_PATH: 'C:\msys64\usr\bin'
|
||||
- job_name: 'CMake, VS2022, Debug, x64, Schannel, Static, Unicode'
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
|
||||
BUILD_SYSTEM: CMake
|
||||
@ -97,7 +96,6 @@ environment:
|
||||
HTTP_ONLY: 'OFF'
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!1139 !1501'
|
||||
ADD_PATH: 'C:\msys64\usr\bin'
|
||||
- job_name: 'CMake, VS2022, Debug, x64, no SSL, Static'
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
|
||||
BUILD_SYSTEM: CMake
|
||||
@ -109,7 +107,6 @@ environment:
|
||||
HTTP_ONLY: 'OFF'
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!1139 !1501'
|
||||
ADD_PATH: 'C:\msys64\usr\bin'
|
||||
- job_name: 'CMake, VS2022, Debug, x64, no SSL, Static, HTTP only'
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
|
||||
BUILD_SYSTEM: CMake
|
||||
@ -121,7 +118,6 @@ environment:
|
||||
HTTP_ONLY: 'ON'
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!1139 !1501'
|
||||
ADD_PATH: 'C:\msys64\usr\bin'
|
||||
# generated CMake-based MSYS Makefiles builds (mingw cross-compiling)
|
||||
- job_name: 'CMake, mingw-w64, gcc 13, Debug, x64, Schannel, Static, Unicode, Unity'
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
|
||||
@ -133,7 +129,7 @@ environment:
|
||||
HTTP_ONLY: 'OFF'
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!1086 !1139 !1451 !1501'
|
||||
ADD_PATH: 'C:\msys64\mingw64\bin;C:\msys64\usr\bin'
|
||||
ADD_PATH: 'C:/msys64/mingw64/bin'
|
||||
MSYS2_ARG_CONV_EXCL: '/*'
|
||||
BUILD_OPT: -k
|
||||
UNITY: 'ON'
|
||||
@ -147,7 +143,7 @@ environment:
|
||||
HTTP_ONLY: 'OFF'
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!1086 !1139 !1451 !1501'
|
||||
ADD_PATH: 'C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;C:\msys64\usr\bin'
|
||||
ADD_PATH: 'C:/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin'
|
||||
MSYS2_ARG_CONV_EXCL: '/*'
|
||||
BUILD_OPT: -k
|
||||
- job_name: 'CMake, mingw-w64, gcc 9, Debug, x64, Schannel, Static, Unity'
|
||||
@ -161,7 +157,7 @@ environment:
|
||||
TESTING: 'ON'
|
||||
# test 286 disabled due to https://github.com/curl/curl/issues/12040
|
||||
DISABLED_TESTS: '~286 !1086 !1139 !1451 !1501'
|
||||
ADD_PATH: 'C:\msys64\mingw64\bin;C:\msys64\usr\bin'
|
||||
ADD_PATH: 'C:/msys64/mingw64/bin'
|
||||
MSYS2_ARG_CONV_EXCL: '/*'
|
||||
BUILD_OPT: -k
|
||||
UNITY: 'ON'
|
||||
@ -175,7 +171,7 @@ environment:
|
||||
HTTP_ONLY: 'OFF'
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!1086 !1139 !1451 !1501'
|
||||
ADD_PATH: 'C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;C:\msys64\usr\bin'
|
||||
ADD_PATH: 'C:/mingw-w64/i686-6.3.0-posix-dwarf-rt_v5-rev1/mingw32/bin'
|
||||
MSYS2_ARG_CONV_EXCL: '/*'
|
||||
BUILD_OPT: -k
|
||||
# winbuild-based builds
|
||||
@ -248,21 +244,18 @@ environment:
|
||||
BUILD_SYSTEM: autotools
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!19 !1233'
|
||||
ADD_PATH: 'C:\msys64\usr\bin'
|
||||
CONFIG_ARGS: '--enable-debug --enable-werror --disable-threaded-resolver --disable-proxy --without-ssl --enable-websockets'
|
||||
- job_name: 'autotools, msys2, Debug, x86_64, no SSL'
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017'
|
||||
BUILD_SYSTEM: autotools
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!19 !504 !704 !705 !1233'
|
||||
ADD_PATH: 'C:\msys64\usr\bin'
|
||||
CONFIG_ARGS: '--enable-debug --enable-werror --disable-threaded-resolver --without-ssl --enable-websockets'
|
||||
- job_name: 'autotools, msys2, Release, x86_64, no SSL'
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017'
|
||||
BUILD_SYSTEM: autotools
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: '!19 !504 !704 !705 !1233'
|
||||
ADD_PATH: 'C:\msys64\usr\bin'
|
||||
CONFIG_ARGS: '--enable-warnings --enable-werror --without-ssl --enable-websockets'
|
||||
# autotools-based Cygwin build
|
||||
- job_name: 'autotools, cygwin, Debug, x86_64, no SSL'
|
||||
@ -270,154 +263,23 @@ environment:
|
||||
BUILD_SYSTEM: autotools
|
||||
TESTING: 'ON'
|
||||
DISABLED_TESTS: ''
|
||||
ADD_PATH: 'C:\cygwin64\bin'
|
||||
ADD_SHELL: 'C:/cygwin64/bin'
|
||||
CONFIG_ARGS: '--enable-debug --enable-werror --disable-threaded-resolver --without-ssl --enable-websockets'
|
||||
POSIX_PATH_PREFIX: '/cygdrive'
|
||||
|
||||
install:
|
||||
- ps: |
|
||||
if($env:ADD_SHELL -ne $null) {
|
||||
$env:PATH = "$env:ADD_SHELL;$env:PATH"
|
||||
}
|
||||
else {
|
||||
$env:PATH = "C:/msys64/usr/bin;$env:PATH"
|
||||
}
|
||||
if($env:ADD_PATH -ne $null) {
|
||||
$env:PATH = "$env:ADD_PATH;$env:PATH"
|
||||
}
|
||||
|
||||
build_script:
|
||||
- ps: |
|
||||
function Pull-BatchFile-Env {
|
||||
param([string]$Path, [string]$Parameters)
|
||||
$tempFile = [IO.Path]::GetTempFileName()
|
||||
cmd.exe /c " `"$Path`" $Parameters && set " > $tempFile
|
||||
Get-Content $tempFile | ForEach-Object { if($_ -match '^(.*?)=(.*)$') { Set-Content "env:\$($matches[1])" $matches[2] } }
|
||||
Remove-Item $tempFile
|
||||
}
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if($env:APPVEYOR_BUILD_WORKER_IMAGE -eq 'Visual Studio 2022') {
|
||||
$openssl_root = 'C:\OpenSSL-v30-Win64'
|
||||
}
|
||||
else {
|
||||
$openssl_root = 'C:\OpenSSL-v111-Win64'
|
||||
}
|
||||
|
||||
if($env:BUILD_SYSTEM -eq 'CMake') {
|
||||
|
||||
$options = @('-DCURL_WERROR=ON')
|
||||
$options += "-G$env:PRJ_GEN"
|
||||
if($env:TARGET -ne $null) {
|
||||
$options += "$env:TARGET"
|
||||
if($env:TARGET.Contains('ARM64')) {
|
||||
$env:SKIP_RUN = 'ARM64 architecture'
|
||||
}
|
||||
}
|
||||
$options += "-DCURL_USE_OPENSSL=$env:OPENSSL"
|
||||
if($env:OPENSSL -eq 'ON') {
|
||||
$options += "-DOPENSSL_ROOT_DIR=$openssl_root"
|
||||
}
|
||||
$options += "-DCURL_USE_SCHANNEL=$env:SCHANNEL"
|
||||
$options += "-DHTTP_ONLY=$env:HTTP_ONLY"
|
||||
$options += "-DBUILD_SHARED_LIBS=$env:SHARED"
|
||||
$options += "-DBUILD_TESTING=$env:TESTING"
|
||||
$options += "-DENABLE_WEBSOCKETS=$env:WEBSOCKETS"
|
||||
$options += "-DCMAKE_UNITY_BUILD=$env:UNITY"
|
||||
$options += "-DENABLE_DEBUG=$env:DEBUG"
|
||||
$options += "-DENABLE_UNICODE=$env:ENABLE_UNICODE"
|
||||
$options += '-DCMAKE_INSTALL_PREFIX=C:/CURL'
|
||||
$options += "-DCMAKE_BUILD_TYPE=$env:PRJ_CFG"
|
||||
if($env:PRJ_CFG -eq 'Debug') {
|
||||
$options += '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
|
||||
}
|
||||
elseif ($env:PRJ_CFG -eq 'Release') {
|
||||
$options += '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
|
||||
}
|
||||
if($env:PRJ_GEN.Contains('Visual Studio')) {
|
||||
$options += '-DCMAKE_VS_GLOBALS=TrackFileAccess=false'
|
||||
}
|
||||
if($env:PRJ_GEN -eq 'Visual Studio 9 2008') {
|
||||
# Without this it fails to run due to missing MSVCR90.dll
|
||||
$options += '-DCURL_STATIC_CRT=ON'
|
||||
}
|
||||
|
||||
Write-Host 'CMake options:' $options
|
||||
cmake -B _bld $options
|
||||
cmake --build _bld --config $env:PRJ_CFG --parallel 2 --clean-first -- $env:BUILD_OPT
|
||||
if($env:SHARED -eq 'ON') {
|
||||
Copy-Item -Path 'C:\Projects\curl\_bld\lib\*.dll' -Destination 'C:\projects\curl\_bld\src'
|
||||
}
|
||||
if($env:OPENSSL -eq 'ON') {
|
||||
Copy-Item -Path "$openssl_root\*.dll" -Destination 'C:\projects\curl\_bld\src'
|
||||
}
|
||||
$curl = '.\_bld\src\curl.exe'
|
||||
}
|
||||
elseif($env:BUILD_SYSTEM -eq 'VisualStudioSolution') {
|
||||
cd projects
|
||||
.\generate.bat $env:VC_VERSION
|
||||
msbuild.exe -maxcpucount "-property:Configuration=$env:PRJ_CFG" "Windows\$env:VC_VERSION\curl-all.sln"
|
||||
$curl = "..\build\Win32\$env:VC_VERSION\$env:PRJ_CFG\curld.exe"
|
||||
}
|
||||
elseif($env:BUILD_SYSTEM -eq 'winbuild_vs2015') {
|
||||
.\buildconf.bat
|
||||
cd winbuild
|
||||
Pull-BatchFile-Env 'C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd' /x64
|
||||
Pull-BatchFile-Env 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' x86_amd64
|
||||
nmake /nologo /f Makefile.vc mode=dll VC=14 "SSL_PATH=$openssl_root" WITH_SSL=dll MACHINE=x64 DEBUG=$env:DEBUG ENABLE_UNICODE=$env:ENABLE_UNICODE
|
||||
$curl = "..\builds\libcurl-vc14-x64-$env:PATHPART-dll-ssl-dll-ipv6-sspi\bin\curl.exe"
|
||||
}
|
||||
elseif($env:BUILD_SYSTEM -eq 'winbuild_vs2017') {
|
||||
.\buildconf.bat
|
||||
cd winbuild
|
||||
Pull-BatchFile-Env 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat'
|
||||
nmake /nologo /f Makefile.vc mode=dll VC=14.10 "SSL_PATH=$openssl_root" WITH_SSL=dll MACHINE=x64 DEBUG=$env:DEBUG ENABLE_UNICODE=$env:ENABLE_UNICODE
|
||||
$curl = "..\builds\libcurl-vc14.10-x64-$env:PATHPART-dll-ssl-dll-ipv6-sspi\bin\curl.exe"
|
||||
}
|
||||
elseif($env:BUILD_SYSTEM -eq 'autotools') {
|
||||
& bash -e -c "cd $env:POSIX_PATH_PREFIX/c/projects/curl && autoreconf -fi 2>&1 && mkdir _bld && cd _bld && ../configure $env:CONFIG_ARGS 2>&1 && make V=1 && make V=1 examples && cd tests && make V=1"
|
||||
$curl = '.\_bld\src\curl.exe'
|
||||
}
|
||||
|
||||
Get-ChildItem -Path C:\projects\curl -Include ('*.exe', '*.dll') -Recurse -Name
|
||||
if($env:SKIP_RUN -eq $null) {
|
||||
cmd.exe /c "`"$curl`" -V 2>&1"
|
||||
if(-not $?) {
|
||||
Write-Host "Error running curl: '$curl':" ("0x" + $LastExitCode.ToString("X"))
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "Skip running curl.exe. Reason: $env:SKIP_RUN"
|
||||
}
|
||||
|
||||
if($false) {
|
||||
if(Test-Path _bld/CMakeFiles/CMakeConfigureLog.yaml) { cat _bld/CMakeFiles/CMakeConfigureLog.yaml }
|
||||
if(Test-Path _bld/CMakeFiles/CMakeOutput.log) { cat _bld/CMakeFiles/CMakeOutput.log }
|
||||
if(Test-Path _bld/CMakeFiles/CMakeError.log) { cat _bld/CMakeFiles/CMakeError.log }
|
||||
if(Test-Path config.log) { cat _bld/config.log }
|
||||
}
|
||||
|
||||
if($env:TESTING -eq 'ON' -and $env:BUILD_SYSTEM -eq 'CMake') {
|
||||
cmake --build _bld --config $env:PRJ_CFG --parallel 2 --target testdeps
|
||||
}
|
||||
|
||||
test_script:
|
||||
- ps: |
|
||||
if(Test-Path 'C:/msys64/usr/bin/curl.exe') {
|
||||
$acurl="-ac $env:POSIX_PATH_PREFIX/c/msys64/usr/bin/curl.exe"
|
||||
}
|
||||
if(Test-Path 'C:/Windows/System32/curl.exe') {
|
||||
$acurl="-ac $env:POSIX_PATH_PREFIX/c/Windows/System32/curl.exe"
|
||||
}
|
||||
if($env:TESTING -eq 'ON') {
|
||||
if($env:BUILD_SYSTEM -eq 'CMake') {
|
||||
Copy-Item -Path 'C:\Projects\curl\_bld\lib\*.dll' -Destination 'C:\projects\curl\_bld\tests\libtest'
|
||||
$env:TFLAGS="$acurl $env:DISABLED_TESTS"
|
||||
cmake --build _bld --config $env:PRJ_CFG --target test-ci
|
||||
}
|
||||
elseif($env:BUILD_SYSTEM -eq 'autotools') {
|
||||
& bash -e -c "cd $env:POSIX_PATH_PREFIX/c/projects/curl/_bld && make V=1 TFLAGS='$acurl $env:DISABLED_TESTS' test-ci"
|
||||
}
|
||||
else {
|
||||
& bash -e -c "cd $env:POSIX_PATH_PREFIX/c/projects/curl/_bld/tests && ./runtests.pl -a -p !flaky -r -rm $acurl $env:DISABLED_TESTS"
|
||||
}
|
||||
}
|
||||
- cmd: sh -c ./appveyor.sh
|
||||
|
||||
clone_depth: 10
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user