macos.yml 4.5 KB

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