2
0

linux-old.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. - name: 'cmake build-only (out-of-tree, libssh2)'
  71. run: |
  72. mkdir bld-1
  73. cd bld-1
  74. cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
  75. -DENABLE_ARES=OFF -DCURL_ZSTD=OFF -DCURL_USE_GSSAPI=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_LIBSSH=OFF -DUSE_LIBRTMP=ON
  76. make install
  77. src/curl --disable --version
  78. - name: 'cmake build-only curl_config.h'
  79. run: |
  80. echo '::group::raw'; cat bld-1/lib/curl_config.h || true; echo '::endgroup::'
  81. grep -F '#define' bld-1/lib/curl_config.h | sort || true
  82. - name: 'cmake generate (out-of-tree, c-ares, libssh, zstd, gssapi)'
  83. run: |
  84. mkdir bld-cares
  85. cd bld-cares
  86. cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
  87. -DENABLE_ARES=ON -DCURL_ZSTD=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DUSE_LIBRTMP=ON \
  88. -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON
  89. - name: 'cmake curl_config.h'
  90. run: |
  91. echo '::group::raw'; cat bld-cares/lib/curl_config.h || true; echo '::endgroup::'
  92. grep -F '#define' bld-cares/lib/curl_config.h | sort || true
  93. - name: 'cmake build'
  94. run: |
  95. make -C bld-cares
  96. bld-cares/src/curl --disable --version
  97. - name: 'cmake install'
  98. run: make -C bld-cares install
  99. - name: 'cmake build tests'
  100. run: make -C bld-cares testdeps
  101. - name: 'cmake run tests'
  102. run: make -C bld-cares test-ci
  103. - name: 'autoreconf'
  104. run: autoreconf -if
  105. - name: 'configure (out-of-tree, c-ares, libssh, zstd, gssapi)'
  106. run: |
  107. mkdir bld-am
  108. cd bld-am
  109. ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \
  110. --with-openssl --enable-ares --with-libssh --with-zstd --with-gssapi --with-librtmp \
  111. --prefix="$PWD"/../install-am
  112. - name: 'autoconf curl_config.h'
  113. run: |
  114. echo '::group::raw'; cat bld-am/lib/curl_config.h || true; echo '::endgroup::'
  115. grep -F '#define' bld-am/lib/curl_config.h | sort || true
  116. - name: 'autoconf build'
  117. run: |
  118. make -C bld-am
  119. bld-am/src/curl --disable --version
  120. - name: 'autoconf install'
  121. run: make -C bld-am install
  122. - name: 'autoconf build tests'
  123. run: make -C bld-am/tests all