# Copyright (C) Daniel Fandrich, , et al. # # SPDX-License-Identifier: curl # # Compile on an old version of Linux that has barely the minimal build # requirements for CMake. This tests that curl is still usable on really # outdated systems. # # Debian stretch is chosen as it closely matches some of the oldest major # versions we support (especially cmake); see docs/DEPENDENCIES.md and it # is still supported (as of this writing). # stretch has ELTS support from Freexian until 2027-06-30 # For ELTS info see https://www.freexian.com/lts/extended/docs/how-to-use-extended-lts/ # The Debian key expires 2025-05-20, after which package signature # verification may need to be disabled. # httrack is one of the smallest downloaders, needed to bootstrap ELTS, # and doesn not conflict with the curl we are building. name: 'Linux Old' 'on': push: branches: - master - 'curl-*' - '*/ci' paths-ignore: - '**/*.md' - 'appveyor.*' - 'Dockerfile' - 'projects/**' pull_request: branches: - master - 'curl-*' paths-ignore: - '**/*.md' - 'appveyor.*' - 'Dockerfile' - 'projects/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true permissions: {} cache-mode: none env: MAKEFLAGS: -j 5 CURL_CI: github CURL_TEST_MIN: 1680 DEBIAN_FRONTEND: noninteractive DO_NOT_TRACK: '1' jobs: cmake-autotools: name: 'autotools & cmake' runs-on: ubuntu-latest container: debian:stretch-20220622-slim@sha256:c5cd3ffceeb25b683bf5111ea89bf8049a177e00fb237235d48076a19cc80097 # manually bumped (oldest supported Debian major version, rule disabled) steps: - name: 'install prereqs' # Remember, this shell is dash, not bash run: | sed -E -i -e s@[a-z]+\.debian\.org/@archive.debian.org/debian-archive/@ -e '/ stretch-updates /d' /etc/apt/sources.list apt-get -o Dpkg::Use-Pty=0 update # See comment above if this fails after 2025-05-20 apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends curl ca-certificates curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ https://deb.freexian.com/extended-lts/pool/main/f/freexian-archive-keyring/freexian-archive-keyring_2022.06.08_all.deb --output pkg.deb sha256sum pkg.deb | tee /dev/stderr | grep -qwF -- a8160d1aa1a40aa9988bf0b389b650550c7460ec3b4ec1d847778fe44b9c4dbc && dpkg -i pkg.deb echo 'deb http://deb.freexian.com/extended-lts stretch-lts main contrib non-free' | tee /etc/apt/sources.list.d/extended-lts.list apt-get -o Dpkg::Use-Pty=0 update apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends \ make automake autoconf libtool ninja-build gcc pkg-config libpsl-dev libzstd-dev zlib1g-dev libkrb5-dev libldap2-dev stunnel4 # GitHub's actions/checkout needs newer glibc and libstdc++. The latter also depends on # gcc-8-base, but it does not actually seem used in our situation and is not available in # the main repo, so force the install. curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ https://deb.freexian.com/extended-lts/pool/main/g/glibc/libc6_2.28-10+deb10u5_amd64.deb --output pkg-c.deb sha256sum pkg-c.deb | tee /dev/stderr | grep -qwF -- 0eec8ab0c8a4d018548a0ee3b23b6dadafcd9903d62ea50f36c86be24530471a curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ https://deb.freexian.com/extended-lts/pool/main/g/gcc-8/libstdc++6_8.3.0-6_amd64.deb --output pkg-cpp.deb sha256sum pkg-cpp.deb | tee /dev/stderr | grep -qwF -- 5cc70625329655ff9382580971d4616db8aa39af958b7c995ee84598f142a4ee dpkg -i --force-depends pkg-c.deb pkg-cpp.deb - name: 'install prereqs (cmake)' env: CMAKE_VERSION: 3.18.0 # manually bumped (lowest minor version supported by curl) CMAKE_SHA256: 4d9a9d3351161073a67e49366d701b6fa4b0343781982dc5eef08a02a750d403 run: | cd ~ curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ --location --proto-redir =https "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" --output pkg.bin sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${CMAKE_SHA256}" && tar -xzf pkg.bin && rm -f pkg.bin mv "cmake-${CMAKE_VERSION}-Linux-x86_64" cmake - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: 'CM build-only configure (out-of-tree)' run: | ~/cmake/bin/cmake -B bld-1 -G Ninja -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \ -DCURL_ENABLE_SSL=OFF -DENABLE_ARES=OFF -DCURL_ZSTD=OFF -DCURL_USE_GSSAPI=OFF -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF - name: 'CM build-only build' run: | ~/cmake/bin/cmake --build bld-1 --verbose ~/cmake/bin/cmake --install bld-1 --verbose - name: 'CM build-only curl -V' run: bld-1/src/curl --disable --version - name: 'CM build-only configure log' if: ${{ !cancelled() }} run: cat bld-1/CMakeFiles/CMake*.log 2>/dev/null || true - name: 'CM build-only curl_config.h' run: | echo '::group::raw'; cat bld-1/lib/curl_config.h || true; echo '::endgroup::' grep -F '#define' bld-1/lib/curl_config.h | sort || true # when this job can get libssh 0.9.0 or greater, this should get that enabled again # when this job can get c-ares 1.16.0 or greater, this should get that enabled again - name: 'CM configure (out-of-tree, zstd, gssapi)' run: | ~/cmake/bin/cmake -B bld-oldie -G Ninja -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \ -DCURL_ENABLE_SSL=OFF -DENABLE_ARES=OFF -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF \ -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON - name: 'CM configure log' if: ${{ !cancelled() }} run: cat bld-oldie/CMakeFiles/CMake*.log 2>/dev/null || true - name: 'CM curl_config.h' run: | echo '::group::raw'; cat bld-oldie/lib/curl_config.h || true; echo '::endgroup::' grep -F '#define' bld-oldie/lib/curl_config.h | sort || true - name: 'CM build' run: ~/cmake/bin/cmake --build bld-oldie - name: 'CM curl -V' run: bld-oldie/src/curl --disable --version - name: 'CM install' run: ~/cmake/bin/cmake --install bld-oldie - name: 'CM build tests' run: ~/cmake/bin/cmake --build bld-oldie --target testdeps - name: 'CM run tests' run: ~/cmake/bin/cmake --build bld-oldie --target test-ci - name: 'CM build examples' run: ~/cmake/bin/cmake --build bld-oldie --target curl-examples-build - name: 'AM autoreconf' run: autoreconf -fi - name: 'AM configure (out-of-tree, zstd, gssapi)' run: | mkdir bld-am cd bld-am ../configure --prefix="$PWD"/../curl-install-am --enable-unity --enable-warnings --enable-werror --disable-shared \ --disable-dependency-tracking --enable-option-checking=fatal \ --without-ssl --disable-ares --without-libssh2 --with-zstd --with-gssapi - name: 'AM configure log' if: ${{ !cancelled() }} run: cat bld-am/config.log 2>/dev/null || true - name: 'AM curl_config.h' run: | echo '::group::raw'; cat bld-am/lib/curl_config.h || true; echo '::endgroup::' grep -F '#define' bld-am/lib/curl_config.h | sort || true - name: 'AM build' run: make -C bld-am - name: 'AM curl -V' run: bld-am/src/curl --disable --version - name: 'AM install' run: make -C bld-am install - name: 'AM build tests' run: make -C bld-am/tests all