-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathr.gitlab.ci.gitlab-ci.yml
More file actions
67 lines (64 loc) · 1.87 KB
/
r.gitlab.ci.gitlab-ci.yml
File metadata and controls
67 lines (64 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
stages:
- test
- pages
test-linux:
stage: test
tags:
- linux
image: registry.gitlab.com/jangorecki/dockerfiles/r-base-dev
before_script:
- echo "Revision:" $CI_BUILD_REF >> ./DESCRIPTION
script:
- R CMD build .
- R CMD check $(ls -1t *.tar.gz | head -n 1) --as-cran --no-manual
- mkdir -p bus/src/contrib
- mv $(ls -1t *.tar.gz | head -n 1) bus/src/contrib
- Rscript -e 'tools::write_PACKAGES(contrib.url("bus"), fields="Revision", addFiles=TRUE)'
artifacts:
expire_in: 4 weeks
when: always
paths:
- r.gitlab.ci.Rcheck
- bus
test-windows:
stage: test
tags:
- windows
before_script:
- curl.exe -s -o ../R-win.exe https://cran.r-project.org/bin/windows/base/R-4.0.0-win.exe
- Start-Process -FilePath ..\R-win.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
- curl.exe -s -o ../rtools.exe https://cran.r-project.org/bin/windows/Rtools/rtools40-x86_64.exe
- Start-Process -FilePath ..\rtools.exe -ArgumentList "/VERYSILENT /DIR=C:\rtools40" -NoNewWindow -Wait
- $ENV:PATH = "C:\R\bin;C:\rtools40\usr\bin;$ENV:PATH"
- >-
Add-Content DESCRIPTION "Revision: $ENV:CI_BUILD_REF"
script:
- R.exe CMD build .
- R.exe CMD check $(ls.exe -1t *.tar.gz | head -n 1) --as-cran --no-manual
- R.exe CMD INSTALL $(ls.exe -1t *.tar.gz | head -n 1) --build
- mkdir.exe -p bus/bin/windows/contrib/4.0
- mv.exe $(ls.exe -1t *.zip | head -n 1) bus/bin/windows/contrib/4.0
- Rscript.exe -e "tools::write_PACKAGES(contrib.url('bus', type='win.binary'), type='win.binary', fields='Revision', addFiles=TRUE)"
artifacts:
expire_in: 4 weeks
when: always
paths:
- r.gitlab.ci.Rcheck
- bus
pages:
stage: pages
only:
- master
tags:
- linux
image: ubuntu
dependencies:
- test-linux
- test-windows
script:
- mkdir public
- mv bus/* public
artifacts:
expire_in: 4 weeks
paths:
- public