• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2#
3# SPDX-License-Identifier: curl
4
5name: configure-vs-cmake
6'on':
7  push:
8    branches:
9      - master
10    paths:
11      - '*.ac'
12      - '**/*.m4'
13      - '**/CMakeLists.txt'
14      - 'CMake/**'
15      - 'lib/curl_config.h.cmake'
16      - '.github/scripts/cmp-config.pl'
17      - '.github/workflows/configure-vs-cmake.yml'
18
19  pull_request:
20    branches:
21      - master
22    paths:
23      - '*.ac'
24      - '**/*.m4'
25      - '**/CMakeLists.txt'
26      - 'CMake/**'
27      - 'lib/curl_config.h.cmake'
28      - '.github/scripts/cmp-config.pl'
29      - '.github/workflows/configure-vs-cmake.yml'
30
31permissions: {}
32
33jobs:
34  check-linux:
35    runs-on: ubuntu-latest
36    steps:
37      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
38        with:
39          persist-credentials: false
40
41      - name: 'run configure --with-openssl'
42        run: |
43          autoreconf -fi
44          export PKG_CONFIG_DEBUG_SPEW=1
45          mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl --without-brotli
46
47      - name: 'run cmake'
48        run: |
49          cmake -B bld-cm -DCURL_USE_LIBPSL=OFF -DCURL_BROTLI=OFF
50
51      - name: 'configure log'
52        run: cat bld-am/config.log 2>/dev/null || true
53
54      - name: 'cmake log'
55        run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
56
57      - name: 'compare generated curl_config.h files'
58        run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
59
60      - name: 'compare generated libcurl.pc files'
61        run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
62
63      - name: 'compare generated curl-config files'
64        run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
65
66  check-macos:
67    runs-on: macos-latest
68    steps:
69      - name: 'install packages'
70        run: |
71          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
72
73      - name: 'toolchain versions'
74        run: |
75         echo '::group::brew packages installed'; ls -l "$(brew --prefix)/opt"; echo '::endgroup::'
76
77      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
78        with:
79          persist-credentials: false
80
81      - name: 'run configure --with-openssl'
82        run: |
83          autoreconf -fi
84          export PKG_CONFIG_DEBUG_SPEW=1
85          mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl --disable-ldap --with-zstd
86
87      - name: 'run cmake'
88        run: |
89          cmake -B bld-cm -DCURL_USE_LIBPSL=OFF -DCURL_DISABLE_LDAP=ON \
90            -DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \
91            -DCURL_BROTLI=OFF \
92            -DCURL_USE_LIBSSH2=OFF
93
94      - name: 'configure log'
95        run: cat bld-am/config.log 2>/dev/null || true
96
97      - name: 'cmake log'
98        run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
99
100      - name: 'compare generated curl_config.h files'
101        run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
102
103      - name: 'compare generated libcurl.pc files'
104        run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
105
106      - name: 'compare generated curl-config files'
107        run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
108
109  check-windows:
110    runs-on: ubuntu-latest
111    env:
112      TRIPLET: 'x86_64-w64-mingw32'
113    steps:
114      - name: 'install packages'
115        run: sudo apt-get -o Dpkg::Use-Pty=0 install mingw-w64
116
117      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
118        with:
119          persist-credentials: false
120
121      - name: 'run configure --with-schannel'
122        run: |
123          autoreconf -fi
124          export PKG_CONFIG_DEBUG_SPEW=1
125          mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-schannel --without-libpsl --host="${TRIPLET}"
126
127      - name: 'run cmake'
128        run: |
129          cmake -B bld-cm -DCURL_USE_SCHANNEL=ON -DCURL_USE_LIBPSL=OFF \
130            -DCMAKE_SYSTEM_NAME=Windows \
131            -DCMAKE_C_COMPILER_TARGET="${TRIPLET}" \
132            -DCMAKE_C_COMPILER="${TRIPLET}-gcc"
133
134      - name: 'configure log'
135        run: cat bld-am/config.log 2>/dev/null || true
136
137      - name: 'cmake log'
138        run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
139
140      - name: 'compare generated curl_config.h files'
141        run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h
142
143      - name: 'compare generated libcurl.pc files'
144        run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc
145
146      - name: 'compare generated curl-config files'
147        run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config
148