Skip to content

Commit a6fb646

Browse files
committed
Make GitHub Actions cover "make check" and "make uninstall"
Signed-off-by: Sebastian Pipping <[email protected]>
1 parent f1e40ab commit a6fb646

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Run the test suite
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
- cron: '0 14 * * 5' # Every Friday 2pm
8+
workflow_dispatch:
9+
10+
# Drop permissions to minimum for security
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test_suite:
16+
name: Run the test suite
17+
runs-on: ubuntu-24.04
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install dependencies
22+
run: |-
23+
packages=(
24+
# Perl runtime dependencies as documented in README
25+
libcapture-tiny-perl # CPAN Capture::Tiny
26+
libdatetime-perl # CPAN DateTime
27+
libdevel-cover-perl # CPAN Devel::Cover
28+
libdigest-md5-file-perl # CPAN Digest::MD5
29+
libfile-spec-native-perl # CPAN File::Spec
30+
libjson-xs-perl # CPAN JSON::XS
31+
# CPAN Memory::Process
32+
# CPAN Module::Load::Conditional
33+
libscalar-list-utils-perl # CPAN Scalar::Util
34+
# CPAN Time::HiRes
35+
36+
# Additional depdnencies for "make check"
37+
llvm # for command "llvm-profdata"
38+
libgd-perl # CPAN GD
39+
)
40+
set -x
41+
sudo apt-get update
42+
sudo apt-get install --no-install-recommends --yes -V "${packages[@]}"
43+
44+
- name: make check
45+
run: |-
46+
make check
47+
48+
- name: make install
49+
run: |-
50+
make install PREFIX=/usr CFG_DIR=/etc DESTDIR="${PWD}/ROOT"
51+
find ROOT/ | sort | xargs -r ls -ld
52+
53+
- name: make uninstall
54+
run: |-
55+
make uninstall PREFIX=/usr CFG_DIR=/etc DESTDIR="${PWD}/ROOT"
56+
find ROOT/ | sort | xargs -r ls -ld
57+
diff -u0 <(echo 'total 0') <(ls -l ROOT/) # i.e. fail CI if leftovers

0 commit comments

Comments
 (0)