Debian Codegraph @

.github/workflows/distcheck.yml

raw
1 name: Distcheck
2
3 on:
4 push:
5 pull_request:
6 schedule:
7 - cron: '31 3 * * 1' # Monday at 3h31 UTC
8
9 jobs:
10 skip_duplicates:
11 # continue-on-error: true # Uncomment once integration is finished
12 runs-on: ubuntu-24.04
13 outputs:
14 should_skip: ${{ steps.skip_check.outputs.should_skip }}
15 steps:
16 - id: skip_check
17 uses: fkirc/skip-duplicate-actions@v5
18 with:
19 concurrent_skipping: 'same_content_newer'
20 skip_after_successful_duplicate: 'true'
21 paths_ignore: '[]' # changes in any file can affect distcheck
22 do_not_skip: '["workflow_dispatch", "schedule"]'
23
24 Distcheck:
25 needs: skip_duplicates
26 if: ${{ needs.skip_duplicates.outputs.should_skip != 'true' }}
27
28 runs-on: ubuntu-24.04
29
30 strategy:
31 fail-fast: false
32
33 env:
34 ac_cv_func_arc4random_buf: "no"
35 VERBOSE: 1
36
37 steps:
38 - name: Checkout
39 uses: actions/checkout@v4
40
41 - name: Install packages
42 run: sudo apt-get install libltdl-dev
43
44 # The distcheck build is run with the oldest version of perl we support,
45 # in order to verify that we still support it.
46 - name: Install Perl 5.14
47 uses: shogo82148/actions-setup-perl@v1
48 with:
49 perl-version: '5.14'
50
51 # 'make distcheck' runs perlcritic on all our Perl code.
52 # Install exactly the set of critic-related CPAN distributions
53 # documented in .perlcriticrc.
54 # One perlcritic policy has a stealth dependency on aspell.
55 - name: Install perlcritic and perltidy
56 run: |
57 sudo apt-get install aspell
58 cpanm -S -M https://cpan.metacpan.org/ -n -i $(sed -Ene '
59 s/^#[[:space:]]+([A-Z0-9]+\/.+\.tar\.gz)$/\1/p
60 /^$/q
61 ' .perlcriticrc)
62
63 - name: Versions of build tools
64 id: build-tools
65 run: ./build-aux/ci/ci-log-dependency-versions
66
67 - name: Get nprocs
68 run: echo "NPROCS=$((`nproc --all 2>/dev/null || sysctl -n hw.ncpu` * 2))" | tee $GITHUB_ENV
69
70 - name: Cache bootstrap
71 id: cache
72 uses: actions/cache@v4
73 with:
74 path: |
75 INSTALL
76 Makefile.in
77 aclocal.m4
78 config.h.in
79 configure
80 autom4te.cache/**
81 build-aux/m4/libtool.m4
82 build-aux/m4/ltoptions.m4
83 build-aux/m4/ltsugar.m4
84 build-aux/m4/ltversion.m4
85 build-aux/m4/lt~obsolete.m4
86 build-aux/m4-autogen/**
87 key: autoreconf-${{ steps.build-tools.outputs.autotools-ver }}-${{ hashFiles('autogen.sh', 'configure.ac', 'Makefile.am', 'build-aux/m4/*.m4', 'build-aux/m4-autogen/**') }}
88
89 - name: Bootstrap
90 if: steps.cache.outputs.cache-hit != 'true'
91 run: ./autogen.sh
92
93 # The configure options used in this step do not matter, we just need
94 # the makefile to exist.
95 - name: Configure
96 run: ./configure
97
98 - name: Test
99 run: make -j${{ env.NPROCS }} distcheck
100
101 - name: Detailed error logs
102 if: failure()
103 run: ./build-aux/ci/ci-log-logfiles