macos.yml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. # Copyright (C) 2000 - 2022 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. pull_request:
  11. branches:
  12. - master
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  15. cancel-in-progress: true
  16. jobs:
  17. autotools:
  18. name: ${{ matrix.build.name }}
  19. runs-on: 'macos-latest'
  20. timeout-minutes: 90
  21. strategy:
  22. fail-fast: false
  23. matrix:
  24. build:
  25. - name: normal
  26. install: nghttp2
  27. configure: --without-ssl
  28. macosx-version-min: 10.9
  29. - name: debug
  30. install: nghttp2
  31. configure: --enable-debug --without-ssl
  32. macosx-version-min: 10.9
  33. - name: libssh2
  34. install: nghttp2 libssh2
  35. configure: --enable-debug --with-libssh2 --without-ssl
  36. macosx-version-min: 10.9
  37. - name: libssh-c-ares
  38. install: openssl nghttp2 libssh
  39. configure: --enable-debug --with-libssh --with-openssl=/usr/local/opt/openssl --enable-ares
  40. macosx-version-min: 10.9
  41. - name: libssh
  42. install: openssl nghttp2 libssh
  43. configure: --enable-debug --with-libssh --with-openssl=/usr/local/opt/openssl
  44. macosx-version-min: 10.9
  45. - name: c-ares
  46. install: nghttp2
  47. configure: --enable-debug --enable-ares --without-ssl
  48. macosx-version-min: 10.9
  49. - name: HTTP only
  50. install: nghttp2
  51. 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
  52. macosx-version-min: 10.15
  53. - name: SecureTransport http2
  54. install: nghttp2
  55. configure: --enable-debug --with-secure-transport
  56. macosx-version-min: 10.8
  57. - name: OpenSSL http2
  58. install: nghttp2 openssl
  59. configure: --enable-debug --with-openssl=/usr/local/opt/openssl
  60. macosx-version-min: 10.9
  61. - name: LibreSSL http2
  62. install: nghttp2 libressl
  63. configure: --enable-debug --with-openssl=/usr/local/opt/libressl
  64. macosx-version-min: 10.9
  65. - name: torture
  66. install: nghttp2 openssl
  67. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
  68. tflags: -n -t --shallow=25 !FTP
  69. macosx-version-min: 10.9
  70. - name: torture-ftp
  71. install: nghttp2 openssl
  72. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
  73. tflags: -n -t --shallow=20 FTP
  74. macosx-version-min: 10.9
  75. - name: macOS 10.15
  76. install: nghttp2 libssh2 openssl
  77. configure: --enable-debug --disable-ldap --with-openssl=/usr/local/opt/openssl
  78. macosx-version-min: 10.15
  79. steps:
  80. - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
  81. name: 'brew bundle'
  82. # Run this command with retries because of spurious failures seen
  83. # while running the tests, for example
  84. # https://github.com/curl/curl/runs/4095721123?check_suite_focus=true
  85. - run: brew update && for i in 1 2 3; do brew bundle install --no-lock --file /tmp/Brewfile && break || sleep 1; done
  86. name: 'brew install'
  87. - run: python3 -m pip install impacket
  88. name: 'pip3 install'
  89. - uses: actions/checkout@v3
  90. - run: autoreconf -fi
  91. name: 'autoreconf'
  92. - run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-websockets
  93. name: 'configure'
  94. env:
  95. # -Wvla is caused by brotli
  96. CFLAGS: "-Wno-vla -mmacosx-version-min=${{ matrix.build.macosx-version-min }}"
  97. - run: make V=1
  98. name: 'make'
  99. - run: make V=1 examples
  100. name: 'make examples'
  101. - run: make V=1 -C tests
  102. name: 'make tests'
  103. - run: make V=1 test-ci
  104. name: 'run tests'
  105. env:
  106. TFLAGS: "${{ matrix.build.tflags }} ~1452"
  107. cmake:
  108. name: cmake ${{ matrix.compiler.CC }} ${{ matrix.build.name }}
  109. runs-on: 'macos-latest'
  110. env: ${{ matrix.compiler }}
  111. strategy:
  112. fail-fast: false
  113. matrix:
  114. compiler:
  115. - CC: clang
  116. CXX: clang++
  117. CFLAGS: "-mmacosx-version-min=10.15 -Wno-deprecated-declarations"
  118. - CC: gcc-11
  119. CXX: g++-11
  120. CFLAGS: "-mmacosx-version-min=10.15 -Wno-error=undef -Wno-error=conversion"
  121. build:
  122. - name: OpenSSL
  123. install: nghttp2 openssl
  124. generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
  125. - name: LibreSSL
  126. install: nghttp2 libressl
  127. generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
  128. - name: libssh2
  129. install: nghttp2 openssl libssh2
  130. generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_USE_LIBSSH2=ON
  131. steps:
  132. - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
  133. name: 'brew bundle'
  134. - run: brew update && brew bundle install --no-lock --file /tmp/Brewfile
  135. name: 'brew install'
  136. - run: python3 -m pip install impacket
  137. name: 'pip3 install'
  138. - uses: actions/checkout@v3
  139. - run: cmake -S. -Bbuild -DCURL_WERROR=ON -DPICKY_COMPILER=ON ${{ matrix.build.generate }}
  140. name: 'cmake generate'
  141. - run: cmake --build build
  142. name: 'cmake build'