]> git.ipfire.org Git - thirdparty/curl.git/blame - .github/workflows/linux-old.yml
ci: add CMake build variation, fixup libssh detection in `linux-old`
[thirdparty/curl.git] / .github / workflows / linux-old.yml
CommitLineData
376cd670
DF
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
19name: Old Linux
20
21on:
22 push:
23 branches:
24 - master
25 - '*/ci'
26 paths-ignore:
27 - '**/*.md'
28 - '.azure-pipelines.yml'
29 - '.circleci/**'
30 - '.cirrus.yml'
31 - 'appveyor.*'
32 - 'packages/**'
33 - 'plan9/**'
34 - 'projects/**'
35 - 'winbuild/**'
36 pull_request:
37 branches:
38 - master
39 paths-ignore:
40 - '**/*.md'
41 - '.azure-pipelines.yml'
42 - '.circleci/**'
43 - '.cirrus.yml'
44 - 'appveyor.*'
45 - 'packages/**'
46 - 'plan9/**'
47 - 'projects/**'
48 - 'winbuild/**'
49
50permissions: {}
51
52env:
53 MAKEFLAGS: -j 3
54 DEBIAN_FRONTEND: noninteractive
55
56jobs:
57 cmake:
58 name: linux (cmake)
59 runs-on: 'ubuntu-latest'
60 container: 'debian:stretch'
61
62 steps:
63 - name: 'install prereqs'
64 # Remember, this shell is dash, not bash
65 run: |
66 sed -E -i -e s@[a-z]+\.debian\.org/@archive.debian.org/debian-archive/@ -e '/ stretch-updates /d' /etc/apt/sources.list
67 apt-get update
68 # See comment above if this fails after 2025-05-20
69 apt-get install -y --no-install-suggests --no-install-recommends httrack
70 httrack --get https://deb.freexian.com/extended-lts/pool/main/f/freexian-archive-keyring/freexian-archive-keyring_2022.06.08_all.deb
71 dpkg -i freexian-archive-keyring_2022.06.08_all.deb
72 echo 'deb http://deb.freexian.com/extended-lts stretch-lts main contrib non-free' | tee /etc/apt/sources.list.d/extended-lts.list
73 apt-get update
0469c68f 74 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
376cd670
DF
75 # GitHub's actions/checkout needs a newer glibc. This one is the
76 # latest available for buster, the next stable release after stretch.
77 httrack --get https://security.debian.org/debian-security/pool/updates/main/g/glibc/libc6_2.28-10+deb10u2_amd64.deb
78 dpkg -i libc6_2.28-10+deb10u2_amd64.deb
79
80 - uses: actions/checkout@v4
81
0469c68f 82 - name: 'cmake build-only (out-of-tree, libssh2)'
376cd670 83 run: |
0469c68f
VS
84 mkdir bld-1
85 cd bld-1
86 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
87 make install
88 src/curl --disable --version
89
90 - name: 'cmake generate (out-of-tree, c-ares, libssh, zstd, gssapi)'
91 run: |
92 mkdir bld-cares
93 cd bld-cares
94 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 \
95 -DUSE_LIBSSH=ON '-DCMAKE_C_FLAGS=-I/usr/include -L/usr/lib -lssh'
376cd670
DF
96
97 - name: 'build'
0469c68f
VS
98 run: |
99 make -C bld-cares
100 bld-cares/src/curl --disable --version
376cd670
DF
101
102 - name: 'install'
0469c68f 103 run: make -C bld-cares install
376cd670
DF
104
105 - name: 'tests'
0469c68f 106 run: make -C bld-cares test-ci