1# Copyright (C) Daniel Fandrich, <dan@coneharvesters.com>, et al. 2# 3# SPDX-License-Identifier: curl 4# 5# Compile on an old version of Linux that has barely the minimal build 6# requirements for CMake. This tests that curl is still usable on really 7# outdated systems. 8# 9# Debian stretch is chosen as it closely matches some of the oldest major 10# versions we support (especially cmake); see docs/INTERNALS.md and it 11# is still supported (as of this writing). 12# stretch has ELTS support from Freexian until 2027-06-30 13# For ELTS info see https://www.freexian.com/lts/extended/docs/how-to-use-extended-lts/ 14# The Debian key will expire 2025-05-20, after which package signature 15# verification may need to be disabled. 16# httrack is one of the smallest downloaders, needed to bootstrap ELTS, 17# and won't conflict with the curl we're building. 18 19name: Old Linux 20 21'on': 22 push: 23 branches: 24 - master 25 - '*/ci' 26 paths-ignore: 27 - '**/*.md' 28 - '.circleci/**' 29 - 'appveyor.*' 30 - 'packages/**' 31 - 'plan9/**' 32 - 'projects/**' 33 - 'winbuild/**' 34 pull_request: 35 branches: 36 - master 37 paths-ignore: 38 - '**/*.md' 39 - '.circleci/**' 40 - 'appveyor.*' 41 - 'packages/**' 42 - 'plan9/**' 43 - 'projects/**' 44 - 'winbuild/**' 45 46permissions: {} 47 48env: 49 MAKEFLAGS: -j 5 50 DEBIAN_FRONTEND: noninteractive 51 52jobs: 53 cmake: 54 name: linux (cmake & autoconf) 55 runs-on: 'ubuntu-latest' 56 container: 'debian:stretch' 57 58 steps: 59 - name: 'install prereqs' 60 # Remember, this shell is dash, not bash 61 run: | 62 sed -E -i -e s@[a-z]+\.debian\.org/@archive.debian.org/debian-archive/@ -e '/ stretch-updates /d' /etc/apt/sources.list 63 apt-get -o Dpkg::Use-Pty=0 update 64 # See comment above if this fails after 2025-05-20 65 apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends httrack 66 httrack --get https://deb.freexian.com/extended-lts/pool/main/f/freexian-archive-keyring/freexian-archive-keyring_2022.06.08_all.deb 67 dpkg -i freexian-archive-keyring_2022.06.08_all.deb 68 echo 'deb http://deb.freexian.com/extended-lts stretch-lts main contrib non-free' | tee /etc/apt/sources.list.d/extended-lts.list 69 apt-get -o Dpkg::Use-Pty=0 update 70 apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends cmake make automake autoconf libtool gcc pkg-config libpsl-dev libzstd-dev zlib1g-dev libssl1.0-dev libssh-dev libssh2-1-dev libc-ares-dev heimdal-dev libldap2-dev librtmp-dev stunnel4 groff 71 # GitHub's actions/checkout needs a newer glibc. This one is the 72 # latest available for buster, the next stable release after stretch. 73 httrack --get https://security.debian.org/debian-security/pool/updates/main/g/glibc/libc6_2.28-10+deb10u4_amd64.deb 74 dpkg -i libc6_*_amd64.deb 75 76 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 77 with: 78 persist-credentials: false 79 80 - name: 'cmake build-only (out-of-tree, libssh2)' 81 run: | 82 mkdir bld-1 83 cd bld-1 84 cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \ 85 -DENABLE_ARES=OFF -DCURL_ZSTD=OFF -DCURL_USE_GSSAPI=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_LIBSSH=OFF -DUSE_LIBRTMP=ON 86 make install 87 src/curl --disable --version 88 89 - name: 'cmake build-only curl_config.h' 90 run: | 91 echo '::group::raw'; cat bld-1/lib/curl_config.h || true; echo '::endgroup::' 92 grep -F '#define' bld-1/lib/curl_config.h | sort || true 93 94 - name: 'cmake generate (out-of-tree, c-ares, libssh, zstd, gssapi)' 95 run: | 96 mkdir bld-cares 97 cd bld-cares 98 cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \ 99 -DENABLE_ARES=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DUSE_LIBRTMP=ON \ 100 -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON 101 102 - name: 'cmake curl_config.h' 103 run: | 104 echo '::group::raw'; cat bld-cares/lib/curl_config.h || true; echo '::endgroup::' 105 grep -F '#define' bld-cares/lib/curl_config.h | sort || true 106 107 - name: 'cmake build' 108 run: | 109 make -C bld-cares 110 bld-cares/src/curl --disable --version 111 112 - name: 'cmake install' 113 run: make -C bld-cares install 114 115 - name: 'cmake build tests' 116 run: make -C bld-cares testdeps 117 118 - name: 'cmake run tests' 119 run: make -C bld-cares test-ci 120 121 - name: 'autoreconf' 122 run: autoreconf -if 123 124 - name: 'configure (out-of-tree, c-ares, libssh, zstd, gssapi)' 125 run: | 126 mkdir bld-am 127 cd bld-am 128 ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \ 129 --with-openssl --enable-ares --with-libssh --with-zstd --with-gssapi --with-librtmp \ 130 --prefix="$PWD"/../install-am 131 132 - name: 'autoconf curl_config.h' 133 run: | 134 echo '::group::raw'; cat bld-am/lib/curl_config.h || true; echo '::endgroup::' 135 grep -F '#define' bld-am/lib/curl_config.h | sort || true 136 137 - name: 'autoconf build' 138 run: | 139 make -C bld-am 140 bld-am/src/curl --disable --version 141 142 - name: 'autoconf install' 143 run: make -C bld-am install 144 145 - name: 'autoconf build tests' 146 run: make -C bld-am/tests all 147