GithubHelp home page GithubHelp logo

rjbgoudie / r-appveyor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krlmlr/r-appveyor

0.0 2.0 0.0 367 KB

Tools for using R with AppVeyor (https://appveyor.com)

Makefile 0.37% R 3.15% Shell 85.73% PowerShell 9.14% C++ 1.61%

r-appveyor's Introduction

R + AppVeyor AppVeyor build status Travis-CI Build Status

This is a solution for continuous integration for R projects on Windows, using AppVeyor -- a CI testing service similar to Travis-CI. Under the hood, r-travis is used to perform the testing; this works even on Windows thanks to MinGW and MSYS.

Usage

  1. Sign up to AppVeyor.
  2. Enable testing for your project.
  3. Run usethis::use_appveyor() in your project.
  4. (Optional) Adapt appveyor.yml to your needs according to the documentation.
  5. (Optional) Add a badge as described by the output of usethis::use_appveyor().
  6. Be sure to supply a .gitattributes file that takes care of fixing CRLF conversion settings that are relevant on Windows. The one in this repo can be used for starters.
  7. Push to your repo to start building.
  8. Enjoy!

Build and test commands

The travis-tool used in appveyor.yml is a modified copy of the r-travis project, documentation is available on its wiki.

Environment variables

These can be set in the appveyor.yml, overriding the defaults. This repo tests several configurations at once in a build matrix, see also the build status.

Example:

environment:
  VARIABLE: value
  • R_VERSION: The version of R to be used for testing. Specify devel, patched, stable (or release), oldrel, or a version number.
  • R_ARCH: The architecture to be used for testing, one of x64 (default) or i386.
  • RTOOLS_VERSION: The version of Rtools to be used for testing, defaults to the most recent Rtools. Specify e.g. 33 for Rtools 3.3.
  • USE_RTOOLS: Set USE_RTOOLS: true if Rtools needs to be installed, e.g. if you use install_github or if there are packages in Remotes: in your DESCRIPTION file. Defaults to false.
  • GCC_PATH: The path to GCC in the Rtools installation, currently one of gcc-4.6.3 (default), mingw_32 or mingw_64.
  • WARNINGS_ARE_ERRORS: Set to 1 to treat all warnings as errors, otherwise leave empty.
  • CRAN: The CRAN mirror to use, defaults to RStudio's CDN via HTTPS. Change to HTTP for R 3.1.3 or earlier.
  • R_BUILD_ARGS: Arguments passed to R CMD build, defaults to --no-manual.
  • R_CHECK_ARGS: Arguments passed to R CMD check, defaults to --no-manual --as-cran.
  • PKGTYPE: Passed as type to install.packages(), remotes::install_deps() and devtools::install_deps().
  • NOT_CRAN: Set this to true to avoid testthat::skip_on_cran() skipping tests.

Currently, all vignettes (and the VignetteBuilder entry in DESCRIPTION) are removed prior to building (due to the absence of pandoc and LaTeX which are likely to be needed).

Artifacts

In contrast to Travis-CI, AppVeyor offers facilities for hosting artifacts. This can be configured by adding a section to the appveyor.yml. The sample file is configured to deploy logs, and source and binary versions of the built package. Check the "ARTIFACTS" section for your project at AppVeyor.

Troubleshooting

Using a 64-bit R installation

Some R packages, notably rJava, require a 64-bit installation of Windows and R. If you try to install these packages on a 32-bit system you'll see a message similar to:

  Error: .onLoad failed in loadNamespace() for 'rJava', details:
    call: inDL(x, as.logical(local), as.logical(now), ...)
    error: unable to load shared object 'C:/Users/appveyor/AppData/Local/Temp/1/RtmpWa3KNC/RLIBS_bdc2913935/rJava/libs/i386/rJava.dll':
    LoadLibrary failure:  %1 is not a valid Win32 application.

To solve this problem, add to your appveyor.yml:

platform: x64

environment:
  R_ARCH: x64

This will cause Appveyor to run your build on a 64-bit version of Windows Server, using the 64-bit R binary.

Acknowledgements

This wouldn't have been as easy without r-travis and the experience gained there. Thanks!

See also

The win-builder project has been around much longer and provides more comprehensive testing; you still might want to use this service before submitting to CRAN.

Other branches

Build status for expected failure (master-fail branch, failure expected)

License

MIT © Kirill Müller.

r-appveyor's People

Contributors

craigcitro avatar krlmlr avatar eddelbuettel avatar wush978 avatar henrikbengtsson avatar hadley avatar hofnerb avatar link-ny avatar nfultz avatar romainfrancois avatar jimhester avatar maelle avatar hughjonesd avatar schloerke avatar jeroen avatar jdblischak avatar richfitz avatar rplzzz avatar tylerlittlefield avatar xrobin avatar yihui avatar muschellij2 avatar

Watchers

RJB Goudie avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.