Strauman / travis-latexbuild

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

A yaml parser? #19

Closed PHPirates closed 5 years ago

PHPirates commented 5 years ago

Did you mean to use something like this: https://github.com/0k/shyaml ? Although this is based on python, which I don't think we can use? I looked at answers here: https://stackoverflow.com/questions/5014632/how-can-i-parse-a-yaml-file-from-a-linux-shell-script but it doesn't seem to get better than what we're using now.

I tested the docker image you just pushed, and it seems to work alright. So I think I can add this to https://github.com/PHPirates/travis-ci-latex-pdf , after #18 is merged? I mean the 'quickstart' .travis.yml I tested:

sudo:       required
language:   generic
services:   docker

# Docs of the options: https://github.com/Strauman/travis-latexbuild/tree/master#configuration-options
tex-config:
- tex-scheme=small
- push-type=none
- build-pattern=src/main.tex,src/mwe.tex
#- latexmk-flags=-dvi -f
- packages=exam, amsmath

script:
- docker pull strauman/travis-latexbuild:small # select small texlive scheme
- docker run --mount src=$TRAVIS_BUILD_DIR/,target=/repo,type=bind strauman/travis-latexbuild:small # also here

I'd make it an alternative to the texlive-pdflatex method, inserting it at number 3. I think currently the build time (3-4 minutes for my test file with the lots of packages) is the main disadvantage, but it's not too bad.

You can make a PR of course if you want, otherwise I'll do it myself and let you review :) (you could continue from the strauman branch, and I still have to write contribution guidelines which say that you would preferably also add a test in tests/ folder and revert the main travis.yml to what's on the master branch, adding the extra test)

Strauman commented 5 years ago

I'll look at it as soon as I have time :)

PHPirates commented 5 years ago

Great! I also created some contributing instructions: https://github.com/PHPirates/travis-ci-latex-pdf/blob/master/.github/contributing.rst (although you probably don't need them, but it would be helpful if you could read them over once to see what I missed :) )

PS don't forget to update your SE answer

Strauman commented 5 years ago

Awesome! I'll get to both of these things as soon as I have a few hours!