mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
Meta: Check auto-generated manpages for completeness on CI
This commit is contained in:
parent
50a65f02a8
commit
55e1edd51b
2 changed files with 43 additions and 0 deletions
14
.github/workflows/cmake.yml
vendored
14
.github/workflows/cmake.yml
vendored
|
@ -207,3 +207,17 @@ jobs:
|
||||||
if: ${{ !cancelled() && matrix.debug-options == 'NORMAL_DEBUG'}}
|
if: ${{ !cancelled() && matrix.debug-options == 'NORMAL_DEBUG'}}
|
||||||
working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }}
|
working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }}
|
||||||
run: '[ ! -e debug.log ] || cat debug.log'
|
run: '[ ! -e debug.log ] || cat debug.log'
|
||||||
|
|
||||||
|
- name: Check manpages for completeness
|
||||||
|
if: ${{ matrix.debug-options == 'NORMAL_DEBUG' && matrix.arch == 'i686'}}
|
||||||
|
working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }}
|
||||||
|
env:
|
||||||
|
# The script already sets the correct SERENITY_RUN and SERENITY_KERNEL_CMDLINE envvars.
|
||||||
|
SERENITY_ARCH: ${{ matrix.arch }}
|
||||||
|
SERENITY_QEMU_CPU: "max,vmx=off"
|
||||||
|
run: |
|
||||||
|
# Running the tests apparently leaves the image sufficiently broken
|
||||||
|
rm _disk_image
|
||||||
|
ninja image
|
||||||
|
/usr/bin/time ../../Meta/export-argsparser-manpages.sh --verify-git-state
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
|
@ -10,6 +10,20 @@ if ! command -v tar >/dev/null 2>&1 ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$#" = "0" ]; then
|
||||||
|
VERIFY_GIT_STATE=n
|
||||||
|
elif [ "$#" = "1" ] && [ "$1" = "--verify-git-state" ]; then
|
||||||
|
VERIFY_GIT_STATE=y
|
||||||
|
else
|
||||||
|
echo "USAGE: $0 [--verify-git-state]"
|
||||||
|
echo "This script runs Serenity and exports a set of manpages through ArgsParser,"
|
||||||
|
echo "and places them in Base/usr/share/man/."
|
||||||
|
echo "If --verify-git-state is given, this script verifies that this does not modify"
|
||||||
|
echo "the git state, i.e. that all exported manpages already were in the repository"
|
||||||
|
echo "with the exact same content."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "This script assumes passwordless sudo."
|
echo "This script assumes passwordless sudo."
|
||||||
sudo true
|
sudo true
|
||||||
|
|
||||||
|
@ -49,3 +63,18 @@ sudo umount fsmount
|
||||||
rmdir fsmount
|
rmdir fsmount
|
||||||
|
|
||||||
echo "Successfully (re-)generated manpages in Base/usr/share/man/"
|
echo "Successfully (re-)generated manpages in Base/usr/share/man/"
|
||||||
|
|
||||||
|
if [ "$VERIFY_GIT_STATE" = "y" ]; then
|
||||||
|
echo "Verifying git state ..."
|
||||||
|
if [ "" != "$(git clean -n Base/usr/share/man)" ] || ! git diff --quiet Base/usr/share/man; then
|
||||||
|
echo "Failed: There are missing and/or outdated manpages."
|
||||||
|
echo "$ git status Base/usr/share/man"
|
||||||
|
git status Base/usr/share/man
|
||||||
|
echo "$ git diff Base/usr/share/man"
|
||||||
|
git diff Base/usr/share/man
|
||||||
|
echo "You may need to run ./Meta/export-argsparser-manpages.sh on your system and commit/squash the resulting changes."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Verified: No missing or outdated manpages. Great!"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue