Skip to content

Commit

Permalink
Adding AppVeyor
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Dec 3, 2015
1 parent 82fc2ce commit 6e96fa2
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 1,11 @@
# Auto detect text files and perform LF normalization
* text=auto

# Lines added from https://github.com/krlmlr/r-appveyor/blob/master/.gitattributes
data/* binary
src/* text=lf
R/* text=lf

# Custom for Visual Studio
*.cs diff=csharp

Expand Down
4 changes: 4 additions & 0 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 144,10 @@ rgraph_ba_new_cpp <- function(m0 = 1L, m = 1L, t = 10L) {
.Call('netdiffuseR_rgraph_ba_new_cpp', PACKAGE = 'netdiffuseR', m0, m, t)
}

persistant <- function(graph, i, j, n) {
.Call('netdiffuseR_persistant', PACKAGE = 'netdiffuseR', graph, i, j, n)
}

rgraph_er_cpp <- function(n = 10L, p = 0.3, undirected = TRUE, weighted = FALSE, self = FALSE) {
.Call('netdiffuseR_rgraph_er_cpp', PACKAGE = 'netdiffuseR', n, p, undirected, weighted, self)
}
Expand Down
41 changes: 41 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 1,41 @@
# DO NOT CHANGE the "init" and "install" sections below

# Download script file from GitHub
init:
ps: |
$ErrorActionPreference = "Stop"
Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1'
install:
ps: Bootstrap

# Adapt as necessary starting from here

build_script:
- travis-tool.sh install_deps

test_script:
- travis-tool.sh run_tests

on_failure:
- travis-tool.sh dump_logs

artifacts:
- path: '*.Rcheck\**\*.log'
name: Logs

- path: '*.Rcheck\**\*.out'
name: Logs

- path: '*.Rcheck\**\*.fail'
name: Logs

- path: '*.Rcheck\**\*.Rout'
name: Logs

- path: '\*_*.tar.gz'
name: Bits

- path: '\*_*.zip'
name: Bits
14 changes: 14 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 199,20 @@ BEGIN_RCPP
return __result;
END_RCPP
}
// persistant
double persistant(const List& graph, int i, int j, int n);
RcppExport SEXP netdiffuseR_persistant(SEXP graphSEXP, SEXP iSEXP, SEXP jSEXP, SEXP nSEXP) {
BEGIN_RCPP
Rcpp::RObject __result;
Rcpp::RNGScope __rngScope;
Rcpp::traits::input_parameter< const List& >::type graph(graphSEXP);
Rcpp::traits::input_parameter< int >::type i(iSEXP);
Rcpp::traits::input_parameter< int >::type j(jSEXP);
Rcpp::traits::input_parameter< int >::type n(nSEXP);
__result = Rcpp::wrap(persistant(graph, i, j, n));
return __result;
END_RCPP
}
// rgraph_er_cpp
arma::sp_mat rgraph_er_cpp(int n, double p, bool undirected, bool weighted, bool self);
RcppExport SEXP netdiffuseR_rgraph_er_cpp(SEXP nSEXP, SEXP pSEXP, SEXP undirectedSEXP, SEXP weightedSEXP, SEXP selfSEXP) {
Expand Down

0 comments on commit 6e96fa2

Please sign in to comment.