The repo for the dockers used can be found here
If you're reading this at docker hub, you probably want to head on over to the git repo.
travis-BUILDNO
where BUILDNO
. will be replaced by the current travis build number.
You can choose to push these to a release instead of a branch by using the push-type
option (see below).travis-texbuild.sh
you can use this .travis.yml.
Docs for the configuration options in your .travis.yml
is found further down in this readme.travis-texbuild.sh
to .travis/travis-texbuild.sh
directory you just created (this file is pushing the branch. You can omit it if you don't want to push the travis-BUILDNO
-branch to your repos..travis.yml
. If have ruby (gem) installed you can do:
cd
into your git repo and run gem install travis; travis encrypt GH_TOKEN=YOURTOKEN --add
(replacing YOURTOKEN
with the generated token).Things to note:
tests/testmyfeature/main.tex
is supposed to fail, then you should make a file tests/testmyfeature/wants-fail
. Then a success run of the main.tex
would count as a failed build.tests
. At test time, only the directories containing the main.tex
is executed.main.tex
-file is the directory the current main.tex
file is in./repo
volume. So in your tests/TestMyFeature/main.tex
you could do e.g. \def\input@path{{/repo/}}
to include things directly from the repo.You can specify configurations in your .travis.yml
in the form
tex-config:
- config-name=value
build-pattern
tests/*/main.tex
*
) (e.g. path/to/testfiles/*.tex
is valid).tex-scheme
small
or full
small
Which TeX-scheme to use; this is, basically, how many packages are installed on the docker image by default.
full
: Full contains most of the packages in CTAN and has a docker image of 3GB that needs to be downloaded every time.small
: contains only the bare necessities, and probably will most of the packages that you wish to used be specified in the packages
option.
(- medium
: Coming later)texliveonfly
: Is the small
image, but missing packages will be attempted to be installed using texliveonfly
. You can still manually add packages that you wish to installed using the packages
option.packages
What packages should also be installed using TeXLives tlmgr
before running the TeX-files.
Note that when using the texliveonfly
image, it will attempt to install missing packages automatically.
latexmk-flags
-dvi
push-type
branch
or none
branch
Where to publish the pdfs generated. The option for pushing to release
is coming: #3 - Push to releases instead of branches.
Talk about the files, tex profiles and so forth.
sudo groupadd docker
sudo usermod -aG docker $USER
sudo systemctl start docker
Building the docker image
scheme
with value small
.Running the docker image
testrun.sh
docker run --mount src="https://github.com/Strauman/travis-latexbuild/raw/master/full/path/to/repo",target=/repo,type=bind mytagname:latest
or interactively (so you can play around inside the container) with docker run -it --mount src="https://github.com/Strauman/travis-latexbuild/raw/master/full/path/to/repo",target=/repo,type=bind mytagname:latest /bin/sh