Skip to content

Commit 8cdac29

Browse files
committed
Add a step to doc-build-pdf to check for missing character errors
1 parent 389559a commit 8cdac29

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cd local/share/doc/sage/latex
2+
echo "All missing character error messages in LaTeX log files:"
3+
num_errors=$(grep -r "Missing character" --include "*.log" | tee /dev/stderr | wc -l)
4+
expected_num_errors=1
5+
echo "In total there are $num_errors missing character errors, expecting $expected_num_errors"
6+
[ $num_errors = $expected_num_errors ]

.github/workflows/doc-build-pdf.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
- name: Start container
104104
id: container
105105
# Try to continue when "exporting to GitHub Actions Cache" failed with timeout
106-
if: (success() || failure())
106+
if: (!cancelled())
107107
run: |
108108
docker run --name BUILD -dit \
109109
--mount type=bind,src=$(pwd),dst=$(pwd) \
@@ -116,7 +116,7 @@ jobs:
116116

117117
- name: Update system packages
118118
id: packages
119-
if: (success() || failure()) && steps.container.outcome == 'success'
119+
if: (!cancelled() && steps.container.outcome == 'success')
120120
run: |
121121
export PATH="build/bin:$PATH"
122122
eval $(sage-print-system-package-command auto update)
@@ -126,15 +126,19 @@ jobs:
126126

127127
- name: Build doc (PDF)
128128
id: docbuild
129-
if: (success() || failure()) && steps.packages.outcome == 'success'
129+
if: (!cancelled() && steps.packages.outcome == 'success')
130130
run: |
131131
export MAKE="make -j5 --output-sync=recurse" SAGE_NUM_THREADS=5
132132
make doc-clean doc-uninstall; make sagemath_doc_html-build-deps sagemath_doc_pdf-no-deps
133133
shell: sh .github/workflows/docker-exec-script.sh BUILD /sage {0}
134134

135+
- name: Check for missing character error messages
136+
if: (!cancelled())
137+
run: sh .github/workflows/docker-exec-script.sh BUILD /sage .github/workflows/check-latex-build.sh
138+
135139
- name: Copy doc
136140
id: copy
137-
if: (success() || failure()) && steps.docbuild.outcome == 'success'
141+
if: (!cancelled() && steps.docbuild.outcome == 'success')
138142
run: |
139143
mkdir -p ./doc
140144
# We copy everything to a local folder
@@ -143,7 +147,7 @@ jobs:
143147
zip -r doc-pdf.zip doc
144148
145149
- name: Upload doc
146-
if: (success() || failure()) && steps.copy.outcome == 'success'
150+
if: (!cancelled() && steps.copy.outcome == 'success')
147151
uses: actions/upload-artifact@v4
148152
with:
149153
name: doc-pdf

0 commit comments

Comments
 (0)