Skip to content

Commit 01fb22d

Browse files
committed
ci: do basic tests of install/uninstall and updating man pages
Do a basic "make install" and "make uninstall", showing the list of installed files. Additionally, a check is performed to ensure "make uninstall" uninstalls all files, and the man pages are being rebuilt.
1 parent 3b97254 commit 01fb22d

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: "Basic Install"
2+
3+
on:
4+
push:
5+
branches-ignore: [ ]
6+
pull_request:
7+
branches-ignore: [ ]
8+
9+
jobs:
10+
11+
installtest-ix:
12+
runs-on: ${{ matrix.os }}
13+
14+
name: 'installtest ${{ matrix.os }}'
15+
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
os: [ubuntu-latest, macos-latest]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: 'Update software database (Linux)'
25+
if: runner.os == 'Linux'
26+
run: sudo apt-get update
27+
28+
- name: 'Update software database (macOS)'
29+
if: runner.os == 'macOS'
30+
run: brew update
31+
32+
- name: 'Install build requirements (Linux)'
33+
if: runner.os == 'Linux'
34+
run: sudo apt-get install -y asciidoctor
35+
36+
- name: 'Install build requirements (macOS)'
37+
if: runner.os == 'macOS'
38+
run: brew install asciidoctor
39+
40+
- name: "Install"
41+
run: |
42+
make install DESTDIR=$PWD/_d
43+
44+
echo "Files installed to DESTDIR:"
45+
ls -ld $(find _d | sort) | sed '/ _d$/d; s| _d/| /|'
46+
47+
- name: "Uninstall"
48+
run: |
49+
make uninstall DESTDIR=$PWD/_d
50+
51+
echo "Files remaining in DESTDIR after uninstalling:"
52+
ls -ld $(find _d | sort) | sed '/ _d$/d; s| _d/| /|'
53+
54+
find _d -not -type d > nondir-files.txt
55+
if test -s nondir-files.txt; then
56+
echo "Error: Leftover item(s) in filesystem after uninstall"
57+
ls -ld $(cat nondir-files.txt | sort) | sed 's| _d/| /|'
58+
exit 1
59+
fi
60+
61+
- name: "Update man pages"
62+
run: |
63+
touch man/cowsay.1.adoc
64+
make man
65+
git diff

0 commit comments

Comments
 (0)