Files
coursebook/_scripts
Lawrence Angrave 8bf29081d3 Speed up CI: install only the texlive packages the book needs
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 ??.
2026-08-24 02:06:06 -05:00
..
…
…
…

Scripts

  • __init__.py Init to make a python package
  • deploy.sh Script to run in travis deploy stage
  • script.sh Script to run in travis script stages
  • install.sh Script to run in travis install stage
  • gen_order.py Generates the latex order file from the yaml file
  • gen_wiki.py Generates a wiki given an order file and output directory
  • pandoc_header_filter.py Outputs a yaml block to stderr given the metadata of the file
  • pandoc_wiki_filter.py Filters a latex wiki page with additional add ons
  • push_to_wiki.sh Script to run in the push to wiki stage
  • site_cleanup.sh Script to clean up pushing to the site
  • site_deploy.sh Script to deploy to the site
  • site_retry.sh Script to retry