linux-old.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 Feexian 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. - '.azure-pipelines.yml'
  27. - '.circleci/**'
  28. - '.cirrus.yml'
  29. - 'appveyor.*'
  30. - 'packages/**'
  31. - 'plan9/**'
  32. - 'projects/**'
  33. - 'winbuild/**'
  34. pull_request:
  35. branches:
  36. - master
  37. paths-ignore:
  38. - '**/*.md'
  39. - '.azure-pipelines.yml'
  40. - '.circleci/**'
  41. - '.cirrus.yml'
  42. - 'appveyor.*'
  43. - 'packages/**'
  44. - 'plan9/**'
  45. - 'projects/**'
  46. - 'winbuild/**'
  47. permissions: {}
  48. env:
  49. MAKEFLAGS: -j 3
  50. DEBIAN_FRONTEND: noninteractive
  51. jobs:
  52. cmake:
  53. name: linux (cmake)
  54. runs-on: 'ubuntu-latest'
  55. container: 'debian:stretch'
  56. steps:
  57. - name: 'install prereqs'
  58. # Remember, this shell is dash, not bash
  59. run: |
  60. sed -E -i -e s@[a-z]+\.debian\.org/@archive.debian.org/debian-archive/@ -e '/ stretch-updates /d' /etc/apt/sources.list
  61. apt-get update
  62. # See comment above if this fails after 2025-05-20
  63. apt-get install -y --no-install-suggests --no-install-recommends httrack
  64. httrack --get https://deb.freexian.com/extended-lts/pool/main/f/freexian-archive-keyring/freexian-archive-keyring_2022.06.08_all.deb
  65. dpkg -i freexian-archive-keyring_2022.06.08_all.deb
  66. echo 'deb http://deb.freexian.com/extended-lts stretch-lts main contrib non-free' | tee /etc/apt/sources.list.d/extended-lts.list
  67. apt-get update
  68. apt-get install -y --no-install-suggests --no-install-recommends cmake make gcc pkg-config libpsl-dev libzstd-dev zlib1g-dev libssl1.0-dev libssh-dev libssh2-1-dev libc-ares-dev heimdal-dev libldap2-dev stunnel4 groff
  69. # GitHub's actions/checkout needs a newer glibc. This one is the
  70. # latest available for buster, the next stable release after stretch.
  71. httrack --get https://security.debian.org/debian-security/pool/updates/main/g/glibc/libc6_2.28-10+deb10u3_amd64.deb
  72. dpkg -i libc6_2.28-10+deb10u3_amd64.deb
  73. - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
  74. - name: 'cmake build-only (out-of-tree, libssh2)'
  75. run: |
  76. mkdir bld-1
  77. cd bld-1
  78. cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON -DENABLE_ARES=OFF -DCURL_ZSTD=OFF -DCURL_USE_GSSAPI=OFF -DCURL_USE_LIBSSH2=ON -DCURL_USE_LIBSSH=OFF
  79. make install
  80. src/curl --disable --version
  81. - name: 'cmake generate (out-of-tree, c-ares, libssh, zstd, gssapi)'
  82. run: |
  83. mkdir bld-cares
  84. cd bld-cares
  85. cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON -DENABLE_ARES=ON -DCURL_ZSTD=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF \
  86. -DUSE_LIBSSH=ON '-DCMAKE_C_FLAGS=-I/usr/include -L/usr/lib -lssh'
  87. - name: 'build'
  88. run: |
  89. make -C bld-cares
  90. bld-cares/src/curl --disable --version
  91. - name: 'install'
  92. run: make -C bld-cares install
  93. - name: 'tests'
  94. run: make -C bld-cares test-ci