{"id":15373691,"url":"https://github.com/krlmlr/r-appveyor","last_synced_at":"2025-05-05T22:16:00.716Z","repository":{"id":19376353,"uuid":"22616875","full_name":"krlmlr/r-appveyor","owner":"krlmlr","description":"Tools for using R with AppVeyor (https://appveyor.com)","archived":false,"fork":false,"pushed_at":"2022-03-14T19:39:19.000Z","size":396,"stargazers_count":131,"open_issues_count":18,"forks_count":60,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-05T22:15:53.853Z","etag":null,"topics":["appveyor","cran","r"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krlmlr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-04T19:24:45.000Z","updated_at":"2025-03-22T11:20:56.000Z","dependencies_parsed_at":"2022-08-05T04:00:28.972Z","dependency_job_id":null,"html_url":"https://github.com/krlmlr/r-appveyor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Fr-appveyor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Fr-appveyor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Fr-appveyor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Fr-appveyor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krlmlr","download_url":"https://codeload.github.com/krlmlr/r-appveyor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252584333,"owners_count":21771945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appveyor","cran","r"],"created_at":"2024-10-01T13:56:01.445Z","updated_at":"2025-05-05T22:16:00.668Z","avatar_url":"https://github.com/krlmlr.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# R + AppVeyor [![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/krlmlr/r-appveyor?branch=master\u0026svg=true)](https://ci.appveyor.com/project/krlmlr/r-appveyor/branch/master) [![Travis-CI Build Status](https://travis-ci.org/krlmlr/r-appveyor.svg?branch=master)](https://travis-ci.org/krlmlr/r-appveyor)\n\nThis is a solution for continuous integration for R projects on Windows, using [AppVeyor](http://appveyor.com) -- a CI testing service similar to [Travis-CI](http://travis-ci.org).\nUnder the hood, [r-travis](https://github.com/craigcitro/r-travis) is used to perform the testing; this works even on Windows thanks to [MinGW and MSYS](http://www.mingw.org/).\n\n\nUsage\n-----\n\n1. Sign up to [AppVeyor](http://appveyor.com).\n2. [Enable testing](https://ci.appveyor.com/projects/new) for your project.\n3. Run `usethis::use_appveyor()` in your project.\n4. (Optional) Adapt `appveyor.yml` to your needs according to the [documentation](http://www.appveyor.com/docs/appveyor-yml).\n5. (Optional) Add a badge as described by the output of `usethis::use_appveyor()`.\n6. 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](/.gitattributes) can be used for starters.\n7. Push to your repo to start building.\n8. Enjoy!\n\n\nBuild and test commands\n-----------------------\n\nThe `travis-tool` used in `appveyor.yml` is a [modified copy](https://github.com/krlmlr/r-travis) of the r-travis project, documentation is available [on its wiki](https://github.com/craigcitro/r-travis/wiki#configuration-options).\n\n\n\nEnvironment variables\n---------------------\n\nThese can be set in the `appveyor.yml`, overriding the defaults. [This repo](https://github.com/krlmlr/r-appveyor/blob/master/appveyor.yml#L20) tests several configurations at once in a build matrix, see also the [build status](https://ci.appveyor.com/project/krlmlr/r-appveyor/branch/master).\n\nExample:\n```\nenvironment:\n  VARIABLE: value\n```\n\n- `R_VERSION`: The version of R to be used for testing. Specify `devel`, `patched`, `stable` (or `release`), `oldrel`, or a version number.\n- `R_ARCH`: The architecture to be used for testing, one of `x64` (default) or `i386`.\n- `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.\n- `USE_RTOOLS`: Set `USE_RTOOLS: true` (or `USE_RTOOLS: yes`) if Rtools needs to be installed. Defaults to `true` if your package has a `src/` directory and `false` otherwise. Rtools may be needed if you use `install_github()`, if there are packages in `Remotes:` in your `DESCRIPTION` file, or if one of your dependencies has updated, but the associated Windows binary is not yet available from CRAN. (Set `PKGTYPE=binary` to avoid installing packages from source.)\n- `GCC_PATH`: The path to GCC in the Rtools installation, currently one of `gcc-4.6.3` (default), `mingw_32` or `mingw_64`.\n- `WARNINGS_ARE_ERRORS`: Set to 1 to treat all warnings as errors, otherwise leave empty.\n- `CRAN`: The CRAN mirror to use, defaults to [RStudio's CDN via HTTPS](https://cloud.r-project.org). Change to [HTTP](http://cloud.r-project.org) for R 3.1.3 or earlier.\n- `R_BUILD_ARGS`: Arguments passed to `R CMD build`, defaults to `--no-manual`.\n- `R_CHECK_ARGS`: Arguments passed to `R CMD check`, defaults to `--no-manual --as-cran`.\n- `PKGTYPE`: Passed as `type` to `install.packages()`, `remotes::install_github()` and `remotes::install_deps()`. Set to `both` to install packages from source if the source version is more recent than the binary version.\n- `NOT_CRAN`: Set this to `true` if you are using [testthat](https://testthat.r-lib.org/) and want to run tests marked with `testthat::skip_on_cran()`.\n- `R_REMOTES_STANDALONE`: Set this to `true` if builds are failing due to the inability to update infrastructure packages such as curl, git2r and rlang. Read more in the [docs for the remotes package](https://github.com/r-lib/remotes#standalone-mode).\n- `_R_CHECK_FORCE_SUGGESTS_`: Set this to `false` to avoid errors of the form \"Package suggested but not available\".\n- `KEEP_VIGNETTES`: Set this to a nonempty value build vignettes. You will likely need LaTeX and/or Pandoc, see below for installation instructions. By default, all vignettes are purged and the `VignetteBuilder` entry in `DESCRIPTION` is removed.\n- `DOWNLOAD_FILE_METHOD`: On some versions of R, setting this to `wininet` appears to work better than the default `auto`.\n\n\nArtifacts\n---------\n\nIn 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](https://ci.appveyor.com/projects).\n\n\nLaTeX\n-----\n\nSee [the example contributed by @pat-s](https://github.com/krlmlr/r-appveyor/issues/10#issuecomment-423832887) for a way to install LaTeX.\nThe [tinytex package](https://yihui.name/tinytex/) is another option.\n\nPandoc and other software\n-------------------------\n\nThe [Chocolatey installer](https://chocolatey.org/) is a convenient way to install other software.\nSee below for a Pandoc example from the [reprex repository](https://github.com/tidyverse/reprex/blob/2d505dd8a5c26366896a33d3a3f6a2c9092786d5/appveyor.yml#L21-L24):\n\n```yaml\nbefore_test:\n  - cinst pandoc\n  - ps: $env:Path += \";C:\\Program Files (x86)\\Pandoc\\\"\n  - pandoc -v\n```\n\n\nTroubleshooting\n---------------\n\n### Using a 64-bit R installation\n\nSome R packages, notably `rJava`, require a 64-bit installation of\nWindows and R.  If you try to install these packages on a 32-bit\nsystem you'll see a message similar to:\n```\n  Error: .onLoad failed in loadNamespace() for 'rJava', details:\n    call: inDL(x, as.logical(local), as.logical(now), ...)\n    error: unable to load shared object 'C:/Users/appveyor/AppData/Local/Temp/1/RtmpWa3KNC/RLIBS_bdc2913935/rJava/libs/i386/rJava.dll':\n    LoadLibrary failure:  %1 is not a valid Win32 application.\n```\nTo solve this problem, add to your `appveyor.yml`:\n```\nplatform: x64\n\nenvironment:\n  R_ARCH: x64\n```\nThis will cause Appveyor to run your build on a 64-bit version of\nWindows Server, using the 64-bit R binary.\n\nAcknowledgements\n----------------\n\nThis wouldn't have been as easy without [r-travis](https://github.com/craigcitro/r-travis) and the experience gained there. Thanks!\n\n\nSee also\n--------\n\nThe [win-builder project](http://win-builder.r-project.org/) has been around much longer and provides more comprehensive testing; you still might want to use this service before submitting to CRAN.\n\n\nOther branches\n--------------\n\n[![Build status for expected failure](https://ci.appveyor.com/api/projects/status/github/krlmlr/r-appveyor?branch=master-fail\u0026svg=true)](https://ci.appveyor.com/project/krlmlr/r-appveyor/branch/master-fail) ([`master-fail` branch](https://github.com/krlmlr/r-appveyor/tree/master-fail), failure expected)\n\n\nLicense\n-------\n\nMIT © [Kirill Müller](https://github.com/krlmlr).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlmlr%2Fr-appveyor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrlmlr%2Fr-appveyor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlmlr%2Fr-appveyor/lists"}