configure-vs-cmake.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
  32. - name: run configure --with-openssl
  33. run: |
  34. autoreconf -fi
  35. export PKG_CONFIG_DEBUG_SPEW=1
  36. mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl --without-brotli --without-zstd
  37. - name: run cmake
  38. run: |
  39. cmake -B bld-cm -DCURL_USE_LIBPSL=OFF
  40. - name: 'configure log'
  41. run: cat bld-am/config.log 2>/dev/null || true
  42. - name: 'cmake log'
  43. run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
  44. - name: compare generated curl_config.h files
  45. run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
  46. - name: compare generated libcurl.pc files
  47. run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
  48. - name: compare generated curl-config files
  49. run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
  50. check-macos:
  51. runs-on: macos-latest
  52. steps:
  53. - name: install packages
  54. run: |
  55. 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
  56. - name: 'toolchain versions'
  57. run: |
  58. echo '::group::brew packages installed'; ls -l "$(brew --prefix)/opt"; echo '::endgroup::'
  59. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
  60. - name: run configure --with-openssl
  61. run: |
  62. autoreconf -fi
  63. export PKG_CONFIG_DEBUG_SPEW=1
  64. mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl --disable-ldap
  65. - name: run cmake
  66. run: |
  67. cmake -B bld-cm -DCURL_USE_LIBPSL=OFF -DCURL_DISABLE_LDAP=ON \
  68. "-DCMAKE_C_COMPILER_TARGET=$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
  69. -DCURL_USE_LIBSSH2=OFF
  70. - name: 'configure log'
  71. run: cat bld-am/config.log 2>/dev/null || true
  72. - name: 'cmake log'
  73. run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
  74. - name: compare generated curl_config.h files
  75. run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
  76. - name: compare generated libcurl.pc files
  77. run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
  78. - name: compare generated curl-config files
  79. run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
  80. check-windows:
  81. runs-on: ubuntu-latest
  82. env:
  83. TRIPLET: 'x86_64-w64-mingw32'
  84. steps:
  85. - name: install packages
  86. run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64
  87. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
  88. - name: run configure --with-schannel
  89. run: |
  90. autoreconf -fi
  91. export PKG_CONFIG_DEBUG_SPEW=1
  92. mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-schannel --without-libpsl --host=${TRIPLET}
  93. - name: run cmake
  94. run: |
  95. cmake -B bld-cm -DCURL_USE_SCHANNEL=ON -DCURL_USE_LIBPSL=OFF \
  96. -DCMAKE_SYSTEM_NAME=Windows \
  97. -DCMAKE_C_COMPILER_TARGET=${TRIPLET} \
  98. -DCMAKE_C_COMPILER=${TRIPLET}-gcc
  99. - name: 'configure log'
  100. run: cat bld-am/config.log 2>/dev/null || true
  101. - name: 'cmake log'
  102. run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
  103. - name: compare generated curl_config.h files
  104. run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
  105. - name: compare generated libcurl.pc files
  106. run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
  107. - name: compare generated curl-config files
  108. run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config