@@ -3,41 +3,74 @@ name: build
3
3
on : [push, pull_request, workflow_dispatch]
4
4
5
5
jobs :
6
- Bibliography :
6
+ install-dependencies :
7
7
runs-on : ubuntu-latest
8
8
steps :
9
- - uses : actions/checkout@v3
10
- - uses : r-lib/actions/setup-tinytex@v2
9
+ - uses : actions/checkout@v3
11
10
12
- - name : Install LaTeX packages
13
- run : tlmgr install urlbst
11
+ - name : Restore System Dependencies Cache
12
+ uses : actions/cache@v3
13
+ id : system-deps-cache
14
+ with :
15
+ path : |
16
+ /usr/local/texlive
17
+ /usr/local/bin/pandoc
18
+ /usr/local/texlive/texmf-var
19
+ /usr/local/texlive/tlpkg/texlive.tlpdb
20
+ key : ${{ runner.os }}-system-deps-v1
21
+
22
+ - name : Install System Dependencies
23
+ if : steps.system-deps-cache.outputs.cache-hit != 'true'
24
+ run : |
25
+ sudo apt-get update
26
+ sudo apt-get install -y texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-bibtex-extra pandoc pandoc-citeproc
27
+
28
+ - uses : actions/cache@v3
29
+ id : r-packages-cache
30
+ with :
31
+ path : |
32
+ ~/.cache/R
33
+ /usr/local/texlive
34
+ /usr/local/bin/pandoc
35
+ /usr/local/texlive/texmf-var
36
+ key : ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}-v1
14
37
15
- - uses : gradle/wrapper-validation-action@v1
16
- - uses : actions/cache@v3
17
- id : pandoc
18
- with :
19
- path : pandoc-2.19.2-1
20
- key : pandoc-2.19.2-1
21
- - name : Download pandoc-2.19.2-1-amd64.deb
22
- if : steps.pandoc.outputs.cache-hit != 'true'
23
- run : |
24
- mkdir pandoc-2.19.2-1
25
- cd pandoc-2.19.2-1
26
- wget https://github.com/jgm/pandoc/releases/download/2.19.2/pandoc-2.19.2-1-amd64.deb
27
- - name : Install pandoc
28
- run : |
29
- cd pandoc-2.19.2-1
30
- sudo dpkg -i pandoc-2.19.2-1-amd64.deb
38
+ - uses : r-lib/actions/setup-r@v2
31
39
32
- - name : Check pandoc version
33
- run : pandoc --version
40
+ - uses : r-lib/actions/setup-r-dependencies@v2
41
+ with :
42
+ cache-version : 2
43
+ working-directory : rDNA/rDNA
44
+ extra-packages : |
45
+ any::devtools
46
+ any::testthat
47
+ any::ggplot2
48
+ any::roxygen2
49
+ any::igraph
50
+ any::ggraph
51
+ any::askpass
52
+ any::cluster
53
+ any::sna
54
+ any::ggrepel
55
+ any::coda
56
+ any::MCMCpack
57
+ any::tidygraph
58
+ any::heatmaply
59
+ any::factoextra
60
+ any::MASS
61
+ any::pbmcapply
34
62
63
+ Bibliography :
64
+ needs : install-dependencies
65
+ runs-on : ubuntu-latest
66
+ steps :
67
+ - uses : actions/checkout@v3
68
+ - uses : r-lib/actions/setup-tinytex@v2
69
+ - uses : gradle/wrapper-validation-action@v1
35
70
- name : Setup Gradle
36
71
37
-
38
72
- name : Execute Gradle build for bibliography
39
73
run : ./gradlew :bibliography:build
40
-
41
74
- name : Store artifacts
42
75
uses : actions/upload-artifact@v3
43
76
with :
@@ -68,33 +101,16 @@ jobs:
68
101
path : build/*.jar
69
102
70
103
rDNA :
104
+ needs : [DNA, install-dependencies]
71
105
runs-on : ubuntu-latest
72
106
steps :
73
107
- uses : actions/checkout@v3
74
-
75
108
- uses : r-lib/actions/setup-r@v2
76
-
77
- - uses : r-lib/actions/setup-r-dependencies@v2
78
- with :
79
- cache-version : 2
80
- working-directory : rDNA/rDNA
81
- extra-packages : |
82
- any::ggplot2
83
- any::roxygen2
84
- any::igraph
85
- any::ggraph
86
- any::askpass
87
- any::cluster
88
- any::sna
89
-
90
109
- uses : gradle/wrapper-validation-action@v1
91
-
92
110
- name : Setup Gradle
93
111
94
-
95
112
- name : Execute Gradle build for rDNA
96
113
run : ./gradlew :rDNA:build
97
-
98
114
- name : Store artifacts
99
115
uses : actions/upload-artifact@v3
100
116
with :
@@ -103,9 +119,8 @@ jobs:
103
119
104
120
rDNA-check :
105
121
runs-on : ${{ matrix.config.os }}
106
-
122
+ needs : rDNA
107
123
name : ${{ matrix.config.os }} (${{ matrix.config.r }})
108
-
109
124
strategy :
110
125
fail-fast : false
111
126
matrix :
@@ -115,29 +130,39 @@ jobs:
115
130
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
116
131
- {os: ubuntu-latest, r: 'release'}
117
132
- {os: ubuntu-latest, r: 'oldrel-1'}
118
-
119
133
env :
120
134
GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
121
135
R_KEEP_PKG_SOURCE : yes
122
-
123
136
steps :
124
137
- uses : actions/checkout@v3
125
-
126
- - uses : r-lib/actions/setup-pandoc@v2
127
-
128
138
- uses : r-lib/actions/setup-r@v2
129
139
with :
130
140
r-version : ${{ matrix.config.r }}
131
141
http-user-agent : ${{ matrix.config.http-user-agent }}
132
142
use-public-rspm : true
133
-
134
143
- uses : r-lib/actions/setup-r-dependencies@v2
135
144
with :
136
145
extra-packages : any::rcmdcheck
137
146
needs : check
138
147
working-directory : rDNA/rDNA
139
-
140
148
- uses : r-lib/actions/check-r-package@v2
141
149
with :
142
150
working-directory : rDNA/rDNA
143
151
upload-snapshots : true
152
+
153
+ rDNA-test :
154
+ runs-on : ubuntu-latest
155
+ needs : [rDNA, install-dependencies]
156
+ steps :
157
+ - uses : actions/checkout@v3
158
+ - uses : r-lib/actions/setup-r@v2
159
+ - uses : gradle/wrapper-validation-action@v1
160
+ - name : Setup Gradle
161
+
162
+ - name : Execute Gradle rDNATest Task
163
+ run : ./gradlew :rDNA:rDNATest
164
+ - name : Store test results
165
+ uses : actions/upload-artifact@v3
166
+ with :
167
+ name : rDNA-Test-Results
168
+ path : build/reports/tests
0 commit comments