diff --git a/.github/labeler.yml b/.github/labeler.yml index db742f7168..175176e14a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -254,4 +254,4 @@ Windows: - all: - changed-files: - any-glob-to-all-files: - - '{appveyor.*,.github/workflows/windows.yml,CMake/Platforms/WindowsCache.cmake,lib/*win32*,lib/curl_multibyte.*,lib/rename.*,lib/vtls/schannel*,m4/curl-schannel.m4,projects/**,src/tool_doswin.c,winbuild/**,libcurl.def}' + - '{appveyor.*,.github/workflows/cygwin.yml,.github/workflows/windows.yml,CMake/Platforms/WindowsCache.cmake,lib/*win32*,lib/curl_multibyte.*,lib/rename.*,lib/vtls/schannel*,m4/curl-schannel.m4,projects/**,src/tool_doswin.c,winbuild/**,libcurl.def}' diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml new file mode 100644 index 0000000000..244c65de55 --- /dev/null +++ b/.github/workflows/cygwin.yml @@ -0,0 +1,181 @@ +# Copyright (C) Viktor Szakats +# +# SPDX-License-Identifier: curl + +name: Cygwin + +on: + push: + branches: + - master + - '*/ci' + paths-ignore: + - '**/*.md' + - '.azure-pipelines.yml' + - '.circleci/**' + - 'appveyor.*' + - 'packages/**' + - 'plan9/**' + - 'projects/**' + - 'winbuild/**' + pull_request: + branches: + - master + paths-ignore: + - '**/*.md' + - '.azure-pipelines.yml' + - '.circleci/**' + - '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 == 'cmake' && 'CM' || 'AM' }} ${{ matrix.platform }} ${{ matrix.name }}" + runs-on: windows-latest + timeout-minutes: 45 + defaults: + run: + shell: C:\cygwin\bin\bash.exe '{0}' + env: + SHELLOPTS: 'igncr' + strategy: + 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' } + fail-fast: false + steps: + - run: git config --global core.autocrlf input + shell: pwsh + - 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 autoreconf' + if: ${{ matrix.build == 'automake' }} + timeout-minutes: 2 + run: autoreconf -fi + + - name: 'autotools configure' + if: ${{ matrix.build == 'automake' }} + timeout-minutes: 5 + run: | + PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32" + mkdir bld && cd bld && ../configure --enable-warnings --enable-werror \ + --prefix="${HOME}"/install \ + --enable-websockets \ + --with-openssl \ + --with-libssh2 \ + --disable-dependency-tracking \ + ${{ matrix.config }} + + - name: 'autotools configure log' + if: ${{ matrix.build == 'automake' && !cancelled() }} + run: cat bld/config.log 2>/dev/null || true + + - name: 'curl_config.h' + if: ${{ matrix.build == 'automake' }} + run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true + + - name: 'curl_config.h (full)' + if: ${{ matrix.build == 'automake' }} + run: cat bld/lib/curl_config.h || true + + - name: 'autotools build' + if: ${{ matrix.build == 'automake' }} + timeout-minutes: 10 + run: make -C bld -j5 V=1 install + + - name: 'curl version' + if: ${{ matrix.build == 'automake' }} + timeout-minutes: 1 + run: | + find . -name '*.exe' -o -name '*.dll' + bld/src/curl.exe --disable --version + + - name: 'autotools build examples' + if: ${{ matrix.build == 'automake' }} + timeout-minutes: 5 + run: make -C bld -j5 V=1 examples + + - name: 'autotools build tests' + if: ${{ matrix.build == 'automake' && matrix.tflags != 'skipall' }} + timeout-minutes: 15 + run: make -C bld -j5 V=1 -C tests + + - name: 'autotools run tests' + if: ${{ matrix.build == 'automake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} + timeout-minutes: 40 + 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 + run: | + PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32" + cmake -B bld ${options} \ + -DCMAKE_UNITY_BUILD=ON \ + -DCURL_WERROR=ON \ + -DBUILD_EXAMPLES=ON \ + -DENABLE_WEBSOCKETS=ON \ + -DCURL_BROTLI=ON \ + ${{ matrix.config }} + + - name: 'cmake configure log' + if: ${{ matrix.build == 'cmake' && !cancelled() }} + run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true + + - name: 'curl_config.h' + if: ${{ matrix.build == 'cmake' }} + run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true + + - name: 'curl_config.h (full)' + if: ${{ matrix.build == 'cmake' }} + run: cat bld/lib/curl_config.h || true + + - name: 'cmake build' + if: ${{ matrix.build == 'cmake' }} + timeout-minutes: 10 + run: cmake --build bld --config '${{ matrix.type }}' --parallel 5 + + - name: 'curl version' + if: ${{ matrix.build == 'cmake' }} + timeout-minutes: 1 + run: | + find . -name '*.exe' -o -name '*.dll' | grep -v '/examples/' + PATH="$PWD/bld/lib:$PATH" + bld/src/curl.exe --disable --version + + - name: 'cmake build tests' + if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' }} + timeout-minutes: 15 + 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: 15 + run: | + export TFLAGS='-j8 ${{ matrix.tflags }}' + if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then + TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")" + fi + PATH="$PWD/bld/lib:$PATH" + cmake --build bld --config '${{ matrix.type }}' --target test-ci diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 28d369b959..f0fa12f69e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: curl -name: windows +name: Windows on: push: @@ -38,148 +38,6 @@ concurrency: permissions: {} jobs: - cygwin: - name: "cygwin, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.platform }} ${{ matrix.name }}" - runs-on: windows-latest - timeout-minutes: 45 - defaults: - run: - shell: C:\cygwin\bin\bash.exe '{0}' - env: - SHELLOPTS: 'igncr' - strategy: - 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' } - fail-fast: false - steps: - - run: git config --global core.autocrlf input - shell: pwsh - - 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 autoreconf' - if: ${{ matrix.build == 'automake' }} - timeout-minutes: 2 - run: autoreconf -fi - - - name: 'autotools configure' - if: ${{ matrix.build == 'automake' }} - timeout-minutes: 5 - run: | - PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32" - mkdir bld && cd bld && ../configure --enable-warnings --enable-werror \ - --prefix="${HOME}"/install \ - --enable-websockets \ - --with-openssl \ - --with-libssh2 \ - --disable-dependency-tracking \ - ${{ matrix.config }} - - - name: 'autotools configure log' - if: ${{ matrix.build == 'automake' && !cancelled() }} - run: cat bld/config.log 2>/dev/null || true - - - name: 'curl_config.h' - if: ${{ matrix.build == 'automake' }} - run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true - - - name: 'curl_config.h (full)' - if: ${{ matrix.build == 'automake' }} - run: cat bld/lib/curl_config.h || true - - - name: 'autotools build' - if: ${{ matrix.build == 'automake' }} - timeout-minutes: 10 - run: make -C bld -j5 V=1 install - - - name: 'curl version' - if: ${{ matrix.build == 'automake' }} - timeout-minutes: 1 - run: | - find . -name '*.exe' -o -name '*.dll' - bld/src/curl.exe --disable --version - - - name: 'autotools build examples' - if: ${{ matrix.build == 'automake' }} - timeout-minutes: 5 - run: make -C bld -j5 V=1 examples - - - name: 'autotools build tests' - if: ${{ matrix.build == 'automake' && matrix.tflags != 'skipall' }} - timeout-minutes: 15 - run: make -C bld -j5 V=1 -C tests - - - name: 'autotools run tests' - if: ${{ matrix.build == 'automake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - timeout-minutes: 40 - 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 - run: | - PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32" - cmake -B bld ${options} \ - -DCMAKE_UNITY_BUILD=ON \ - -DCURL_WERROR=ON \ - -DBUILD_EXAMPLES=ON \ - -DENABLE_WEBSOCKETS=ON \ - -DCURL_BROTLI=ON \ - ${{ matrix.config }} - - - name: 'cmake configure log' - if: ${{ matrix.build == 'cmake' && !cancelled() }} - run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - - - name: 'curl_config.h' - if: ${{ matrix.build == 'cmake' }} - run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true - - - name: 'curl_config.h (full)' - if: ${{ matrix.build == 'cmake' }} - run: cat bld/lib/curl_config.h || true - - - name: 'cmake build' - if: ${{ matrix.build == 'cmake' }} - timeout-minutes: 10 - run: cmake --build bld --config '${{ matrix.type }}' --parallel 5 - - - name: 'curl version' - if: ${{ matrix.build == 'cmake' }} - timeout-minutes: 1 - run: | - find . -name '*.exe' -o -name '*.dll' | grep -v '/examples/' - PATH="$PWD/bld/lib:$PATH" - bld/src/curl.exe --disable --version - - - name: 'cmake build tests' - if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' }} - timeout-minutes: 15 - 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: 15 - run: | - export TFLAGS='-j8 ${{ matrix.tflags }}' - if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then - TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")" - fi - PATH="$PWD/bld/lib:$PATH" - cmake --build bld --config '${{ matrix.type }}' --target test-ci - msys2: # both msys and mingw-w64 name: "${{ matrix.sys == 'msys' && 'msys2' || 'mingw' }}, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.env }} ${{ matrix.name }} ${{ matrix.test }}" runs-on: windows-latest