mirror of
https://github.com/cs341-illinois/coursebook.git
synced 2026-10-02 08:04:38 +08:00
The PDF job takes ~9 minutes and is the whole workflow's wall clock,
because install.sh pulls texlive-full: 455 packages and 4.0 GB of every
language pack, ConTeXt and Metapost. The book needs 68 packages,
768 MB.
Measured by building the book both ways in ubuntu:24.04 and comparing:
packages download apt install make pdf
texlive-full 455 3995 MB 270s 188s
reduced set 68 768 MB 92s 141s
Output is equivalent, not merely similar: all 19 PDFs (main plus 18
chapters) have identical page counts (main.pdf is 390 pages either
way), identical page sizes, and byte-identical pdftotext output, with
no unresolved references in either.
Also:
- fail-fast: false, so a WIKI failure 90 seconds in stops cancelling
the 9 minute PDF job. That happened repeatedly while fixing CI: the
run then says nothing about whether the PDF is healthy.
- concurrency groups, asymmetric on purpose. PR builds have no side
effects so a superseded run is cancelled. Deploy is NOT cancelled
mid-run: it pushes the wiki, force-pushes epub_deploy and pdf_deploy
and nudges the website, and interrupting that can leave the three
targets on different commits.
- timeout-minutes: 30, so a hung link check cannot burn six hours.
- pip cache. Marginal - five small pure-python wheels - but free.
Note make -j4 was tried and rejected: it cuts the build to 80s but
produces a wrong book, numbering the appendix 13 instead of 17 and
degrading a cross-reference to ??.
Scripts
__init__.pyInit to make a python packagedeploy.shScript to run in travis deploy stagescript.shScript to run in travis script stagesinstall.shScript to run in travis install stagegen_order.pyGenerates the latex order file from the yaml filegen_wiki.pyGenerates a wiki given an order file and output directorypandoc_header_filter.pyOutputs a yaml block to stderr given the metadata of the filepandoc_wiki_filter.pyFilters a latex wiki page with additional add onspush_to_wiki.shScript to run in the push to wiki stagesite_cleanup.shScript to clean up pushing to the sitesite_deploy.shScript to deploy to the sitesite_retry.shScript to retry