-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
40 lines (30 loc) · 1.96 KB
/
.travis.yml
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
# libreoffice for doc
before_install:
- if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then sudo apt-add-repository -y ppa:libreoffice/ppa; fi
- if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then sudo apt-get install libreoffice; fi
# temp fix for ps in osx
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then R -e "install.packages(c('ps'), repos = 'http://cran.rstudio.com/')" ; fi
language: R
r:
- oldrel
- release
- devel
cache: packages
warnings_are_errors: true
os:
- linux
- osx
matrix:
exclude:
-
os: osx
r: devel
after_success:
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${TRAVIS_R_VERSION_STRING}" = "release" ]]; then Rscript -e 'covr::codecov(type = "all")'; fi
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${TRAVIS_R_VERSION_STRING}" = "release" ]]; then Rscript -e 'covr::coveralls(type = "all", line_exclusions = c("R/shiny_etc.R","R/shiny_main.R","R/shiny_parts_server.R","R/shiny_parts_server_components.R","R/shiny_parts_ui.R","R/visual_functions.R"))'; fi
- if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then libreoffice --version; fi
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${TRAVIS_R_VERSION_STRING}" = "release" ]]; then Rscript -e 'if(!requireNamespace("RCurl", quietly = TRUE)) install.packages("RCurl")'; fi
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${TRAVIS_R_VERSION_STRING}" = "release" ]]; then Rscript -e 'b <- list.files(pattern = "tidycells_[0-9.]+.tar.gz", full.names = T);if(length(b)>0){b <- normalizePath(max(b));cat("Got", b, "\n");lk <- paste0("ftp://win-builder.r-project.org/", c("R-devel", "R-release", "R-oldrelease"), "/", basename(b));fup <- function(u) {i <- 0;e <- NULL;repeat({i<-i + 1;e<- try(RCurl::ftpUpload(what = b, to = u), silent = TRUE);if(inherits(e, "try-error")){Sys.sleep(1);if(u!=lk[1]){e <- "failed"}}else{cat("Uploaded for:", u, "\n");break();};if(i>50) break();});e};lapply(lk, fup)}'; fi
before_deploy:
# so no overwrite of linux build
- if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then rm -f *.tar.gz; fi