macos.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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: c-ares
  34. install: nghttp2
  35. configure: --enable-debug --enable-ares --without-ssl
  36. macosx-version-min: 10.9
  37. - name: HTTP only
  38. install: nghttp2
  39. 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
  40. macosx-version-min: 10.15
  41. - name: SecureTransport http2
  42. install: nghttp2
  43. configure: --enable-debug --with-secure-transport
  44. macosx-version-min: 10.8
  45. - name: OpenSSL http2
  46. install: nghttp2 openssl
  47. configure: --enable-debug --with-openssl=/usr/local/opt/openssl
  48. macosx-version-min: 10.9
  49. - name: LibreSSL http2
  50. install: nghttp2 libressl
  51. configure: --enable-debug --with-openssl=/usr/local/opt/libressl
  52. macosx-version-min: 10.9
  53. - name: torture
  54. install: nghttp2 openssl
  55. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
  56. tflags: -n -t --shallow=25 !FTP
  57. macosx-version-min: 10.9
  58. - name: torture-ftp
  59. install: nghttp2 openssl
  60. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
  61. tflags: -n -t --shallow=20 FTP
  62. macosx-version-min: 10.9
  63. - name: macOS 10.15
  64. install: nghttp2 libssh2 openssl
  65. configure: --enable-debug --disable-ldap --with-openssl=/usr/local/opt/openssl
  66. macosx-version-min: 10.15
  67. steps:
  68. - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
  69. name: 'brew bundle'
  70. - run: brew update && brew bundle install --no-lock --file /tmp/Brewfile
  71. name: 'brew install'
  72. - uses: actions/checkout@v2
  73. - run: ./buildconf && ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
  74. name: 'configure'
  75. env:
  76. # -Wvla is caused by brotli
  77. CFLAGS: "-Wno-vla -mmacosx-version-min=${{ matrix.build.macosx-version-min }}"
  78. - run: make
  79. name: 'make'
  80. - run: make test-nonflaky
  81. name: 'test'
  82. env:
  83. TFLAGS: "${{ matrix.build.tflags }} ~1452"
  84. cmake:
  85. name: cmake ${{ matrix.compiler.CC }} ${{ matrix.build.name }}
  86. runs-on: 'macos-latest'
  87. env: ${{ matrix.compiler }}
  88. strategy:
  89. fail-fast: false
  90. matrix:
  91. compiler:
  92. - CC: clang
  93. CXX: clang++
  94. CFLAGS: "-mmacosx-version-min=10.15 -Wno-deprecated-declarations"
  95. - CC: gcc-9
  96. CXX: g++-9
  97. CFLAGS: "-mmacosx-version-min=10.15 -Wno-error=undef -Wno-error=conversion"
  98. build:
  99. - name: OpenSSL
  100. install: nghttp2 openssl
  101. generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
  102. - name: LibreSSL
  103. install: nghttp2 libressl
  104. generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
  105. - name: libssh2
  106. install: nghttp2 openssl libssh2
  107. generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_USE_LIBSSH2=ON
  108. steps:
  109. - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
  110. name: 'brew bundle'
  111. - run: brew update && brew bundle install --no-lock --file /tmp/Brewfile
  112. name: 'brew install'
  113. - uses: actions/checkout@v2
  114. - run: cmake -H. -Bbuild -DCURL_WERROR=ON -DPICKY_COMPILER=ON ${{ matrix.build.generate }}
  115. name: 'cmake generate'
  116. - run: cmake --build build
  117. name: 'cmake build'