.gitlab-ci.yml 2.1 KB
Newer Older
1
stages:
2
  - update_packages
3
4
5
  - build
  - tests

6
7
8
default:
  before_script:
    - echo "setwd(\"$(pwd)\")" > .Rprofile
9
    - PATH=~/R/sources/R-${R_VERSION}/bin:$PATH
10
    - rename "s/${R_VERSION}.airGR/airGR/" *.tar.gz
11

12
13
14
15
16
17
18
19
20
.update_packages:
  stage: update_packages
  only:
    refs:
      - tags
      - schedules
  script:
    - Rscript -e "update.packages(ask=FALSE, repos=\"http://cran.r-project.org\")"

21
.build:
22
23
24
25
  stage: build
  script:
    - cd ..
    - echo "setwd(\"$(pwd)\")" > .Rprofile
26
    - R CMD build airgr
27
    - rename "s/airGR/${R_VERSION}.airGR/" airGR_*.tar.gz
28
29
30
31
32
    - mv *.tar.gz airgr/
  artifacts:
    untracked: true
    expire_in: 1 week

33
.check_not_cran:
34
  stage: tests
35
36
  variables:
    NOT_CRAN: "true"
37
  script:
38
    - R CMD check airGR_*.tar.gz
39

40
.check_as_cran:
41
42
  stage: tests
  script:
43
    - R CMD check --as-cran airGR_*.tar.gz
44

45
46
47
48
update_packages_patched:
  variables:
    R_VERSION: "patched"
  extends: .update_packages
49

50
51
52
53
54
55
56
57
build_patched:
  variables:
    R_VERSION: "patched"
  extends: .build

check_not_cran_patched:
  variables:
    R_VERSION: "patched"
58
  extends: .check_not_cran
59
60
61
62

check_as_cran_patched:
  variables:
    R_VERSION: "patched"
63
  extends: .check_as_cran
64

65
66
67
68
69
update_packages_devel:
  variables:
    R_VERSION: "devel"
  extends: .update_packages

70
71
72
73
74
75
76
77
78
79
build_devel:
  only:
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
  extends: .build

check_not_cran_devel:
80
  only:
81
82
83
84
85
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
86
  extends: .check_not_cran
87
88

check_as_cran_devel:
89
  only:
90
91
92
93
94
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
95
  extends: .check_as_cran
96

97
98
99
100
101
update_packages_oldrel:
  variables:
    R_VERSION: "oldrel"
  extends: .update_packages

102
103
104
105
106
107
108
109
110
111
build_oldrel:
  only:
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
  extends: .build

check_not_cran_oldrel:
112
  only:
113
114
115
116
117
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
118
  extends: .check_not_cran
119
120

check_as_cran_oldrel:
121
  only:
122
123
124
125
126
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
127
  extends: .check_as_cran