Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ jobs:
- uses: ./this-action/
with:
use-latex: ${{ matrix.use-latex }}
- name: Check for unwanted files
shell: bash
run: |
test ! -f output.log
test ! -f __DOC_CHECKER__.g
find doc \( -name '*.aux' -o -name '*.bbl' -o -name '*.blg' -o -name '*.brf' -o -name '*.idx' -o -name '*.ilg' -o -name '*.ind' -o -name '*.log' -o -name '*.out' -o -name '*.pnr' -o -name '*.toc' -o -name '*.tst' \) -exec test ! -f {} +
17 changes: 11 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runs:
shell: bash
run: |
if [ -f "makedoc.g" ]; then
$GAP makedoc.g -c "QUIT;" 2>&1 | tee output.log
$GAP makedoc.g -c "QUIT;" 2>&1 | tee $RUNNER_TEMP/output.log
elif [ -x "doc/make_doc" ]; then
# If the package is called <pkg_name>, then the <doc/make_doc> script
# most likely assumes that it has been called from the within the
Expand All @@ -65,7 +65,7 @@ runs:
# So we create symlinks to some potentially-useful GAP directories.
[ -d ../../doc ] && echo "../../doc exists" || ln -s $GAPROOT/doc ../../doc
[ -d ../../etc ] && echo "../../etc exists" || ln -s $GAPROOT/etc ../../etc
cd doc && ./make_doc 2>&1 | tee output.log
cd doc && ./make_doc 2>&1 | tee $RUNNER_TEMP/output.log
elif [ -f "doc/make_doc" ]; then
echo "doc/make_doc exists but is not executable!"
exit 1
Expand All @@ -84,15 +84,15 @@ runs:
# label warnings are sometimes false positives. Moreover, GAPDoc can
# identify this issues, hence we ignore the ones from LaTeX.
run: |
if grep -i -e "warning\b" output.log | grep -qiv "LaTeX Warning: Label(s) may have changed."; then
if grep -i -e "warning\b" $RUNNER_TEMP/output.log | grep -qiv "LaTeX Warning: Label(s) may have changed."; then
echo "Warnings were found when building the documentation!"
grep -i -e "warning\b" output.log
grep -i -e "warning\b" $RUNNER_TEMP/output.log
exit 1
fi
- name: "Check documentation is compiled"
shell: bash
run: |
cat > __DOC_CHECKER__.g <<EOF
cat > $RUNNER_TEMP/__DOC_CHECKER__.g <<EOF

Read("PackageInfo.g");
doc_infos := GAPInfo.PackageInfoCurrent.PackageDoc;
Expand All @@ -119,4 +119,9 @@ runs:
od;

EOF
$GAP __DOC_CHECKER__.g -c "QUIT;"
$GAP $RUNNER_TEMP/__DOC_CHECKER__.g -c "QUIT;"

- name: "Remove auxiliary files"
shell: bash
run: |
find doc \( -name '*.aux' -o -name '*.bbl' -o -name '*.blg' -o -name '*.brf' -o -name '*.idx' -o -name '*.ilg' -o -name '*.ind' -o -name '*.log' -o -name '*.out' -o -name '*.pnr' -o -name '*.toc' -o -name '*.tst' \) -exec rm -f {} +