Commit 6107cda8 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

ci: fix .gitlab-ci.yml

- remove the 'build' stage
parent 5e893f7c
Pipeline #22377 failed
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
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
.check_as_cran:
stage: tests
.check:
stage: check
script:
- R CMD check --as-cran airGRteaching_*.tar.gz
- R -e ' rcmdcheck::rcmdcheck(args = ifelse(as.logical(Sys.getenv("NOT_CRAN")), "", "--as-cran"), error_on = "error")'
update_packages_patched:
.check_not_cran:
variables:
R_VERSION: "patched"
extends: .update_packages
NOT_CRAN: "true"
extends: .check
update_packages_devel:
.check_as_cran:
variables:
R_VERSION: "devel"
extends: .update_packages
NOT_CRAN: "false"
extends: .check
update_packages_oldrel:
check_not_cran_patched:
variables:
R_VERSION: "oldrel"
extends: .update_packages
R_VERSION: "patched"
extends: .check_not_cran
build_patched:
check_as_cran_patched:
variables:
R_VERSION: "patched"
extends: .build
extends: .check_as_cran
build_devel:
check_not_cran_devel:
only:
refs:
- tags
- schedules
variables:
R_VERSION: "devel"
extends: .build
extends: .check_not_cran
build_oldrel:
check_as_cran_devel:
only:
refs:
- tags
- schedules
variables:
R_VERSION: "oldrel"
extends: .build
check_as_cran_patched:
variables:
R_VERSION: "patched"
R_VERSION: "devel"
extends: .check_as_cran
check_as_cran_devel:
check_not_cran_oldrel:
only:
refs:
- tags
- schedules
variables:
R_VERSION: "devel"
extends: .check_as_cran
R_VERSION: "oldrel"
extends: .check_not_cran
check_as_cran_oldrel:
only:
......
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