diff --git a/.travis.yml b/.travis.yml index d1b5d76..23f2ef8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,14 @@ sudo: required before_install: - sudo apt-get update -qq - sudo apt-get install -y --force-yes smlnj ml-yacc ml-lex ml-ulex + - which pdflatex || sudo apt-get install texlive-full texlive-latex-extra + +cache: + directories: + - /usr/bin script: - chmod u+x script/test.sh + - chmod u+x script/test_latex.sh + - ./script/test_latex.sh - ./script/test.sh diff --git a/script/build.sh b/script/build.sh index 4bbee40..166d15a 100755 --- a/script/build.sh +++ b/script/build.sh @@ -1,6 +1,6 @@ echo "OS.Process.exit OS.Process.failure" | sml -m src/main.cm if [ $? -eq 0 ]; then - printf 'sml @SMLload=sequent.x86-darwin $@\n' > sequent + printf 'sml @SMLload=sequent.x86-darwin $@ || sml @SMLload=sequent.x86-linux $@\n' > sequent chmod u+x sequent else printf "Could not compile.\n" diff --git a/script/test_latex.sh b/script/test_latex.sh index d1f8865..88deda9 100755 --- a/script/test_latex.sh +++ b/script/test_latex.sh @@ -1,2 +1,2 @@ rm -rf resources/out.tex -bash script/build.sh && echo "((A /\\ B) => (B /\\ A)) /\\ ((B /\\ A) => (A /\\ B))" | ./sequent --latex > resources/out.tex && cd resources && xelatex out.tex && open -a Preview out.pdf +bash script/build.sh && echo "((A /\\ B) => (B /\\ A)) /\\ ((B /\\ A) => (A /\\ B))" | ./sequent --latex > resources/out.tex && cd resources && pdflatex -halt-on-error out.tex && open -a Preview out.pdf