2
0

configure-vs-cmake.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  2. #
  3. # SPDX-License-Identifier: curl
  4. name: configure-vs-cmake
  5. 'on':
  6. push:
  7. branches:
  8. - master
  9. paths:
  10. - '*.ac'
  11. - '**/*.m4'
  12. - '**/CMakeLists.txt'
  13. - 'lib/curl_config.h.cmake'
  14. - '.github/scripts/cmp-config.pl'
  15. - '.github/workflows/configure-vs-cmake.yml'
  16. pull_request:
  17. branches:
  18. - master
  19. paths:
  20. - '*.ac'
  21. - '**/*.m4'
  22. - '**/CMakeLists.txt'
  23. - 'lib/curl_config.h.cmake'
  24. - '.github/scripts/cmp-config.pl'
  25. - '.github/workflows/configure-vs-cmake.yml'
  26. permissions: {}
  27. jobs:
  28. check-linux:
  29. runs-on: ubuntu-latest
  30. steps:
  31. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  32. with:
  33. persist-credentials: false
  34. - name: run configure --with-openssl
  35. run: |
  36. autoreconf -fi
  37. export PKG_CONFIG_DEBUG_SPEW=1
  38. mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl --without-brotli
  39. - name: run cmake
  40. run: |
  41. cmake -B bld-cm -DCURL_USE_LIBPSL=OFF -DCURL_BROTLI=OFF
  42. - name: 'configure log'
  43. run: cat bld-am/config.log 2>/dev/null || true
  44. - name: 'cmake log'
  45. run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
  46. - name: compare generated curl_config.h files
  47. run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
  48. - name: compare generated libcurl.pc files
  49. run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
  50. - name: compare generated curl-config files
  51. run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
  52. check-macos:
  53. runs-on: macos-latest
  54. steps:
  55. - name: install packages
  56. run: |
  57. while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew install libtool autoconf automake && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done
  58. - name: 'toolchain versions'
  59. run: |
  60. echo '::group::brew packages installed'; ls -l "$(brew --prefix)/opt"; echo '::endgroup::'
  61. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  62. with:
  63. persist-credentials: false
  64. - name: run configure --with-openssl
  65. run: |
  66. autoreconf -fi
  67. export PKG_CONFIG_DEBUG_SPEW=1
  68. mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl --disable-ldap --with-zstd
  69. - name: run cmake
  70. run: |
  71. cmake -B bld-cm -DCURL_USE_LIBPSL=OFF -DCURL_DISABLE_LDAP=ON \
  72. "-DCMAKE_C_COMPILER_TARGET=$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
  73. -DCURL_BROTLI=OFF \
  74. -DCURL_USE_LIBSSH2=OFF
  75. - name: 'configure log'
  76. run: cat bld-am/config.log 2>/dev/null || true
  77. - name: 'cmake log'
  78. run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
  79. - name: compare generated curl_config.h files
  80. run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
  81. - name: compare generated libcurl.pc files
  82. run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
  83. - name: compare generated curl-config files
  84. run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
  85. check-windows:
  86. runs-on: ubuntu-latest
  87. env:
  88. TRIPLET: 'x86_64-w64-mingw32'
  89. steps:
  90. - name: install packages
  91. run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64
  92. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  93. with:
  94. persist-credentials: false
  95. - name: run configure --with-schannel
  96. run: |
  97. autoreconf -fi
  98. export PKG_CONFIG_DEBUG_SPEW=1
  99. mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-schannel --without-libpsl --host=${TRIPLET}
  100. - name: run cmake
  101. run: |
  102. cmake -B bld-cm -DCURL_USE_SCHANNEL=ON -DCURL_USE_LIBPSL=OFF \
  103. -DCMAKE_SYSTEM_NAME=Windows \
  104. -DCMAKE_C_COMPILER_TARGET=${TRIPLET} \
  105. -DCMAKE_C_COMPILER=${TRIPLET}-gcc
  106. - name: 'configure log'
  107. run: cat bld-am/config.log 2>/dev/null || true
  108. - name: 'cmake log'
  109. run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
  110. - name: compare generated curl_config.h files
  111. run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
  112. - name: compare generated libcurl.pc files
  113. run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
  114. - name: compare generated curl-config files
  115. run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config