A few days ago I wrote about Travis CI, and was wondering if we could integrate the testing of R packages into this wonderful platform. A reader (Vincent Arel-Bundock) pointed out in the comments that Travis was running Ubuntu that allows you to install software packages at your will.
I took a look at the documentation, and realized they were building and testing packages in virtual machines. No wonder sudo apt-get works. Remember apt-get -h | tail -n1:
This APT has Super Cow Powers. (APT有超级牛力)
R on Travis CI
Now we are essentially system admins, and we can install anything from Ubuntu repositories, so it does not really matter that Travis CI does not support R yet. Below are a few steps to integrate your R package (on GitHub) into this system:
- follow the official guide util you see
.travis.yml; - copy my
.travis.ymlfor the knitr package if you want, or write your own;- I use a custom library path
~/Rto install add-on R packages so that I do not have to typesudoeverywhere - at the moment I use the RDev PPA by Michael Rutter to install R 3.0.0 since his plan for R 3.0 on CRAN is in May; at that time I’ll change this PPA to a CRAN repository
- since
R CMD checkrequires all packages inSuggestsas well, I install knitr usinginstall.packages(dep = TRUE)to make sure all relevant packages are installed make installandmake checkare wrappers ofR CMD buildandR CMD checkrespectively, defined in theMakefile
- I use a custom library path
- push this
.travis.ymlto GitHub, and Travis CI will start building your package when a worker is available (normally within a few seconds);
By default you will receive email notifications when there are changes in the build. You can also find the guide on the build status image in the documentation as well, e.g. 
What I described here actually applies to any software packages (not only R), as long as the dependencies are available under Ubuntu, or you know how to build them.
But it is still far from CRAN
OK, it works, but we are still a little bit far from what CRAN does, because Travis CI does not have official support for R. Each time we have to install one Gigabyte of additional software to create the R testing environment (sigh, if only R did not have to tie itself to LaTeX). If these packages are pre-built in the virtual machines, it will save us a lot of time.
The second problem is, there is no Windows support on Travis CI (one developer told us on Twitter that it was coming). There is a page for OS X, but I did not really figure out how to build software under OS X there.
The third problem is Travis CI only builds and tests packages; it does not provide downloads like CRAN. Perhaps we can upload the packages using encryption keys to our own servers.
R-Forge, where are you going?
I will shut up here since I realized I was not being constructive. Let me spend more time thinking about this, and I love to hear suggestions from readers as well.
So, two potential Google Summer of Code projects:
- make R an officially supported language on Travis CI (this really depends on if the Travis team want it or not)
- improve R-Forge (of course this depends on if the R-Forge team think they need help or not)
Donate
As a freelancer (currently working as a contractor) and a dad of three kids, I truly appreciate your donation to support my writing and open-source software development! Your contribution helps me cope with financial uncertainty better, so I can spend more time on producing high-quality content and software. You can make a donation through methods below.
-
Venmo:
@yihui_xie, or Zelle:xie@yihui.name -
Paypal
-
If you have a Paypal account, you can follow the link https://paypal.me/YihuiXie or find me on Paypal via my email
xie@yihui.name. Please choose the payment type as “Family and Friends” (instead of “Goods and Services”) to avoid extra fees. -
If you don’t have Paypal, you may donate through this link via your debit or credit card. Paypal will charge a fee on my side.
-
-
Other ways:
WeChat Pay (微信支付:谢益辉) Alipay (支付宝:谢益辉) 

When sending money, please be sure to add a note “gift” or “donation” if possible, so it won’t be treated as my taxable income but a genuine gift. Needless to say, donation is completely voluntary and I appreciate any amount you can give.
Please feel free to email me if you prefer a different way to give. Thank you very much!
I’ll give back a significant portion of the donations to the open-source community and charities. For the record, I received about $30,000 in total (before tax) in 2024-25, and gave back about $15,000 (after tax).