Commit b1c4b365 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

Merge branch '37-update-ci-yaml-file-to-take-tinto-account-the-changes-made-in-airgr' into 'dev'

Resolve "Update CI yaml file to take into account the changes made in airGR"

Closes #37

See merge request !14
parents 5e893f7c 0b7f1d43
Pipeline #22379 passed with stage
in 1 minute and 34 seconds
stages:
- update_packages
- build
- tests
- check
default:
before_script:
- echo "setwd(\"$(pwd)\")" > .Rprofile
- echo ".libPaths <- c(Sys.getenv(\"R_LIBS_USER\"), .libPaths())" >> .Rprofile
- PATH=~/R/sources/R-${R_VERSION}/bin:$PATH
- rename "s/${R_VERSION}.airGRteaching/airGRteaching/" *.tar.gz
- R -e 'chooseCRANmirror(graphics = FALSE, ind = 1); pkg <- "remotes"; pkgInst <- installed.packages()[, "Package"]; pkgMiss <- setdiff(pkg, pkgInst); if (length(pkgMiss) > 0) install.packages(pkgMiss)'
- R -e 'remotes::install_git("https://gitlab.irstea.fr/HYCAR-Hydro/airgr", ref = "dev")'
- R -e 'chooseCRANmirror(graphics = FALSE, ind = 1); pkg <- c("dygraphs", "plotrix", "shiny", "shinyjs"); pkgInst <- installed.packages()[, "Package"]; pkgMiss <- setdiff(pkg, pkgInst); if (length(pkgMiss) > 0) install.packages(pkgMiss)'
- R -e 'remotes::install_deps(dep = "Imports")'
.update_packages:
stage: update_packages
only:
refs:
- tags
- schedules
.check:
stage: check
script:
- Rscript -e "update.packages(ask=FALSE, repos=\"http://cran.r-project.org\")"
.build:
stage: build
script:
- cd ..
- echo "setwd(\"$(pwd)\")" > .Rprofile
- R CMD build airgrteaching
- rename "s/airGRteaching/${R_VERSION}.airGRteaching/" airGRteaching_*.tar.gz
- mv *.tar.gz airgrteaching/
artifacts:
untracked: true
expire_in: 1 week
- R -e ' rcmdcheck::rcmdcheck(args = ifelse(as.logical(Sys.getenv("NOT_CRAN")), "", "--as-cran"), error_on = "error")'
.check_as_cran:
stage: tests
script:
- R CMD check --as-cran airGRteaching_*.tar.gz
update_packages_patched:
variables:
R_VERSION: "patched"
extends: .update_packages
update_packages_devel:
variables:
R_VERSION: "devel"
extends: .update_packages
update_packages_oldrel:
variables:
R_VERSION: "oldrel"
extends: .update_packages
build_patched:
variables:
R_VERSION: "patched"
extends: .build
build_devel:
only:
refs:
- tags
- schedules
variables:
R_VERSION: "devel"
extends: .build
build_oldrel:
only:
refs:
- tags
- schedules
variables:
R_VERSION: "oldrel"
extends: .build
NOT_CRAN: "false"
extends: .check
check_as_cran_patched:
variables:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment