phockett / Quantum-Metrology-with-Photoelectrons-Vol3

Other
4 stars 0 forks source link

Build chain and Github actions #5

Open phockett opened 1 year ago

phockett commented 1 year ago

GH actions currently only configured for basic JupyterBook env, so will fail in cases where notebooks need execution.

Options:

phockett commented 1 year ago

Removed GH actions for now (as of 4801fde561b70425fa5b364534ab4168e3490bd2).

Running local builds + manual GH pages deploy (https://github.com/phockett/Quantum-Metrology-with-Photoelectrons-Vol3/blob/main/scripts/deploy_ghpages.sh) as necessary for the moment.

UPDATE: added basic full build scripts in 9a70adcd4b3a66f0c8c1e24bc5556543b8bd84ba build-full-clean.sh builds full local copy from clean for HTML and PDF, set to _latest_build dir (and ignored by git). Then manual deploy to GH pages with ghp script.

TODO: dir structure pretty messy, should tidy. Could also revert to GH actions deploy-only (no build) script to avoid manual deploy requirement.

UPDATE 23/11/22 pm: now failing for PDF builds, not sure why since main pdf build is working. Paths problem somewhere...? UPDATE 2: actually looks like general PDF build issue again, only obvious after clean build so must be something recent with indexes...

Get no cross-refs, 1st build runs, then repeats failng with...

The LaTeX files are in doc-source/_build/latex.
Run 'make' in that directory to run these through (pdf)latex
(use `make latexpdf' here to do that automatically).
Finished generating latex for book...
Converting book latex into PDF...
latexmk -pdf -dvi- -ps-  'QM3.tex'
Latexmk: This is Latexmk, John Collins, 26 Dec. 2019, version: 4.67.
Latexmk: applying rule 'makeindex QM3.idx'...
Rule 'makeindex QM3.idx': The following rules & subrules became out-of-date:
      'makeindex QM3.idx'
------------
Run number 1 of rule 'makeindex QM3.idx'
------------
------------
Running 'internal xindy -L english -C utf8  -M sphinx.xdy  -o "QM3.ind" "QM3.idx"'
------------
Latexmk: calling xindy( -L english -C utf8  -M sphinx.xdy  -o "QM3.ind" "QM3.idx" )
Can't exec "xindy": No such file or directory at (eval 13) line 14.
Latexmk: Errors, so I did not complete making targets

...

Might be issue with glossary.

YES - adding glossary forces index generation, which wasn't previously used, and required xindy. fixed with sudo apt install -y xindy, as per https://github.com/sphinx-doc/sphinx/issues/8941

phockett commented 1 year ago

Now running quick local FULL and CLEAN builds for HTML and PDF from temp dir with build-full-buildTmp.sh (b23b8cc1359af6c90dfe0a100dfa4575a3ce93cf).

Still pretty ugly, but fixes some of above issues, and currently keeps date-stamped versions for troubleshooting as well as latest build on git.

For quick local incremental HTML build-HTML.sh, or build.sh for both (but without PDF env fix).