Strauman / travis-latexbuild

Building LaTeX packages using Travis-CI
12 stars 4 forks source link

Texliveonfly (or: install package dependencies automatically) #22

Closed PHPirates closed 4 years ago

PHPirates commented 5 years ago

This fixes #21.

Update It's being tested, see https://github.com/PHPirates/travis-ci-latex-pdf#using-a-docker-image-with-texlive-and-texliveonfly

Sorry for the long story :smile: essentially you should be able to run this, after building Strauman/latex-docker#4

Changes

Dependencies This depends on Strauman/latex-docker#4 in order to install Python using apk.

Other comments

One disadvantage: the docker image is bigger now because it includes Python. Locally, the strauman/tex image is 278MB (compared to 129MB on Docker Hub), and this image is 384MB (compared to 145MB on Hub). Maybe it could get smaller by using something like https://github.com/jfloff/alpine-python

Note I installed texliveonfly in the dockerfile instead of execute_tests, which has the advantage that it will also be available when running the docker image in interactive mode (correct me if I'm wrong).

Also managed to test this locally, understanding a bit more of docker now :smile: When I run the docker image interactively (otherwise you can only see stdout if something fails) I verified that for some test file latexmk main.tex failed because of missing dependencies, and texliveonfly main.tex worked.

Discussion

Should this get a new tag, like :small_v2? Because suppose it does break builds, then by uploading a new docker image under the same :small tag then this could break everyone's builds, right? I mean, I guess we should use tags like they were meant. I'm not sure if this should also be added to the medium and full images. I suppose with a full image texliveonfly is not needed.

PHPirates commented 5 years ago

Thanks for reviewing! Let me know if there is anything you want to be done before uploading the image to docker hub, after which I can start updating instructions at travis-ci-latex-pdf. I think we should keep the current 'small' image besides the texliveonfly image, because it's smaller, but the choice is up to you of course :)

Strauman commented 4 years ago

@PHPirates Go for it. I give you full authority do what you want in this repo!

PHPirates commented 4 years ago

lol I forgot I had this hanging around. But it's been tested for a while now, so I will sort it out soon :)

PHPirates commented 4 years ago

@Strauman FYI From the testing I did with the texliveonfly image I noticed that sometimes it will fail, so it is a solution which works easier most of the times but not always. Therefore I didn't change the main Dockerfile for this repo but I put it in a separate texliveonfly folder.