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

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

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

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

34
35
36
.regression:
  stage: regression
  script:
37
38
39
    - Rscript tests/regression_tests.R stable
    - Rscript tests/regression_tests.R dev
    - Rscript tests/regression_tests.R compare
40

41
.check_not_cran:
42
  stage: tests
43
44
  variables:
    NOT_CRAN: "true"
45
  script:
46
    - R CMD check airGR_*.tar.gz
47

48
.check_as_cran:
49
50
  stage: tests
  script:
51
    - R CMD check --as-cran airGR_*.tar.gz
52

53
54
55
56
update_packages_patched:
  variables:
    R_VERSION: "patched"
  extends: .update_packages
57

58
59
60
61
62
build_patched:
  variables:
    R_VERSION: "patched"
  extends: .build

63
64
65
66
67
68
regression_patched:
  variables:
    R_VERSION: "patched"
  extends: .regression

regression_devel:
69
70
71
  only:
    refs:
      - schedules
72
73
74
75
76
  variables:
    R_VERSION: "devel"
  extends: .regression

regression_oldrel:
77
78
79
  only:
    refs:
      - schedules
80
81
82
83
  variables:
    R_VERSION: "oldrel"
  extends: .regression

84
85
86
check_not_cran_patched:
  variables:
    R_VERSION: "patched"
87
  extends: .check_not_cran
88
89
90
91

check_as_cran_patched:
  variables:
    R_VERSION: "patched"
92
  extends: .check_as_cran
93

94
95
96
97
98
update_packages_devel:
  variables:
    R_VERSION: "devel"
  extends: .update_packages

99
100
101
102
103
104
105
106
107
108
build_devel:
  only:
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
  extends: .build

check_not_cran_devel:
109
  only:
110
111
112
113
114
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
115
  extends: .check_not_cran
116
117

check_as_cran_devel:
118
  only:
119
120
121
122
123
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
124
  extends: .check_as_cran
125

126
127
128
129
130
update_packages_oldrel:
  variables:
    R_VERSION: "oldrel"
  extends: .update_packages

131
132
133
134
135
136
137
138
139
140
build_oldrel:
  only:
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
  extends: .build

check_not_cran_oldrel:
141
  only:
142
143
144
145
146
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
147
  extends: .check_not_cran
148
149

check_as_cran_oldrel:
150
  only:
151
152
153
154
155
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
156
  extends: .check_as_cran
157