Skip to content

Add workflow compiling changed preprints - #3

Open
tschm wants to merge 1 commit into
mainfrom
compile-preprints-workflow
Open

tschm wants to merge 1 commit into
mainfrom
compile-preprints-workflow

Conversation

@tschm

@tschm tschm commented Oct 9, 2026

Copy link
Copy Markdown
Member

Adds .github/workflows/preprints.yml, which compiles a preprint's LaTeX only when its source folder has changed, or when it has never been compiled.

How it works

  • Detect: for each preprints/*/source folder, compares its git tree hash (git rev-parse HEAD:<dir>) with the source-tree: line in the notes of the preprint-<name> release. A missing release means the preprint has never been compiled. Folders without a top-level .tex containing \documentclass are skipped (currently seven_sins).
  • Compile: one matrix job per preprint. Runs make compile if there is a Makefile (with uv installed, so rice_50_digits regenerates its assets), otherwise latexmk -pdf.
  • Publish: on main, replaces the preprint-<name> release with the new PDF and records the tree hash. On pull requests the PDF is only attached to the run as an artifact.
  • Manual run: a force input rebuilds everything.

Because this PR changes the workflow file, it should build rice_50_digits here as a check. Merging it will publish the first release.

Testing

  • actionlint passes.
  • Ran the detection step locally: rice_50_digits came out as never compiled and seven_sins was skipped. An empty list gives an empty matrix and skips the compile job.
  • A local make compile of rice_50_digits takes about 1m40s.

🤖 Generated with Claude Code

Compile each preprints/<name>/source whose git tree hash differs from the
one recorded in its preprint-<name> release, or that has no release yet,
and publish the PDF as that release's asset. Pull requests build but do
not publish.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant