-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy path.travis.yml
65 lines (65 loc) · 2.57 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
sudo: true
dist: trusty
language: c
before_install:
- sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ vivid main universe'
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C0B21F32
- echo 'APT::Default-Release "trusty";' | sudo tee /etc/apt/apt.conf.d/default-release
- sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -cs)/"
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
- sudo add-apt-repository -y ppa:marutter/rrutter
- sudo add-apt-repository -y ppa:marutter/c2d4u
- sudo apt-get update -qq
- sudo apt-get install -qq
r-base-dev
r-recommended
r-cran-dplyr
r-cran-ggplot2
r-cran-knitr
- sudo apt-get install -t vivid -qq
pandoc
python-pandocfilters
ghostscript
- sudo apt-get install -t vivid -qq --allow-downgrades
gcc-4.9-base=4.9.2-10ubuntu13
- sudo apt-get install -t vivid -qq --no-install-recommends
texlive-latex-base
texlive-latex-recommended
texlive-latex-extra
texlive-fonts-recommended
texlive-generic-recommended
texlive-science
texlive-pictures
texlive-bibtex-extra
texlive-font-utils
texlive-extra-utils
lmodern
pdftk
- sudo apt-get install -qq --no-install-recommends
libreoffice-impress
- export PATH=/usr/bin:$PATH
- ./.travis.git
script:
- (make && make) &> /dev/null
- make |& tee error.log
- for i in 1 2 3; do make handouts-presentation-example handouts-presentation-r-example handouts-presentation-latex; done &> /dev/null
- make ppt-presentation-example ppt-presentation-r-example ppt-presentation-latex
- mkdir old-latex && mv *-latex.tex old-latex && make regenerate-latex-templates
- mkdir new-latex && mv *-latex.tex new-latex && diff -Nur old-latex/ new-latex/
- gs -sDEVICE=png16m -dSAFER -dBATCH -dNOPAUSE -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile="presentation-example-%03d.png" -r71 'presentation-example.pdf' && mogrify -border 1 -bordercolor black presentation-example-00[13].png
- "! grep -qE 'LaTeX Error|Undefined control sequence' error.log"
after_success:
- mkdir -p kuleuven-templates
- for i in *.pdf; do
pdftk "$i" output "$i.tmp" uncompress;
sed -i '/^\/\(Mod\|Creation\)Date (D:/s/[0-9]/0/g' "$i.tmp";
pdftk "$i.tmp" output "$i" compress;
sed -i '/^\/ID \[/s/[0-9a-fA-F]/D/g' "$i";
rm "$i.tmp";
done
- mv *.pdf *.ppt *.Rmd *.markdown *-example.tex presentation-example-00[13].png kuleuven-templates/
- git add -f kuleuven-templates/
- git commit -m "$(git log --format=%B -n 1 $TRAVIS_COMMIT)"
- if test "$TRAVIS_PULL_REQUEST" = "false" -a "$TRAVIS_BRANCH" = "master"; then
git push deploy deploy:master;
fi