如何在 Travis-CI 中安装(复杂的)依赖项? [英] How to install (complex) dependencies in Travis-CI?

查看:17
本文介绍了如何在 Travis-CI 中安装(复杂的)依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置一个文档 CI 构建,即一个只需要 ASCIIDOC、TeX、XSLT (Saxon) 等的构建.

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

现在我知道 [1] 声明可以使用常规的 apt 命令来安装任何依赖项.

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

但是怎么做呢?如果安装命令中出现拼写错误或其他错误,更改 .travis.yml、推送构建并重新启动似乎很麻烦.

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.

因此,我正在研究travis 控制台"以(以某种方式)以交互方式测试设置依赖过程 - 没有运气.

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)?

文档生成过程由一个简单的手工制作的 Makefile 驱动.Makefile 调用各种程序,尤其是 asciidoc、python、TeX、DBLaTeX、libxslt、Saxon.基本的 TeX 是不够的,因为还需要一些花哨的 TeX 包.DBLaTeX的安装自然是繁琐的.

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-依赖

推荐答案

如果你想在自己的虚拟机上本地运行 Travis,你可能想看看 Travis Build.Travis Build 允许您生成执行 Travis 构建的 shell 脚本.设置这个有点麻烦,除非你有一个非常复杂的构建,否则可能不值得.

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.

在 Travis Build 和纯试错之间也有一个中间地带.使用 Vagrant 使用 Ubuntu Precise 设置虚拟机(与 Travis 使用的版本相同).然后找出您需要安装哪些软件包(apt-get install ...)以使您的构建在虚拟机上运行.然后在你的 .travis.yml 中复制这些步骤,你应该很高兴.

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.

这篇关于如何在 Travis-CI 中安装(复杂的)依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆