]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
appveyor: replace PowerShell with bash + parallel autotools
authorViktor Szakats <commit@vsz.me>
Thu, 21 Dec 2023 03:59:20 +0000 (03:59 +0000)
committerViktor Szakats <commit@vsz.me>
Thu, 21 Dec 2023 22:54:07 +0000 (22:54 +0000)
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: 75078a415d9c769419aed4153d3d525a8eba95af #11999
Ref: #12444

Fixes #12560
Closes #12572

15 files changed:
.azure-pipelines.yml
.cirrus.yml
.github/labeler.yml
.github/workflows/awslc.yml
.github/workflows/codeql-analysis.yml
.github/workflows/fuzz.yml
.github/workflows/linux.yml
.github/workflows/linux32.yml
.github/workflows/macos.yml
.github/workflows/ngtcp2-linux.yml
.github/workflows/quiche-linux.yml
.github/workflows/torture.yml
.github/workflows/wolfssl.yml
appveyor.sh [new file with mode: 0644]
appveyor.yml

index 049e46733649700ff32d4a661ca0a3f50be2b704..12ecad3f8aa95d659fcd416416de8f1193e4c0fa 100644 (file)
@@ -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/*'
 
index 8878205e5dec87499600966a6c51e7dc192c3285..3d327259c33fd9245c8be58158ad43f61ec3dddd 100644 (file)
@@ -32,7 +32,7 @@ freebsd_task:
     '.azure-pipelines.yml',
     '.circleci/**',
     '.github/**',
-    'appveyor.yml',
+    'appveyor.*',
     'CMake/**',
     'packages/**',
     'plan9/**',
index 4f87314d28207a5b9d263caaddff7cc592064314..916219c0469586857e90ec7adc57eab942e2d492 100644 (file)
@@ -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.*'
index 2505a46022f90aacb21e1633e81a49bd8988e247..c600d72d50dbd373158eb513f4b42173e0a50645 100644 (file)
@@ -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/**'
index 800b01ac9d940d1a07d06dbe98e35ad02e38eb76..40d6545882df62f35754066a1eed1aeffdbf17a9 100644 (file)
@@ -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/**'
index a382dcb6adb86ff821d33d2d083928acfe0403b2..247a1c0abe460a95bc9be930acd049c39aeed44d 100644 (file)
@@ -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/**'
index b4ad111f80e82c503eeba66461c027123b85e22d..81e489ff272519f7d5e024feb3f79eca2600c268 100644 (file)
@@ -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/**'
index 1afc9cac4f75a66102a2a5e4f23226a690925217..e3fca3d1d20dcbe1313950e2276cdb28a15a3fcd 100644 (file)
@@ -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/**'
index 4a7d6917ccaf87d9f0bff307a08ff2698bc3bcfb..49bb86cb4865da9be0dbf484ae4ba11dfda0f081 100644 (file)
@@ -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/**'
index 3be5c108f233c11626dc114646bc528684d90c3a..84149f57c10dc8af59bf131131181f56d1f2902e 100644 (file)
@@ -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/**'
index abc71a5725bdd65774346bb9c3bf9d185f1e6ae4..fd1740295eee378a640d1eaa3eb20526f3e81e59 100644 (file)
@@ -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/**'
index b5f187d8c9e7e8cc82e081db7f4409c24abe68a3..a50b37f140caa633b74a4ce3a9915d9ef7242473 100644 (file)
@@ -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/**'
index f607c0bcc832c2ab7a472d1209cd14ba6131aa93..d8f0fd4271f58bef023bbb1a292bd06446eec4c0 100644 (file)
@@ -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/**'
diff --git a/appveyor.sh b/appveyor.sh
new file mode 100644 (file)
index 0000000..4a345ff
--- /dev/null
@@ -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
index 86a5f8b64d5d2c97405005152e3a8556b4e0a60b..f4911452ae5a1b7eec36949574470f256b6b0922 100644 (file)
@@ -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_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'
+      if($env:ADD_SHELL -ne $null) {
+        $env:PATH = "$env:ADD_SHELL;$env:PATH"
       }
       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"
+        $env:PATH = "C:/msys64/usr/bin;$env:PATH"
       }
-      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
+      if($env:ADD_PATH -ne $null) {
+        $env:PATH = "$env:ADD_PATH;$env:PATH"
       }
 
-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"
-        }
-      }
+build_script:
+  - cmd: sh -c ./appveyor.sh
 
 clone_depth: 10