[R-pkg-devel] Building Windoze packages using rhub.

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Fri Mar 6 05:21:47 CET 2020


Recently I complained about the fact that it was taking forever for 
packages to come back to me from the winbuilder facility that Uwe Ligges 
so kindly provides.

Ben Bolker suggested that I use "rhub" instead.  I responded that I'd 
*heard* of rhub but had no real idea what it was nor how to use it.  Roy 
Mendelssohn chimed in with "Download the 'rhub' package.  Then 
submission to 'rhub' is one easy command."

Well, "Hah!" I say to that!!! :-) Easy perhaps if you are not a Bear of 
Very Little Brain, as I am.  However it seems to be do-able, even for a
Bear of Very Little Brain, and I managed (I think!!!) to get it to work.

Since I found the procedure a bit opaque, I thought I would set out step 
by step instructions, that perhaps others might find useful.

(1) Install rhub. E.g. in R issue the command

       install.packages("rhub",lib=<whatever>)

(2) Load rhub:  library(rhub)

(3) Validate your email address: validate_email()

You get prompted for an email address, and then asked for a verification 
code.  That code gets emailed to you; copy and paste it in and you're
good to go.

(4) Then (and this is one of the things that foxed me) you invoke the 
*check()* function from the rhub package.  (For the love of Pete, I 
don't want to check the <expletive deleted> package, I want to *build* 
it!!!  But never mind.)  The simplest thing to do is to make sure your 
working directory is that in which the source package lives.  Then issue 
the command

    xxx <- check("blah_1.1-1.tar.gz",platform="windows-x86_64-release")

where of course "blah_1.1-1.tar.gz" is the name of the tarball holding 
your source package.

Wait a while --- the function keeps you pretty well informed of what 
it's doing.

Finally it completes, and you see that xxx is an object of class 
"rhub_check" "R6" that prints as:

> ── blah 1.1-1: OK
> 
>   Build ID:   blah_1.1-1.tar.gz-3b30749f06644fd4833d02da6ec895fb
>   Platform:   Windows Server 2008 R2 SP1, R-release, 32/64 bit
>   Submitted:  3h 56m 39.3s ago
>   Build time: 11m 54.2s
> 
> 0 errors ✔ | 0 warnings ✔ | 0 notes ✔

(5) Now what?  Here's where I really got foxed.  I want a Windoze 
binary.  Where the <expletive deleted> is it?

Then I noticed that I'd got an email.  It was headed "blah 1.1-1 OK" and 
contained essentially the same material as did xxx.  But it also had:

> See the full build log: HTML, text, artifacts. 

This did not look at all promising; I did not want the <expletive 
deleted> build log, nor any "artefacts", but I clicked on "artefacts" 
out of curiosity.  And *this*, mirabile dictu, took me to a page from
which I could download blah_1.1-1.zip, and this was indeed the required 
Windoze binary.

Ta-da!!!  Victory.  I hope that those who are as mentally handicapped as 
I am find the foregoing useful.

cheers,

Rolf Turner

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-package-devel mailing list