update actions/upload-artifact digest to 0b2256b update actions/download-artifact digest to fa0a91b Closes #14111 Closes #14110
568 lines
24 KiB
YAML
568 lines
24 KiB
YAML
# Copyright (C) Viktor Szakats
|
|
#
|
|
# SPDX-License-Identifier: curl
|
|
|
|
name: windows
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- '*/ci'
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '.azure-pipelines.yml'
|
|
- '.circleci/**'
|
|
- '.cirrus.yml'
|
|
- 'appveyor.*'
|
|
- 'packages/**'
|
|
- 'plan9/**'
|
|
- 'projects/**'
|
|
- 'winbuild/**'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '.azure-pipelines.yml'
|
|
- '.circleci/**'
|
|
- '.cirrus.yml'
|
|
- 'appveyor.*'
|
|
- 'packages/**'
|
|
- 'plan9/**'
|
|
- 'projects/**'
|
|
- 'winbuild/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
cygwin:
|
|
name: 'cygwin (${{ matrix.build }}, ${{ matrix.platform }}, ${{ matrix.config }})'
|
|
runs-on: windows-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
SHELLOPTS: 'igncr'
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { build: 'automake', platform: 'x86_64', tflags: '' , config: '--enable-debug --disable-threaded-resolver' }
|
|
- { build: 'cmake' , platform: 'x86_64', tflags: 'skipall', config: '-DCURL_USE_OPENSSL=ON' }
|
|
fail-fast: false
|
|
steps:
|
|
- run: git config --global core.autocrlf input
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
|
- uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # v4
|
|
with:
|
|
platform: ${{ matrix.platform }}
|
|
# https://cygwin.com/cgi-bin2/package-grep.cgi
|
|
packages: autoconf libtool ${{ matrix.build }} gcc-core gcc-g++ binutils make libssl-devel zlib-devel libbrotli-devel libnghttp2-devel libpsl-devel libssh2-devel
|
|
site: https://mirrors.kernel.org/sourceware/cygwin/
|
|
|
|
- name: 'autotools configure'
|
|
if: ${{ matrix.build == 'automake' }}
|
|
timeout-minutes: 5
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
export PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32"
|
|
autoreconf -fi
|
|
mkdir bld && cd bld && ../configure --enable-warnings --enable-werror \
|
|
--prefix="${HOME}"/install \
|
|
--enable-websockets \
|
|
--with-openssl \
|
|
--with-libssh2 \
|
|
--disable-dependency-tracking \
|
|
${{ matrix.config }} || { tail -n 1200 config.log; false; }
|
|
|
|
- name: 'autotools build'
|
|
if: ${{ matrix.build == 'automake' }}
|
|
timeout-minutes: 10
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
make -C bld -j5 V=1 install
|
|
find . -name '*.exe' -o -name '*.dll'
|
|
bld/src/curl.exe --disable --version
|
|
|
|
- name: 'autotools build examples'
|
|
if: ${{ matrix.build == 'automake' }}
|
|
timeout-minutes: 5
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
make -C bld -j5 V=1 examples
|
|
|
|
- name: 'autotools build tests'
|
|
if: ${{ matrix.build == 'automake' && matrix.tflags != 'skipall' }}
|
|
timeout-minutes: 15
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
make -C bld -j5 -C tests V=1
|
|
|
|
- name: 'autotools run tests'
|
|
if: ${{ matrix.build == 'automake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
|
timeout-minutes: 40
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
export TFLAGS='-j8 ${{ matrix.tflags }}'
|
|
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
|
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
|
|
fi
|
|
make -C bld -j5 V=1 test-ci
|
|
|
|
- name: 'cmake configure'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
timeout-minutes: 5
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
export PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32"
|
|
cmake -B bld ${options} \
|
|
"-DCMAKE_C_FLAGS=${cflags}" \
|
|
-DCMAKE_UNITY_BUILD=ON \
|
|
-DCURL_WERROR=ON \
|
|
-DBUILD_EXAMPLES=ON \
|
|
-DENABLE_WEBSOCKETS=ON \
|
|
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON \
|
|
${{ matrix.config }} || { cat bld/CMakeFiles/CMake*.yaml; false; }
|
|
|
|
- name: 'cmake build'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
timeout-minutes: 10
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
cmake --build bld --config '${{ matrix.type }}' --parallel 5
|
|
[[ '${{ matrix.config }}' != *'BUILD_SHARED_LIBS=OFF'* ]] && cp -f -p bld/lib/*.dll bld/src/
|
|
find . -name '*.exe' -o -name '*.dll'
|
|
bld/src/curl.exe --disable --version
|
|
|
|
- name: 'cmake build tests'
|
|
if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' }}
|
|
timeout-minutes: 15
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target testdeps
|
|
|
|
- name: 'cmake run tests'
|
|
if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
|
timeout-minutes: 40
|
|
shell: C:\cygwin\bin\bash.exe '{0}'
|
|
run: |
|
|
export TFLAGS='-j8 ${{ matrix.tflags }}'
|
|
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
|
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
|
|
fi
|
|
ls bld/lib/*.dll >/dev/null 2>&1 && cp -f -p bld/lib/*.dll bld/tests/libtest/
|
|
cmake --build bld --config '${{ matrix.type }}' --target test-ci
|
|
|
|
msys2:
|
|
name: 'msys2 (${{ matrix.build }}, ${{ matrix.sys }}, ${{ matrix.env }}, ${{ matrix.config }}, ${{ matrix.test }})'
|
|
runs-on: windows-latest
|
|
timeout-minutes: 45
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !1233', config: '--enable-debug --disable-threaded-resolver --disable-proxy' }
|
|
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '--enable-debug --disable-threaded-resolver' }
|
|
- { build: 'cmake' , sys: 'msys' , env: 'x86_64' , tflags: 'skipall' , config: '-DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF' }
|
|
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '' }
|
|
- { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --disable-threaded-resolver --disable-curldebug --enable-static=no' }
|
|
# FIXME: WebSockets test results ignored due to frequent failures on native Windows:
|
|
- { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: '~2301 ~2302' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON', type: 'Debug' }
|
|
- { 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' }
|
|
- { 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' }
|
|
- { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DBUILD_EXAMPLES=OFF', type: 'Release', test: 'uwp' }
|
|
fail-fast: false
|
|
steps:
|
|
- run: git config --global core.autocrlf input
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
|
- uses: msys2/setup-msys2@d0e80f58dffbc64f6a3a1f43527d469b4fc7b6c8 # v2
|
|
if: ${{ matrix.sys == 'msys' }}
|
|
with:
|
|
msystem: ${{ matrix.sys }}
|
|
# https://packages.msys2.org/search
|
|
install: gcc ${{ matrix.build }} make openssl-devel zlib-devel brotli-devel libnghttp2-devel libpsl-devel libssh2-devel
|
|
- uses: msys2/setup-msys2@d0e80f58dffbc64f6a3a1f43527d469b4fc7b6c8 # v2
|
|
if: ${{ matrix.sys != 'msys' }}
|
|
with:
|
|
msystem: ${{ matrix.sys }}
|
|
install: >-
|
|
mingw-w64-${{ matrix.env }}-cc
|
|
mingw-w64-${{ matrix.env }}-${{ matrix.build }} make
|
|
mingw-w64-${{ matrix.env }}-openssl
|
|
mingw-w64-${{ matrix.env }}-libssh2
|
|
|
|
- name: 'autotools configure'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
timeout-minutes: 5
|
|
shell: msys2 {0}
|
|
run: |
|
|
autoreconf -fi
|
|
mkdir bld && cd bld && ../configure --enable-warnings --enable-werror \
|
|
--prefix="${HOME}"/install \
|
|
--enable-websockets \
|
|
--with-openssl \
|
|
--with-libssh2 \
|
|
--disable-dependency-tracking \
|
|
${{ matrix.config }} || { tail -n 1200 config.log; false; }
|
|
|
|
- name: 'autotools build'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
timeout-minutes: 10
|
|
shell: msys2 {0}
|
|
run: |
|
|
make -C bld -j5 V=1 install
|
|
find . -name '*.exe' -o -name '*.dll'
|
|
bld/src/curl.exe --disable --version
|
|
|
|
- name: 'autotools build examples'
|
|
if: ${{ matrix.build == 'autotools' }}
|
|
timeout-minutes: 5
|
|
shell: msys2 {0}
|
|
run: |
|
|
make -C bld -j5 V=1 examples
|
|
|
|
- name: 'autotools build tests'
|
|
if: ${{ matrix.build == 'autotools' && matrix.tflags != 'skipall' }}
|
|
timeout-minutes: 10
|
|
shell: msys2 {0}
|
|
run: |
|
|
make -C bld -j5 -C tests V=1
|
|
|
|
- name: 'autotools run tests'
|
|
if: ${{ matrix.build == 'autotools' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
|
timeout-minutes: 30
|
|
shell: msys2 {0}
|
|
run: |
|
|
export TFLAGS='-j14 ${{ matrix.tflags }}'
|
|
if [ '${{ matrix.sys }}' != 'msys' ]; then
|
|
TFLAGS+=' !TFTP !MQTT !WebSockets !SMTP'
|
|
fi
|
|
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
|
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
|
|
fi
|
|
make -C bld -j5 V=1 test-ci
|
|
|
|
- name: 'cmake configure'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
timeout-minutes: 5
|
|
shell: msys2 {0}
|
|
run: |
|
|
if [[ '${{ matrix.env }}' = 'clang'* ]]; then
|
|
options='-DCMAKE_C_COMPILER=clang'
|
|
else
|
|
options='-DCMAKE_C_COMPILER=gcc'
|
|
fi
|
|
cflags='-Wno-deprecated-declarations' # for examples
|
|
if [ '${{ matrix.test }}' = 'uwp' ]; then
|
|
options+=' -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0'
|
|
pacman --noconfirm --ask 20 --noprogressbar --sync --needed 'mingw-w64-${{ matrix.env }}-winstorecompat-git'
|
|
specs="$(realpath gcc-specs-uwp)"
|
|
gcc -dumpspecs | sed -e 's/-lmingwex/-lwindowsapp -lmingwex -lwindowsapp -lwindowsappcompat/' -e 's/-lmsvcrt/-lmsvcr120_app/' > "${specs}"
|
|
cflags+=" -specs=$(cygpath -w "${specs}") -DWINSTORECOMPAT -DWINAPI_FAMILY=WINAPI_FAMILY_APP"
|
|
# CMake (as of v3.26.4) gets confused and applies the MSVC rc.exe command-line
|
|
# template to windres. Reset it to the windres template manually:
|
|
rcopts='<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>'
|
|
else
|
|
rcopts=''
|
|
fi
|
|
[ '${{ matrix.type }}' = 'Debug' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
|
|
[ '${{ matrix.type }}' = 'Release' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
|
|
cmake -B bld ${options} \
|
|
"-DCMAKE_C_FLAGS=${cflags}" \
|
|
"-DCMAKE_RC_COMPILE_OBJECT=${rcopts}" \
|
|
'-DCMAKE_BUILD_TYPE=${{ matrix.type }}' \
|
|
-DCMAKE_UNITY_BUILD=ON \
|
|
-DCURL_WERROR=ON \
|
|
-DBUILD_EXAMPLES=ON \
|
|
-DENABLE_WEBSOCKETS=ON \
|
|
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON \
|
|
${{ matrix.config }} || { cat bld/CMakeFiles/CMake*.yaml; false; }
|
|
|
|
- name: 'cmake build'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
timeout-minutes: 10
|
|
shell: msys2 {0}
|
|
run: |
|
|
cmake --build bld --config '${{ matrix.type }}' --parallel 5
|
|
[[ '${{ matrix.config }}' != *'BUILD_SHARED_LIBS=OFF'* ]] && cp -f -p bld/lib/*.dll bld/src/
|
|
find . -name '*.exe' -o -name '*.dll'
|
|
if [ '${{ matrix.test }}' != 'uwp' ]; then # UWP missing 'msvcr120_app.dll', fails with exit code 0xc0000135
|
|
bld/src/curl.exe --disable --version
|
|
fi
|
|
|
|
- name: 'cmake build tests'
|
|
if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' }}
|
|
timeout-minutes: 10
|
|
shell: msys2 {0}
|
|
run: |
|
|
cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target testdeps
|
|
|
|
- name: 'cmake run tests'
|
|
if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
|
timeout-minutes: 40
|
|
shell: msys2 {0}
|
|
run: |
|
|
export TFLAGS='-j14 ${{ matrix.tflags }}'
|
|
if [ '${{ matrix.sys }}' != 'msys' ]; then
|
|
TFLAGS+=' !TFTP !MQTT !WebSockets !SMTP'
|
|
fi
|
|
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
|
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
|
|
fi
|
|
ls bld/lib/*.dll >/dev/null 2>&1 && cp -f -p bld/lib/*.dll bld/tests/libtest/
|
|
cmake --build bld --config '${{ matrix.type }}' --target test-ci
|
|
|
|
old-mingw-w64:
|
|
name: 'old-mingw-w64 (${{ matrix.build }}, ${{ matrix.env }}, ${{ matrix.config }})'
|
|
runs-on: windows-latest
|
|
timeout-minutes: 45
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- build: 'cmake'
|
|
env: '9.5.0-x86_64'
|
|
dir: 'mingw64'
|
|
url: 'https://github.com/brechtsanders/winlibs_mingw/releases/download/9.5.0-10.0.0-msvcrt-r1/winlibs-x86_64-posix-seh-gcc-9.5.0-mingw-w64msvcrt-10.0.0-r1.7z'
|
|
config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF'
|
|
type: 'Release'
|
|
tflags: '~2301 ~2302 ~3027'
|
|
- build: 'cmake'
|
|
env: '7.3.0-x86_64'
|
|
dir: 'mingw64'
|
|
url: 'https://downloads.sourceforge.net/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.3.0/threads-win32/seh/x86_64-7.3.0-release-win32-seh-rt_v5-rev0.7z'
|
|
config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON'
|
|
type: 'Release'
|
|
tflags: '~2301 ~2302 ~3027'
|
|
- build: 'cmake'
|
|
env: '6.4.0-i686'
|
|
dir: 'mingw32'
|
|
url: 'https://downloads.sourceforge.net/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/6.4.0/threads-win32/dwarf/i686-6.4.0-release-win32-dwarf-rt_v5-rev0.7z'
|
|
config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF -DCMAKE_UNITY_BUILD=OFF'
|
|
type: 'Debug'
|
|
tflags: 'skiprun'
|
|
fail-fast: false
|
|
steps:
|
|
- name: 'cache compiler (gcc ${{ matrix.env }})'
|
|
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
|
|
id: cache-compiler
|
|
with:
|
|
path: ~\my-cache
|
|
key: ${{ runner.os }}-mingw-w64-${{ matrix.env }}
|
|
|
|
- name: 'install compiler (gcc ${{ matrix.env }})'
|
|
if: ${{ steps.cache-compiler.outputs.cache-hit != 'true' }}
|
|
timeout-minutes: 5
|
|
shell: C:\msys64\usr\bin\bash.exe {0}
|
|
run: |
|
|
cd "${USERPROFILE}" || exit 1
|
|
mkdir my-cache
|
|
cd my-cache || exit 1
|
|
curl --fail --silent --show-error --retry 3 --retry-connrefused --output pack.bin --location --proto-redir =https '${{ matrix.url }}'
|
|
pwd
|
|
7z x -y pack.bin >/dev/null
|
|
rm -r -f pack.bin
|
|
ls -l
|
|
|
|
- run: git config --global core.autocrlf input
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
|
|
|
- name: 'cmake configure'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
timeout-minutes: 5
|
|
shell: C:\msys64\usr\bin\bash.exe {0}
|
|
run: |
|
|
export PATH="$(cygpath "${USERPROFILE}")/my-cache/${{ matrix.dir }}/bin:/c/msys64/usr/bin:$PATH"
|
|
cflags='-Wno-deprecated-declarations' # for examples
|
|
[ '${{ matrix.type }}' = 'Debug' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
|
|
[ '${{ matrix.type }}' = 'Release' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
|
|
cmake -B bld ${options} \
|
|
'-GMSYS Makefiles' \
|
|
-DCMAKE_C_COMPILER=gcc \
|
|
"-DCMAKE_C_FLAGS=${cflags}" \
|
|
'-DCMAKE_BUILD_TYPE=${{ matrix.type }}' \
|
|
-DCMAKE_UNITY_BUILD=ON \
|
|
-DCURL_WERROR=ON \
|
|
-DBUILD_EXAMPLES=ON \
|
|
-DENABLE_WEBSOCKETS=ON \
|
|
${{ matrix.config }} || { cat bld/CMakeFiles/CMake*.yaml; false; }
|
|
|
|
- name: 'cmake build'
|
|
if: ${{ matrix.build == 'cmake' }}
|
|
timeout-minutes: 10
|
|
shell: C:\msys64\usr\bin\bash.exe {0}
|
|
run: |
|
|
export PATH="$(cygpath "${USERPROFILE}")/my-cache/${{ matrix.dir }}/bin:/c/msys64/usr/bin:$PATH"
|
|
cmake --build bld --config '${{ matrix.type }}' --parallel 5
|
|
[[ '${{ matrix.config }}' != *'BUILD_SHARED_LIBS=OFF'* ]] && cp -f -p bld/lib/*.dll bld/src/
|
|
bld/src/curl.exe --disable --version
|
|
|
|
- name: 'cmake build tests'
|
|
if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' }}
|
|
timeout-minutes: 10
|
|
shell: C:\msys64\usr\bin\bash.exe {0}
|
|
run: |
|
|
export PATH="$(cygpath "${USERPROFILE}")/my-cache/${{ matrix.dir }}/bin:/c/msys64/usr/bin:$PATH"
|
|
cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target testdeps
|
|
|
|
- name: 'cmake run tests'
|
|
if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
|
timeout-minutes: 40
|
|
shell: C:\msys64\usr\bin\bash.exe {0}
|
|
run: |
|
|
export PATH="$(cygpath "${USERPROFILE}")/my-cache/${{ matrix.dir }}/bin:/c/msys64/usr/bin:$PATH"
|
|
export TFLAGS='-j14 !TFTP !MQTT !WebSockets ${{ matrix.tflags }}'
|
|
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
|
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
|
|
fi
|
|
ls bld/lib/*.dll >/dev/null 2>&1 && cp -f -p bld/lib/*.dll bld/tests/libtest/
|
|
cmake --build bld --config '${{ matrix.type }}' --target test-ci
|
|
|
|
msvc:
|
|
name: 'msvc (${{ matrix.arch }}, ${{ matrix.plat }}, ${{ matrix.name }})'
|
|
runs-on: windows-latest
|
|
timeout-minutes: 30
|
|
env:
|
|
VCPKG_DISABLE_METRICS: '1'
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
# name should be unique and without special chars. It creates a folder with that name for the cache.
|
|
- name: 'schannel'
|
|
install: 'zstd zlib nghttp2 libssh2[core,zlib]'
|
|
arch: 'x64'
|
|
plat: 'windows'
|
|
type: 'Debug'
|
|
tflags: '~1516 ~2301 ~2302 ~2303 ~2307'
|
|
config: '-DENABLE_DEBUG=ON -DENABLE_UNICODE=ON -DCURL_USE_SCHANNEL=ON -DCURL_ZSTD=ON -DUSE_NGHTTP2=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_LIBSSH2=ON'
|
|
- name: 'openssl'
|
|
install: 'zstd zlib nghttp2 nghttp3 openssl libssh2'
|
|
arch: 'x64'
|
|
plat: 'windows'
|
|
type: 'Debug'
|
|
tflags: '~1516 ~2301 ~2302 ~2303 ~2307'
|
|
config: '-DENABLE_DEBUG=ON -DENABLE_UNICODE=OFF -DCURL_USE_SCHANNEL=OFF -DCURL_ZSTD=ON -DUSE_NGHTTP2=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON'
|
|
- name: 'no ssl'
|
|
install: 'zstd zlib'
|
|
arch: 'x64'
|
|
plat: 'windows'
|
|
type: 'Debug'
|
|
tflags: '~1516 ~2301 ~2302 ~2303 ~2307'
|
|
config: '-DENABLE_DEBUG=ON -DENABLE_UNICODE=OFF -DCURL_USE_SCHANNEL=OFF -DCURL_ZSTD=ON -DHTTP_ONLY=ON'
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
|
|
|
- name: 'restore cache dependencies'
|
|
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
|
|
with:
|
|
path: 'cache/${{ matrix.name }}'
|
|
key: ${{ matrix.plat }}-${{ matrix.name }}
|
|
restore-keys: ${{ matrix.plat }}-${{ matrix.name }}
|
|
|
|
- name: 'vcpkg init'
|
|
timeout-minutes: 5
|
|
if: success()
|
|
shell: bash
|
|
run: |
|
|
git clone --quiet --depth 1 https://github.com/microsoft/vcpkg/
|
|
vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
|
|
|
- name: 'vcpkg build'
|
|
timeout-minutes: 10
|
|
shell: bash
|
|
run: |
|
|
export VCPKG_ROOT="$PWD/vcpkg"
|
|
export CURRENT_BINARY_CACHE='cache/${{ matrix.name }}'
|
|
mkdir -p "$CURRENT_BINARY_CACHE"
|
|
export VCPKG_BINARY_SOURCES="clear;files,$GITHUB_WORKSPACE/$CURRENT_BINARY_CACHE,readwrite;"
|
|
vcpkg/vcpkg x-set-installed ${{ matrix.install }} --triplet=${{ matrix.arch }}-${{ matrix.plat }}
|
|
|
|
- name: 'save cache dependencies'
|
|
id: cache-save
|
|
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
|
|
with:
|
|
path: 'cache/${{ matrix.name }}'
|
|
key: ${{ matrix.plat }}-${{ matrix.name }}-${{ hashFiles('vcpkg/installed/vcpkg/info/*', 'vcpkg/installed/vcpkg/updates/*') }}
|
|
|
|
- name: 'cmake configure'
|
|
timeout-minutes: 5
|
|
shell: bash
|
|
run: |
|
|
if [ '${{ matrix.plat }}' = 'uwp' ]; then
|
|
system='WindowsStore'
|
|
options='-DCMAKE_SYSTEM_VERSION=10.0'
|
|
else
|
|
system='Windows'
|
|
fi
|
|
export VCPKG_ROOT="$PWD/vcpkg"
|
|
cmake -B bld ${options} \
|
|
"-DCMAKE_SYSTEM_NAME=${system}" \
|
|
"-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
|
|
"-DVCPKG_INSTALLED_DIR=$VCPKG_ROOT/installed" \
|
|
'-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-${{ matrix.plat }}' \
|
|
-DCMAKE_VS_GLOBALS=TrackFileAccess=false \
|
|
'-DCMAKE_BUILD_TYPE=${{ matrix.type }}' \
|
|
-DCMAKE_UNITY_BUILD=ON \
|
|
-DCURL_WERROR=ON \
|
|
-DBUILD_EXAMPLES=ON \
|
|
-DENABLE_WEBSOCKETS=ON \
|
|
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
|
|
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE= \
|
|
${{ matrix.config }} || { cat bld/CMakeFiles/CMake*.yaml; false; }
|
|
|
|
- name: 'prepare logs on failure'
|
|
timeout-minutes: 5
|
|
if: failure()
|
|
shell: bash
|
|
run: |
|
|
export VCPKG_ROOT="$GITHUB_WORKSPACE/vcpkg"
|
|
mkdir -p bld
|
|
7z a -t7z -r -mx=9 logs.7z \
|
|
"$VCPKG_ROOT"/buildtrees/*.log \
|
|
bld/.ninja_log \
|
|
bld/build.ninja \
|
|
bld/install_manifest.txt \
|
|
bld/vcpkg-manifest-install.log \
|
|
bld/CMakeFiles/CMake*.yaml
|
|
|
|
- name: 'upload logs on failure'
|
|
timeout-minutes: 10
|
|
if: failure()
|
|
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4
|
|
with:
|
|
name: windows_logs_${{matrix.name}}_${{github.event.pull_request.head.sha}}
|
|
path: logs.7z
|
|
|
|
- name: 'cmake build'
|
|
timeout-minutes: 5
|
|
shell: bash
|
|
run: |
|
|
cmake --build bld --config '${{ matrix.type }}' --parallel 5
|
|
export VCPKG_ROOT="$PWD/vcpkg"
|
|
export VCPKG_TRIPLET_DIR="$VCPKG_ROOT/installed/${{ matrix.arch }}-${{ matrix.plat }}"
|
|
export debug_lib="$VCPKG_TRIPLET_DIR/debug/bin"
|
|
export release_lib="$VCPKG_TRIPLET_DIR/bin"
|
|
export PATH="$PWD/bld/lib/:$release_lib:$debug_lib:$PATH"
|
|
bld/src/curl.exe --disable --version
|
|
|
|
- name: 'cmake build tests'
|
|
if: ${{ matrix.tflags != 'skipall' }}
|
|
timeout-minutes: 10
|
|
shell: bash
|
|
run: |
|
|
cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target testdeps
|
|
|
|
- name: 'cmake run tests'
|
|
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
|
timeout-minutes: 30
|
|
shell: bash
|
|
run: |
|
|
export TFLAGS='-j14 !TFTP !MQTT !WebSockets !SMTP ${{ matrix.tflags }}'
|
|
export VCPKG_ROOT="$PWD/vcpkg"
|
|
export VCPKG_TRIPLET_DIR="$VCPKG_ROOT/installed/${{ matrix.arch }}-${{ matrix.plat }}"
|
|
export debug_lib="$VCPKG_TRIPLET_DIR/debug/bin"
|
|
export release_lib="$VCPKG_TRIPLET_DIR/bin"
|
|
export PATH="$PWD/bld/lib/:$release_lib:$debug_lib:$PATH"
|
|
cmake --build bld --config '${{ matrix.type }}' --target test-ci
|