2
0

linux-old.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. name: Old Linux
  19. 'on':
  20. push:
  21. branches:
  22. - master
  23. - '*/ci'
  24. paths-ignore:
  25. - '**/*.md'
  26. - '.circleci/**'
  27. - 'appveyor.*'
  28. - 'packages/**'
  29. - 'plan9/**'
  30. - 'projects/**'
  31. - 'winbuild/**'
  32. pull_request:
  33. branches:
  34. - master
  35. paths-ignore:
  36. - '**/*.md'
  37. - '.circleci/**'
  38. - 'appveyor.*'
  39. - 'packages/**'
  40. - 'plan9/**'
  41. - 'projects/**'
  42. - 'winbuild/**'
  43. permissions: {}
  44. env:
  45. MAKEFLAGS: -j 5
  46. DEBIAN_FRONTEND: noninteractive
  47. jobs:
  48. cmake:
  49. name: linux (cmake & autoconf)
  50. runs-on: 'ubuntu-latest'
  51. container: 'debian:stretch'
  52. steps:
  53. - name: 'install prereqs'
  54. # Remember, this shell is dash, not bash
  55. run: |
  56. sed -E -i -e s@[a-z]+\.debian\.org/@archive.debian.org/debian-archive/@ -e '/ stretch-updates /d' /etc/apt/sources.list
  57. apt-get update
  58. # See comment above if this fails after 2025-05-20
  59. apt-get install -y --no-install-suggests --no-install-recommends httrack
  60. httrack --get https://deb.freexian.com/extended-lts/pool/main/f/freexian-archive-keyring/freexian-archive-keyring_2022.06.08_all.deb
  61. dpkg -i freexian-archive-keyring_2022.06.08_all.deb
  62. echo 'deb http://deb.freexian.com/extended-lts stretch-lts main contrib non-free' | tee /etc/apt/sources.list.d/extended-lts.list
  63. apt-get update
  64. apt-get 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
  65. # GitHub's actions/checkout needs a newer glibc. This one is the
  66. # latest available for buster, the next stable release after stretch.
  67. httrack --get https://security.debian.org/debian-security/pool/updates/main/g/glibc/libc6_2.28-10+deb10u4_amd64.deb
  68. dpkg -i libc6_*_amd64.deb
  69. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
  70. with:
  71. persist-credentials: false
  72. - name: 'cmake build-only (out-of-tree, libssh2)'
  73. run: |
  74. mkdir bld-1
  75. cd bld-1
  76. cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
  77. -DENABLE_ARES=OFF -DCURL_ZSTD=OFF -DCURL_USE_GSSAPI=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_LIBSSH=OFF -DUSE_LIBRTMP=ON
  78. make install
  79. src/curl --disable --version
  80. - name: 'cmake build-only curl_config.h'
  81. run: |
  82. echo '::group::raw'; cat bld-1/lib/curl_config.h || true; echo '::endgroup::'
  83. grep -F '#define' bld-1/lib/curl_config.h | sort || true
  84. - name: 'cmake generate (out-of-tree, c-ares, libssh, zstd, gssapi)'
  85. run: |
  86. mkdir bld-cares
  87. cd bld-cares
  88. cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
  89. -DENABLE_ARES=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DUSE_LIBRTMP=ON \
  90. -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON
  91. - name: 'cmake curl_config.h'
  92. run: |
  93. echo '::group::raw'; cat bld-cares/lib/curl_config.h || true; echo '::endgroup::'
  94. grep -F '#define' bld-cares/lib/curl_config.h | sort || true
  95. - name: 'cmake build'
  96. run: |
  97. make -C bld-cares
  98. bld-cares/src/curl --disable --version
  99. - name: 'cmake install'
  100. run: make -C bld-cares install
  101. - name: 'cmake build tests'
  102. run: make -C bld-cares testdeps
  103. - name: 'cmake run tests'
  104. run: make -C bld-cares test-ci
  105. - name: 'autoreconf'
  106. run: autoreconf -if
  107. - name: 'configure (out-of-tree, c-ares, libssh, zstd, gssapi)'
  108. run: |
  109. mkdir bld-am
  110. cd bld-am
  111. ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \
  112. --with-openssl --enable-ares --with-libssh --with-zstd --with-gssapi --with-librtmp \
  113. --prefix="$PWD"/../install-am
  114. - name: 'autoconf curl_config.h'
  115. run: |
  116. echo '::group::raw'; cat bld-am/lib/curl_config.h || true; echo '::endgroup::'
  117. grep -F '#define' bld-am/lib/curl_config.h | sort || true
  118. - name: 'autoconf build'
  119. run: |
  120. make -C bld-am
  121. bld-am/src/curl --disable --version
  122. - name: 'autoconf install'
  123. run: make -C bld-am install
  124. - name: 'autoconf build tests'
  125. run: make -C bld-am/tests all