From b0ad6d6f10eaf65497f00f43e5d2e43427bcfec9 Mon Sep 17 00:00:00 2001
From: Dorchies David <david.dorchies@inrae.fr>
Date: Sat, 17 Apr 2021 01:16:17 +0200
Subject: [PATCH] fix(ci): libPaths issue with R v4.0.5

---
 .gitlab-ci.yml | 44 ++------------------------------------------
 1 file changed, 2 insertions(+), 42 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dd5d2692..5019ac13 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,31 +1,14 @@
 stages:
-  - build
   - check
   - regression
   - revdepcheck
 
-variables:
-  R_LIBS_USER: "$CI_PROJECT_DIR/ci/lib"
-
 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}.airGR/airGR/" *.tar.gz
-
-.build:
-  stage: build
-  script:
-    - cd ..
-    - echo "setwd(\"$(pwd)\")" > .Rprofile
-    - R -e 'Sys.getenv()'
-    - R -e '.libPaths()'
-    - R -e 'utils::install.packages("usethis", repo = "https://cloud.r-project.org/")'
-    - R -e 'remotes::install_deps(pkgdir = "airgr", dep = T)'
-    - R CMD build airgr
-  artifacts:
-    untracked: true
-    expire_in: 1 week
+    - R -e 'remotes::install_deps(dep = T)'
 
 .regression:
   stage: regression
@@ -50,11 +33,6 @@ default:
     NOT_CRAN: "false"
   extends: .check
 
-build_patched:
-  variables:
-    R_VERSION: "patched"
-  extends: .build
-
 regression_patched:
   variables:
     R_VERSION: "patched"
@@ -86,15 +64,6 @@ check_as_cran_patched:
     R_VERSION: "patched"
   extends: .check_as_cran
 
-build_devel:
-  only:
-    refs:
-      - tags
-      - schedules
-  variables:
-    R_VERSION: "devel"
-  extends: .build
-
 check_not_cran_devel:
   only:
     refs:
@@ -113,15 +82,6 @@ check_as_cran_devel:
     R_VERSION: "devel"
   extends: .check_as_cran
 
-build_oldrel:
-  only:
-    refs:
-      - tags
-      - schedules
-  variables:
-    R_VERSION: "oldrel"
-  extends: .build
-
 check_not_cran_oldrel:
   only:
     refs:
-- 
GitLab