diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c1a8b57..d36bbb2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 {} + diff --git a/action.yml b/action.yml index ce3bbaf..6f5ef75 100644 --- a/action.yml +++ b/action.yml @@ -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 , then the script # most likely assumes that it has been called from the within the @@ -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 @@ -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 < $RUNNER_TEMP/__DOC_CHECKER__.g <