non-native.yml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. # Copyright (C) Viktor Szakats
  2. #
  3. # SPDX-License-Identifier: curl
  4. name: non-native
  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. netbsd:
  35. name: 'NetBSD (cmake, openssl, clang)'
  36. runs-on: ubuntu-latest
  37. timeout-minutes: 30
  38. strategy:
  39. matrix:
  40. arch: ['x86_64']
  41. steps:
  42. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  43. - name: 'cmake'
  44. uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0
  45. with:
  46. operating_system: 'netbsd'
  47. version: '10.0'
  48. architecture: ${{ matrix.arch }}
  49. run: |
  50. # https://pkgsrc.se/
  51. sudo pkgin -y install cmake ninja-build pkg-config perl brotli heimdal openldap-client libssh2 libidn2 libpsl nghttp2 py311-impacket
  52. cmake -B bld -G Ninja \
  53. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
  54. -DCURL_WERROR=ON \
  55. -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
  56. -DCURL_USE_OPENSSL=ON \
  57. -DCURL_BROTLI=ON -DCURL_USE_GSSAPI=ON \
  58. || { cat bld/CMakeFiles/CMake*.yaml; false; }
  59. echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
  60. echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::'
  61. cmake --build bld --config Debug
  62. bld/src/curl --disable --version
  63. if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
  64. cmake --build bld --config Debug --target testdeps
  65. export TFLAGS='-j4'
  66. cmake --build bld --config Debug --target test-ci
  67. fi
  68. echo '::group::build examples'
  69. cmake --build bld --config Debug --target curl-examples
  70. echo '::endgroup::'
  71. openbsd:
  72. name: 'OpenBSD (cmake, libressl, clang)'
  73. runs-on: ubuntu-latest
  74. timeout-minutes: 30
  75. strategy:
  76. matrix:
  77. arch: ['x86_64']
  78. steps:
  79. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  80. - name: 'cmake'
  81. uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0
  82. with:
  83. operating_system: 'openbsd'
  84. version: '7.5'
  85. architecture: ${{ matrix.arch }}
  86. run: |
  87. # https://openbsd.app/
  88. # https://www.openbsd.org/faq/faq15.html
  89. sudo pkg_add cmake ninja brotli openldap-client-- libssh2 libidn2 libpsl nghttp2 python3 py3-impacket
  90. cmake -B bld -G Ninja \
  91. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
  92. -DCURL_WERROR=ON \
  93. -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
  94. -DCURL_USE_OPENSSL=ON \
  95. -DCURL_BROTLI=ON \
  96. || { cat bld/CMakeFiles/CMake*.yaml; false; }
  97. echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
  98. echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::'
  99. cmake --build bld --config Debug
  100. bld/src/curl --disable --version
  101. if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
  102. cmake --build bld --config Debug --target testdeps
  103. export TFLAGS='-j8 ~3017 ~TFTP ~FTP' # FIXME: TFTP requests executed twice? Related: `curl: (69) TFTP: Access Violation`?
  104. cmake --build bld --config Debug --target test-ci
  105. fi
  106. echo '::group::build examples'
  107. cmake --build bld --config Debug --target curl-examples
  108. echo '::endgroup::'
  109. freebsd:
  110. name: 'FreeBSD (${{ matrix.build }}, openssl, ${{ matrix.compiler }}, ${{ matrix.arch }})'
  111. runs-on: ubuntu-latest
  112. timeout-minutes: 60
  113. strategy:
  114. matrix:
  115. include:
  116. - { build: 'autotools', arch: 'x86_64', compiler: 'clang' }
  117. - { build: 'autotools', arch: 'arm64', compiler: 'clang' }
  118. - { build: 'cmake' , arch: 'arm64', compiler: 'clang' }
  119. fail-fast: false
  120. steps:
  121. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  122. - name: 'autotools'
  123. if: ${{ matrix.build == 'autotools' }}
  124. uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0
  125. with:
  126. operating_system: 'freebsd'
  127. version: '14.1'
  128. architecture: ${{ matrix.arch }}
  129. run: |
  130. # https://ports.freebsd.org/
  131. sudo pkg install -y autoconf automake libtool \
  132. pkgconf brotli openldap26-client libidn2 libnghttp2 stunnel py311-impacket
  133. autoreconf -fi
  134. export CC='${{ matrix.compiler }}'
  135. mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \
  136. --prefix="${HOME}"/install \
  137. --with-openssl \
  138. --with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \
  139. --disable-dependency-tracking || { tail -n 1000 config.log; false; }
  140. echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::'
  141. echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::'
  142. make -j3 install
  143. src/curl --disable --version
  144. if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
  145. make -j3 -C tests
  146. make test-ci V=1 TFLAGS='-j4'
  147. fi
  148. echo '::group::build examples'
  149. make -j3 examples
  150. echo '::endgroup::'
  151. - name: 'cmake'
  152. if: ${{ matrix.build == 'cmake' }}
  153. uses: cross-platform-actions/action@cdc9ee69ef84a5f2e59c9058335d9c57bcb4ac86 # v0.25.0
  154. with:
  155. operating_system: 'freebsd'
  156. version: '14.1'
  157. architecture: ${{ matrix.arch }}
  158. run: |
  159. # https://ports.freebsd.org/
  160. sudo pkg install -y cmake-core ninja perl5 \
  161. pkgconf brotli openldap26-client libidn2 libnghttp2 stunnel py311-impacket
  162. cmake -B bld -G Ninja \
  163. '-DCMAKE_C_COMPILER=${{ matrix.compiler }}' \
  164. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
  165. -DCURL_WERROR=ON \
  166. -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
  167. -DCURL_USE_OPENSSL=ON \
  168. -DCURL_BROTLI=ON -DCURL_USE_GSSAPI=ON \
  169. || { cat bld/CMakeFiles/CMake*.yaml; false; }
  170. echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
  171. echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::'
  172. cmake --build bld --config Debug
  173. bld/src/curl --disable --version
  174. if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
  175. cmake --build bld --config Debug --target testdeps
  176. cmake --build bld --config Debug --target test-ci
  177. fi
  178. echo '::group::build examples'
  179. cmake --build bld --config Debug --target curl-examples
  180. echo '::endgroup::'
  181. omnios:
  182. name: 'OmniOS (autotools, openssl, gcc, amd64)'
  183. runs-on: ubuntu-latest
  184. timeout-minutes: 30
  185. steps:
  186. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  187. - name: 'autotools'
  188. uses: vmactions/omnios-vm@16b5996777bc675acd3d537f13df536a526cd16d # v1
  189. with:
  190. usesh: true
  191. # https://pkg.omnios.org/r151052/core/en/index.shtml
  192. prepare: pkg install build-essential libtool nghttp2
  193. run: |
  194. set -e
  195. ln -s /usr/bin/gcpp /usr/bin/cpp # Some tests expect `cpp`, which is named `gcpp` in this env.
  196. autoreconf -fi
  197. mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \
  198. --prefix="${HOME}"/install \
  199. --with-openssl \
  200. --disable-dependency-tracking || { tail -n 1000 config.log; false; }
  201. echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::'
  202. echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::'
  203. gmake -j3 install
  204. src/curl --disable --version
  205. gmake -j3 -C tests
  206. gmake test-ci V=1
  207. echo '::group::build examples'
  208. gmake -j3 examples
  209. echo '::endgroup::'