macos.yml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  2. #
  3. # SPDX-License-Identifier: curl
  4. name: macOS
  5. on:
  6. push:
  7. branches:
  8. - master
  9. - '*/ci'
  10. paths-ignore:
  11. - '**/*.md'
  12. - '.azure-pipelines.yml'
  13. - '.circleci/**'
  14. - '.cirrus.yml'
  15. - 'appveyor.yml'
  16. - 'packages/**'
  17. - 'plan9/**'
  18. - 'projects/**'
  19. - 'winbuild/**'
  20. pull_request:
  21. branches:
  22. - master
  23. paths-ignore:
  24. - '**/*.md'
  25. - '.azure-pipelines.yml'
  26. - '.circleci/**'
  27. - '.cirrus.yml'
  28. - 'appveyor.yml'
  29. - 'packages/**'
  30. - 'plan9/**'
  31. - 'projects/**'
  32. - 'winbuild/**'
  33. concurrency:
  34. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  35. cancel-in-progress: true
  36. permissions: {}
  37. env:
  38. DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
  39. jobs:
  40. autotools:
  41. name: ${{ matrix.build.name }}
  42. runs-on: 'macos-latest'
  43. timeout-minutes: 90
  44. strategy:
  45. fail-fast: false
  46. matrix:
  47. build:
  48. - name: normal
  49. install: nghttp2
  50. configure: --without-ssl
  51. macosx-version-min: 10.9
  52. - name: debug
  53. install: nghttp2
  54. configure: --enable-debug --without-ssl
  55. macosx-version-min: 10.9
  56. - name: libssh2
  57. install: nghttp2 libssh2
  58. configure: --enable-debug --with-libssh2 --without-ssl
  59. macosx-version-min: 10.9
  60. - name: libssh-c-ares
  61. install: openssl nghttp2 libssh
  62. configure: --enable-debug --with-libssh --with-openssl=/usr/local/opt/openssl --enable-ares
  63. macosx-version-min: 10.9
  64. - name: libssh
  65. install: openssl nghttp2 libssh
  66. configure: --enable-debug --with-libssh --with-openssl=/usr/local/opt/openssl
  67. macosx-version-min: 10.9
  68. - name: c-ares
  69. install: nghttp2
  70. configure: --enable-debug --enable-ares --without-ssl
  71. macosx-version-min: 10.9
  72. - name: HTTP only
  73. install: nghttp2
  74. configure: --enable-debug --enable-maintainer-mode --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap --disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp --disable-smb --disable-smtp --disable-telnet --disable-tftp --disable-unix-sockets --disable-shared --without-brotli --without-gssapi --without-libidn2 --without-libpsl --without-librtmp --without-libssh2 --without-nghttp2 --without-ntlm-auth --without-ssl --without-zlib
  75. macosx-version-min: 10.15
  76. - name: SecureTransport http2
  77. install: nghttp2
  78. configure: --enable-debug --with-secure-transport
  79. macosx-version-min: 10.8
  80. - name: gcc SecureTransport
  81. configure: CC=gcc-12 --enable-debug --with-secure-transport
  82. macosx-version-min: 10.8
  83. - name: OpenSSL http2
  84. install: nghttp2 openssl
  85. configure: --enable-debug --with-openssl=/usr/local/opt/openssl
  86. macosx-version-min: 10.9
  87. - name: LibreSSL http2
  88. install: nghttp2 libressl
  89. configure: --enable-debug --with-openssl=/usr/local/opt/libressl
  90. macosx-version-min: 10.9
  91. - name: torture
  92. install: nghttp2 openssl
  93. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
  94. tflags: -n -t --shallow=25 !FTP
  95. macosx-version-min: 10.9
  96. - name: torture-ftp
  97. install: nghttp2 openssl
  98. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
  99. tflags: -n -t --shallow=20 FTP
  100. macosx-version-min: 10.9
  101. - name: macOS 10.15
  102. install: nghttp2 libssh2 openssl
  103. configure: --enable-debug --disable-ldap --with-openssl=/usr/local/opt/openssl
  104. macosx-version-min: 10.15
  105. steps:
  106. - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
  107. name: 'brew bundle'
  108. # Run this command with retries because of spurious failures seen
  109. # while running the tests, for example
  110. # https://github.com/curl/curl/runs/4095721123?check_suite_focus=true
  111. - run: "while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done"
  112. name: 'brew install'
  113. - run: python3 -m pip install impacket
  114. name: 'pip3 install'
  115. - uses: actions/checkout@v3
  116. - run: autoreconf -fi
  117. name: 'autoreconf'
  118. - run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-websockets
  119. name: 'configure'
  120. env:
  121. CFLAGS: "-mmacosx-version-min=${{ matrix.build.macosx-version-min }}"
  122. - run: make V=1
  123. name: 'make'
  124. - run: make V=1 examples
  125. name: 'make examples'
  126. - run: make V=1 -C tests
  127. name: 'make tests'
  128. - run: make V=1 test-ci
  129. name: 'run tests'
  130. env:
  131. TFLAGS: "${{ matrix.build.tflags }} ~1452"
  132. cmake:
  133. name: cmake ${{ matrix.compiler.CC }} ${{ matrix.build.name }}
  134. runs-on: 'macos-latest'
  135. env: ${{ matrix.compiler }}
  136. strategy:
  137. fail-fast: false
  138. matrix:
  139. compiler:
  140. - CC: clang
  141. CXX: clang++
  142. CFLAGS: "-mmacosx-version-min=10.15 -Wno-deprecated-declarations"
  143. - CC: gcc-12
  144. CXX: g++-12
  145. CFLAGS: "-mmacosx-version-min=10.15 -Wno-error=undef -Wno-error=conversion"
  146. build:
  147. - name: OpenSSL
  148. install: nghttp2 openssl
  149. generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
  150. - name: LibreSSL
  151. install: nghttp2 libressl
  152. generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
  153. - name: libssh2
  154. install: nghttp2 openssl libssh2
  155. generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_USE_LIBSSH2=ON
  156. steps:
  157. - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
  158. name: 'brew bundle'
  159. - run: "while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done"
  160. name: 'brew install'
  161. - run: python3 -m pip install impacket
  162. name: 'pip3 install'
  163. - uses: actions/checkout@v3
  164. - run: cmake -S. -Bbuild -DCURL_WERROR=ON -DPICKY_COMPILER=ON ${{ matrix.build.generate }}
  165. name: 'cmake generate'
  166. - run: cmake --build build
  167. name: 'cmake build'