New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function use_appveyor() similar to use_travis() #549

Merged
merged 6 commits into from Jan 12, 2015

Conversation

Projects
None yet
3 participants
@krlmlr
Member

krlmlr commented Aug 12, 2014

AppVeyor is a Windows-based CI system much like Travis CI, and also free for open-source projects. I have prepared a wrapper around r-travis so that AppVeyor can be used to test R packages (and also later deploy them in binary form). It's work in progress, but I think the format of the appveyor.yml configuration file is more or less stable.

Example: Test output for a build of the rappdirs package.

Pull request follows.

#' @rdname infrastructure
#' @export
add_appveyor <- use_appveyor

This comment has been minimized.

@hadley

hadley Aug 13, 2014

Member

Don't need add_appveyor() existing add functions will eventually be deprecated and removed.

pkg_template_name = gsub("^[.]+", "", template_name),
next_steps = c(
paste0("Turn on ", ci_name, " for this repo at ", ci_url),
paste0("Add a ", ci_name, " shield to your README.md")

This comment has been minimized.

@hadley

hadley Aug 13, 2014

Member

Can you update to actually generate the shield markdown? (see my work this morning)

This comment has been minimized.

@krlmlr

krlmlr Aug 13, 2014

Member

It looks like this is at least very difficult (if not impossible), since the shield URL contains a unique identifier, as in https://ci.appveyor.com/api/projects/status/xtc629xek00o5rui .

invisible(TRUE)
use_template(
pkg = pkg,

This comment has been minimized.

@hadley

hadley Aug 13, 2014

Member

Since basically every devtools function starts with pkg, you don't need to explicitly name it. I think it's also better to preserve the user friendly "Adding Rstudio project file" rather than just "Adding xxx.Rproj".

invisible(TRUE)
}
use_travis <- function(pkg = ".") use_ci(pkg = pkg, template_name = ".travis.yml", ci_name = "Travis", ci_url = "https://travis-ci.org/profile")

This comment has been minimized.

@hadley

hadley Aug 13, 2014

Member

Multiple lines please

@krlmlr

This comment has been minimized.

Member

krlmlr commented Aug 13, 2014

I've rewritten the patch, the refactoring is now gone -- too many special cases.

#' Add basic AppVeyor template to a package. Also adds \code{appveyor.yml} to
#' \code{.Rbuildignore} so it isn't included in the built package.
#' @export
#' @aliases add_travis

This comment has been minimized.

@hadley

hadley Aug 13, 2014

Member

You can remove that line

This comment has been minimized.

@krlmlr

krlmlr Aug 13, 2014

Member

Removed. Thanks, good catch.

@krlmlr

This comment has been minimized.

Member

krlmlr commented Aug 16, 2014

Added a section to the .yml file so that artifacts created by the build (including binary .zip file) are deployed to AppVeyor. Ready for merging.

@robertzk

This comment has been minimized.

Contributor

robertzk commented Oct 10, 2014

This is great! Hope this makes it to master some day.

Kirill Müller added some commits Jan 8, 2015

hadley added a commit that referenced this pull request Jan 12, 2015

Merge pull request #549 from krlmlr/549-r-appveyor
Add function use_appveyor() similar to use_travis()

@hadley hadley merged commit 198184b into r-lib:master Jan 12, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@hadley

This comment has been minimized.

Member

hadley commented Jan 12, 2015

Thanks!

@krlmlr krlmlr deleted the krlmlr:549-r-appveyor branch Oct 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment