-
-
Notifications
You must be signed in to change notification settings - Fork 404
/
Copy pathtic.R
58 lines (42 loc) · 2.37 KB
/
tic.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# remove possible lock files of packages in every stage
get_stage("after_script") %>%
add_code_step(system("rm -rf $HOME/R/Library/00LOCK-*"))
# condition on env variable
if (Sys.getenv("RCMDCHECK") == "TRUE") {
get_stage("install") %>%
add_code_step(if (length(trimws(strsplit(Sys.getenv("WARMUPPKGS"), " ")[[1]])[!trimws(strsplit(Sys.getenv("WARMUPPKGS"), " ")[[1]]) %in% installed.packages()]) > 0)
install.packages(trimws(strsplit(Sys.getenv("WARMUPPKGS"), " ")[[1]])[!trimws(strsplit(Sys.getenv("WARMUPPKGS"), " ")[[1]]) %in% installed.packages()])) %>%
add_code_step(devtools::update_packages(TRUE))
get_stage("before_script") %>%
add_code_step(system2("java", args = c("-cp", "$HOME/R/Library/RWekajars/java/weka.jar weka.core.WekaPackageManager",
"-install-package", "thirdparty/XMeans1.0.4.zip")))
get_stage("script") %>%
add_code_step(devtools::document()) %>%
add_code_step(devtools::build(manual = TRUE)) %>%
add_code_step(rcmdcheck::rcmdcheck(path = "../mlr_2.13.tar.gz", args = "--as-cran",
error_on = "error"))
if (!Sys.getenv("$TRAVIS_EVENT_TYPE") == "cron") {
get_stage("before_deploy") %>%
add_step(step_setup_ssh())
get_stage("deploy") %>%
add_code_step(devtools::document()) %>%
add_step(step_push_deploy(commit_paths = "man/"))
}
}
if (Sys.getenv("TUTORIAL") == "HTML") {
get_stage("install") %>%
add_code_step(if (length(trimws(strsplit(Sys.getenv("WARMUPPKGS"), " ")[[1]])[!trimws(strsplit(Sys.getenv("WARMUPPKGS"), " ")[[1]]) %in% installed.packages()]) > 0)
install.packages(trimws(strsplit(Sys.getenv("WARMUPPKGS"), " ")[[1]])[!trimws(strsplit(Sys.getenv("WARMUPPKGS"), " ")[[1]]) %in% installed.packages()])) %>%
add_code_step(system2("java", args = c("-cp", "$HOME/R/Library/RWekajars/java/weka.jar weka.core.WekaPackageManager",
"-install-package", "thirdparty/XMeans1.0.4.zip")))
get_stage("install") %>%
add_step(step_install_cran("magick")) %>% # favicon creation
add_step(step_install_cran("pander"))
if (!Sys.getenv("$TRAVIS_EVENT_TYPE") == "cron") {
get_stage("before_deploy") %>%
add_step(step_setup_ssh())
get_stage("deploy") %>%
add_step(step_build_pkgdown()) %>%
add_step(step_push_deploy(commit_paths = "docs/*"))
}
}