xref: /curl/.github/workflows/distcheck.yml (revision 8a7efdb8)
1# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2#
3# SPDX-License-Identifier: curl
4
5name: dist
6
7'on':
8  push:
9    branches:
10      - master
11      - '*/ci'
12  pull_request:
13    branches:
14      - master
15
16concurrency:
17  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
18  cancel-in-progress: true
19
20permissions: {}
21
22jobs:
23  maketgz-and-verify-in-tree:
24    runs-on: ubuntu-latest
25    timeout-minutes: 15
26    steps:
27      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
28
29      - run: sudo apt-get purge -y curl libcurl4 libcurl4-doc
30        name: 'remove preinstalled curl libcurl4{-doc}'
31
32      - run: autoreconf -fi
33        name: 'autoreconf'
34
35      - run: ./configure --without-ssl --without-libpsl
36        name: 'configure'
37
38      - run: make V=1
39        name: 'make'
40
41      - name: 'maketgz'
42        run: |
43          SOURCE_DATE_EPOCH=1711526400 ./scripts/maketgz 99.98.97
44
45      - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
46        with:
47          name: 'release-tgz'
48          path: 'curl-99.98.97.tar.gz'
49          retention-days: 1
50
51      - run: |
52          echo "::stop-commands::$(uuidgen)"
53          tar xvf curl-99.98.97.tar.gz
54          pushd curl-99.98.97
55          ./configure --prefix=$HOME/temp --without-ssl --without-libpsl
56          make -j5
57          make -j5 test-ci
58          make -j5 install
59          popd
60          # basic check of the installed files
61          bash scripts/installcheck.sh $HOME/temp
62          rm -rf curl-99.98.97
63        name: 'verify in-tree configure build including install'
64
65  verify-out-of-tree-docs:
66    runs-on: ubuntu-latest
67    timeout-minutes: 15
68    needs: maketgz-and-verify-in-tree
69    steps:
70      - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
71        with:
72          name: 'release-tgz'
73
74      - run: |
75          echo "::stop-commands::$(uuidgen)"
76          tar xvf curl-99.98.97.tar.gz
77          touch curl-99.98.97/docs/{cmdline-opts,libcurl}/Makefile.inc
78          mkdir build
79          pushd build
80          ../curl-99.98.97/configure --without-ssl --without-libpsl
81          make -j5
82          make -j5 test-ci
83          popd
84          rm -rf build
85          rm -rf curl-99.98.97
86        name: 'verify out-of-tree configure build including docs'
87
88  verify-out-of-tree-autotools-debug:
89    runs-on: ubuntu-latest
90    timeout-minutes: 15
91    needs: maketgz-and-verify-in-tree
92    steps:
93      - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
94        with:
95          name: 'release-tgz'
96
97      - run: |
98          echo "::stop-commands::$(uuidgen)"
99          tar xvf curl-99.98.97.tar.gz
100          pushd curl-99.98.97
101          mkdir build
102          pushd build
103          ../configure --without-ssl --enable-debug "--prefix=${PWD}/pkg" --without-libpsl
104          make -j5
105          make -j5 test-ci
106          make -j5 install
107        name: 'verify out-of-tree autotools debug build'
108
109  verify-out-of-tree-cmake:
110    runs-on: ubuntu-latest
111    timeout-minutes: 15
112    needs: maketgz-and-verify-in-tree
113    steps:
114      - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
115        with:
116          name: 'release-tgz'
117
118      - run: |
119          echo "::stop-commands::$(uuidgen)"
120          tar xvf curl-99.98.97.tar.gz
121          pushd curl-99.98.97
122          cmake -B build -DCURL_WERROR=ON -DCURL_USE_LIBPSL=OFF
123          make -C build -j5
124        name: 'verify out-of-tree cmake build'
125
126  missing-files:
127    runs-on: ubuntu-latest
128    timeout-minutes: 5
129    needs: maketgz-and-verify-in-tree
130    steps:
131      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
132
133      - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
134        with:
135          name: 'release-tgz'
136
137      - name: 'detect files missing from release tarball'
138        run: .github/scripts/distfiles.sh curl-99.98.97.tar.gz
139
140  reproducible-releases:
141    runs-on: ubuntu-latest
142    steps:
143      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
144
145      - run: sudo apt-get purge -y curl libcurl4 libcurl4-doc
146        name: 'remove preinstalled curl libcurl4{-doc}'
147
148      - run: ./scripts/dmaketgz 9.10.11
149        name: 'generate release tarballs'
150
151      - name: 'verify release tarballs'
152        run: |
153          mkdir _verify
154          mv curl-9.10.11.tar.gz _verify
155          cd _verify
156          ../scripts/verify-release curl-9.10.11.tar.gz
157