macos.yml 5.6 KB

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