Skip to content

Commit

Permalink
Docker container for Travis CI (#150)
Browse files Browse the repository at this point in the history
* Add a clean-all command for removing all nonessential files including including aux, dep, dvi, postscript and pdf files.

* Fix 2 bugs, documented in the Dockerfile

* Build the Docker Image from the Dockerfile

* Fix typo

* Remove metadata
  • Loading branch information
Emanuel Buholzer authored and rzach committed Aug 9, 2017
1 parent be6dffb commit 05ed579
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
sudo: required
dist: trusty
services:
- docker
before_install:
- sudo add-apt-repository ppa:jonathonf/texlive-2016 -y
- sudo apt-get -qq update
- sudo apt-get install -y --no-install-recommends texlive-base texlive-fonts-recommended texlive-generic-extra texlive-latex-recommended texlive-latex-extra texlive-math-extra latexmk
- docker build -t openlogic .
script:
- latexmk -dvi- -pdf --pdflatex="pdflatex -interaction nonstopmode -halt-on-error" open-logic-debug.tex
- docker run openlogic
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Use ubuntu trusty as the base image
FROM ubuntu:trusty

# Add a backport of TeX Live 2016 packages, for LTS releases, to the apt sources
RUN echo -e '\ndeb http://ppa.launchpad.net/jonathonf/texlive-2016/ubuntu trusty main\ndeb-src http://ppa.launchpad.net/jonathonf/texlive-2016/ubuntu trusty main' /etc/apt/sources.list

# Install dependencies for building the open-logic-debug.pdf file
RUN apt-get update && apt-get install -y --no-install-recommends \
texlive-base \
texlive-fonts-recommended \
texlive-generic-extra \
texlive-latex-recommended \
texlive-latex-extra \
texlive-math-extra \
latexmk \

# Additionally install these to packages to fix a bug saying tikz.sty is missing
texlive-pictures \
pgf

# Set the working directory to wd and copy the git repository into it
WORKDIR /wd
VOLUME ["/wd"]
COPY . .

# This is used to fix a bug saying gitinfo2.sty cannot be found
ADD http://www.pirbot.com/mirrors/ctan/macros/latex/contrib/gitinfo2/gitinfo2.sty gitinfo2.sty

# Try generating open-logic-debug.pdf
CMD ["latexmk", "-dvi-", "-pdf", "-pdflatex=pdflatex -interaction nonstopmode -halt-on-error", "open-logic-debug.tex"]
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ open-logic-config.pdf: open-logic-config.sty
clean:
latexmk -c $(ALLTEXFILES)

clean-all:
latexmk -C $(ALLTEXFILES)

index.html: FORCE_MAKE
git checkout master
cp misc/index.start.html index.html
Expand Down

0 comments on commit 05ed579

Please sign in to comment.