Skip tlmgr_update() and re-packaging for TinyTeX-2 when no changes needed#491
Skip tlmgr_update() and re-packaging for TinyTeX-2 when no changes needed#491
Conversation
|
|
…hanges needed Co-authored-by: yihui <163582+yihui@users.noreply.github.com>
yihui
left a comment
There was a problem hiding this comment.
don't do gh release download, but let install-bin-* scripts accept an optional argument that takes a dir path; if this path is passed to the script, the script won't delete the downloaded installer but move it to the specified path
with this path argument, we can move the downloaded installer to the current working directory, so that we don't need to download again
however, this requires another change in install-bin-* scripts: when downloading the installers, we shouldn't change the filenames of the installers (we currently do), e.g., on windows, we specify install.exe or install.zip as the downloaded filename, and TinyTeX.tar.xz as the download filename on *unix; we should keep the original name TinyTeX-2-OS-arch.tar.xz
after moving TinyTeX-2 installers to the current working directory, we can make copies for the old filenames
please try to minimize code repetition in build.yaml and shell/batch scripts
…ad of re-downloading Co-authored-by: yihui <163582+yihui@users.noreply.github.com>
Done in 61bb4b7.
|
TinyTeX-2 builds always ran
tlmgr_update()and re-packaged bundles even when nothing changed, wasting significant CI time. This adds a pre-check usingcheck-update.Rto skip unnecessary work.Build scripts (
build-tinytex-2.sh/build-tinytex-2.ps1)Rscript tools/check-update.Rbeforetlmgr_update(); skip the update if exit code is 0 (nothing to update)tinytex2-changed=true|falseto$GITHUB_OUTPUT—trueif updates were applied, orphaned packages removed, or full rebuild;falseotherwiseinstall-bin-unix.sh/install-bin-windows.batso the downloaded TinyTeX-2 installer is preserved in GITHUB_WORKSPACE rather than deletedInstall scripts (
install-bin-unix.sh/install-bin-windows.bat)TinyTeX-2-linux-x86_64.tar.xz,TinyTeX-2-windows.exe) instead of a generic name (TinyTeX.tar.xz,install.exe)install-bin-unix.shrefactored: checks for prebuilt TinyTeX first, then branches on Darwin vs Linux for the download tool; the extract + save/delete logic is now in one shared placeWorkflow (
build.yaml) — all 5 platform jobsSplits the monolithic "Build TinyTeX-2" step into focused steps per platform:
Build TinyTeX-2(id: build-tinytex-2): runs the script only, capturestinytex2-changedoutput; the downloaded installer is preserved in the workspacePackage TinyTeX-2: re-packages from the updated TinyTeX installation only whentinytex2-changed != 'false'; when skipped, the original installer preserved by the install script is used as-isCopy TinyTeX-2 alias(platforms with aliases): unconditional — copies the platform bundle to its legacy filename (e.g.TinyTeX-2.tar.gz,TinyTeX-2.tgz,TinyTeX-2.exe); works whether the bundle was just re-packaged or preserved from the install step✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.