How to install (complex) dependencies in Travis-CI?

喜夏-厌秋 提交于 2019-12-08 11:42:20

问题


I would like to setup a documentation CI build, i.e. a build that requires nothing more than ASCIIDOC, TeX, XSLT (Saxon) et cetera.

Now I am aware of [1] which states that regular apt commands can be used for hopefully installing any of this dependencies.

But how do do so? It appears cumbersome to change .travis.yml, push a build and start again if there was a typo or other error in the install command.

Thus I was looking into 'travis console' to (somehow) interactively test the setup dependency process - with no luck.

What is the recommended way of setting up dependencies (packages)?

Edit: The document generation process is driven by a simple hand crafted Makefile. The Makefile invokes various programs, especially asciidoc, python, TeX, DBLaTeX, libxslt, Saxon. Basic TeX is not enough as some fancy TeX packages are required as well. The installation of DBLaTeX is naturally cumbersome.

[1] http://docs.travis-ci.com/user/installing-dependencies


回答1:


If you want to run Travis locally on your own virtual machine, you may want to look at Travis Build. Travis Build allows you to generate the shell script that performs the Travis build. Setting this up is a bit cumbersome and may not be worth it unless you have a very complicated build.

The documentation build that you're describing seems relatively straightforward (although you're not giving us much details). I'd say you should be able to put those dependencies together by trial and error.

There's also a middle ground between Travis Build and pure trial-and-error. Use Vagrant to set up a virtual machine with Ubuntu Precise (same version as Travis is using). Then figure out which packages you need to install (apt-get install ...) to get your build running on the virtual machine. Then replicate those steps in your .travis.yml and you should be good to go.



来源:https://stackoverflow.com/questions/32008587/how-to-install-complex-dependencies-in-travis-ci

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!