KevCaz's Website

I very much enjoy sharing thoughts and code on our blog inSileco. Recently, one of the authors mentioned that he was not able to clone the repository on his Windows machine. I came to realize that we better not assume that everybody is working on MacOS or Linux and check that inSileco works well on Windows. One of the most convenient way to do so is to use AppVeyor and I therefore decided to spend some time making the build passed on AppVeyor!

There were two main difficulties to overcome:

  1. install all dependencies properly;
  2. make sure we do not use functions in a ‘only-Unix’ way.

Regarding 1, I had to edit the appveyor.yml file (see its latest version on Github) so as to:

  • install a recent version of Pandoc: I found this issue on GitHub and so use chocolatey to install it;

  • use RTOOLS even though our repository do not include a src directory to successfully compile all remote packages.

Regarding 2, I simplified certain paths because some functions seem to be quite sensitive (unzip() for instance).

Below are the two parts of the appveyor.yml file I ended up adding to make it work (again you can see the file on GitHub)

1
2
3
4
5
6
environment:
  USE_RTOOLS: true

after_build:
  - choco install pandoc hugo
  - Rscript -e 'blogdown::build_site()'

Two final remarks:

  • choco install can be abbreviated cinst;
  • I chose to install Hugo via chocolatey there is a function of blogdown to do so: blogdown::install_hugo().