cygwin.yml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. # Copyright (C) Viktor Szakats
  2. #
  3. # SPDX-License-Identifier: curl
  4. name: Cygwin
  5. 'on':
  6. push:
  7. branches:
  8. - master
  9. - '*/ci'
  10. paths-ignore:
  11. - '**/*.md'
  12. - '.circleci/**'
  13. - 'appveyor.*'
  14. - 'packages/**'
  15. - 'plan9/**'
  16. - 'projects/**'
  17. - 'winbuild/**'
  18. pull_request:
  19. branches:
  20. - master
  21. paths-ignore:
  22. - '**/*.md'
  23. - '.circleci/**'
  24. - 'appveyor.*'
  25. - 'packages/**'
  26. - 'plan9/**'
  27. - 'projects/**'
  28. - 'winbuild/**'
  29. concurrency:
  30. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  31. cancel-in-progress: true
  32. permissions: {}
  33. jobs:
  34. cygwin:
  35. name: "cygwin, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.platform }} ${{ matrix.name }}"
  36. runs-on: windows-latest
  37. timeout-minutes: 45
  38. defaults:
  39. run:
  40. shell: C:\cygwin\bin\bash.exe '{0}'
  41. env:
  42. SHELLOPTS: 'igncr'
  43. strategy:
  44. matrix:
  45. include:
  46. - { build: 'automake', platform: 'x86_64', tflags: '' , config: '--enable-debug --disable-threaded-resolver', name: 'openssl' }
  47. - { build: 'cmake' , platform: 'x86_64', tflags: 'skiprun', config: '-DCURL_USE_OPENSSL=ON', name: 'openssl R' }
  48. fail-fast: false
  49. steps:
  50. - run: git config --global core.autocrlf input
  51. shell: pwsh
  52. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
  53. - uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # v4
  54. with:
  55. platform: ${{ matrix.platform }}
  56. site: https://mirrors.kernel.org/sourceware/cygwin/
  57. # https://cygwin.com/cgi-bin2/package-grep.cgi
  58. packages: >-
  59. autoconf libtool gcc-core gcc-g++ binutils
  60. ${{ matrix.build }} make ninja
  61. openssh
  62. libssl-devel
  63. libssh2-devel
  64. libpsl-devel
  65. zlib-devel
  66. libbrotli-devel
  67. libnghttp2-devel
  68. - name: 'autotools autoreconf'
  69. if: ${{ matrix.build == 'automake' }}
  70. timeout-minutes: 2
  71. run: autoreconf -fi
  72. - name: 'autotools configure'
  73. if: ${{ matrix.build == 'automake' }}
  74. timeout-minutes: 5
  75. run: |
  76. PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32"
  77. mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \
  78. --prefix="${HOME}"/install \
  79. --enable-websockets \
  80. --with-openssl \
  81. --with-libssh2 \
  82. --disable-dependency-tracking \
  83. ${{ matrix.config }}
  84. - name: 'autotools configure log'
  85. if: ${{ matrix.build == 'automake' && !cancelled() }}
  86. run: cat bld/config.log 2>/dev/null || true
  87. - name: 'curl_config.h'
  88. if: ${{ matrix.build == 'automake' }}
  89. run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true
  90. - name: 'curl_config.h (full)'
  91. if: ${{ matrix.build == 'automake' }}
  92. run: cat bld/lib/curl_config.h || true
  93. - name: 'autotools build'
  94. if: ${{ matrix.build == 'automake' }}
  95. timeout-minutes: 10
  96. run: make -C bld -j5 V=1 install
  97. - name: 'curl version'
  98. if: ${{ matrix.build == 'automake' }}
  99. timeout-minutes: 1
  100. run: |
  101. find . -name '*.exe' -o -name '*.dll'
  102. bld/src/curl.exe --disable --version
  103. - name: 'autotools build tests'
  104. if: ${{ matrix.build == 'automake' && matrix.tflags != 'skipall' }}
  105. timeout-minutes: 15
  106. run: make -C bld -j5 V=1 -C tests
  107. - name: 'autotools run tests'
  108. if: ${{ matrix.build == 'automake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
  109. timeout-minutes: 15
  110. run: |
  111. export TFLAGS='-j20 ${{ matrix.tflags }} ~615'
  112. if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
  113. TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
  114. fi
  115. make -C bld -j5 V=1 test-ci
  116. - name: 'autotools build examples'
  117. if: ${{ matrix.build == 'automake' }}
  118. timeout-minutes: 5
  119. run: make -C bld -j5 V=1 examples
  120. - name: 'cmake configure'
  121. if: ${{ matrix.build == 'cmake' }}
  122. timeout-minutes: 5
  123. run: |
  124. PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32"
  125. cmake -B bld -G Ninja ${options} \
  126. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
  127. -DCURL_WERROR=ON \
  128. -DENABLE_WEBSOCKETS=ON \
  129. -DCURL_BROTLI=ON \
  130. ${{ matrix.config }}
  131. - name: 'cmake configure log'
  132. if: ${{ matrix.build == 'cmake' && !cancelled() }}
  133. run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
  134. - name: 'curl_config.h'
  135. if: ${{ matrix.build == 'cmake' }}
  136. run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true
  137. - name: 'curl_config.h (full)'
  138. if: ${{ matrix.build == 'cmake' }}
  139. run: cat bld/lib/curl_config.h || true
  140. - name: 'cmake build'
  141. if: ${{ matrix.build == 'cmake' }}
  142. timeout-minutes: 10
  143. run: cmake --build bld --config '${{ matrix.type }}' --parallel 5
  144. - name: 'curl version'
  145. if: ${{ matrix.build == 'cmake' }}
  146. timeout-minutes: 1
  147. run: |
  148. find . -name '*.exe' -o -name '*.dll' | grep -v '/examples/'
  149. PATH="$PWD/bld/lib:$PATH"
  150. bld/src/curl.exe --disable --version
  151. - name: 'cmake build tests'
  152. if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' }}
  153. timeout-minutes: 15
  154. run: cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target testdeps
  155. - name: 'cmake run tests'
  156. if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
  157. timeout-minutes: 15
  158. run: |
  159. export TFLAGS='-j8 ${{ matrix.tflags }} ~615'
  160. if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
  161. TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
  162. fi
  163. PATH="$PWD/bld/lib:$PATH"
  164. cmake --build bld --config '${{ matrix.type }}' --target test-ci
  165. - name: 'cmake build examples'
  166. if: ${{ matrix.build == 'cmake' }}
  167. timeout-minutes: 5
  168. run: cmake --build bld --config '${{ matrix.type }}' --parallel 5 --target curl-examples