-
Notifications
You must be signed in to change notification settings - Fork 4
167 lines (142 loc) · 5.06 KB
/
RMixtComp-eigen34.yml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: RMixtComp with Eigen 3.4
on:
push:
branches:
- master
- staging
paths:
- 'MixtComp/**'
- '!MixtComp/docs/**'
- 'RMixtComp/**'
- 'RMixtCompIO/**'
- 'RMixtCompUtilities/**'
- '.github/workflows/RMixtComp-eigen34.yml'
- '!**/README.md'
pull_request:
branches:
- master
- staging
paths:
- 'MixtComp/**'
- '!MixtComp/docs/**'
- 'RMixtComp/**'
- 'RMixtCompIO/**'
- 'RMixtCompUtilities/**'
- '.github/workflows/RMixtComp-eigen34.yml'
- '!**/README.md'
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@v2
- name: Query dependencies
run: |
install.packages('remotes')
shell: Rscript {0}
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(c(remotes::system_requirements("ubuntu", "22.04", "RMixtCompIO"), remotes::system_requirements("ubuntu", "22.04", package="curl")))')
- name: Install RMixtCompIO dependencies
working-directory: RMixtCompIO
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
install.packages("RcppEigen", repo="https://RcppCore.github.io/drat")
shell: Rscript {0}
- name: Copy MixtComp files
working-directory: RMixtCompIO
run: |
make clean
make updateLib
- name: Compile Rcpp Attributes for RMixtCompIO
working-directory: RMixtCompIO
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: Rcpp::compileAttributes()
shell: Rscript {0}
- name: Check RMixtCompIO
working-directory: RMixtCompIO
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- name: Show testthat output
working-directory: RMixtCompIO
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: RMixtCompIO/check
- name: Install local RMixtCompIO
working-directory: RMixtCompIO
run: R CMD INSTALL --no-multiarch --with-keep.source .
- name: Install RMixtCompUtilities dependencies
working-directory: RMixtCompUtilities
run: remotes::update_packages(setdiff(remotes::local_package_deps(pkgdir = ".", dependencies = TRUE), "RMixtCompIO"))
shell: Rscript {0}
- name: Check RMixtCompUtilities
working-directory: RMixtCompUtilities
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- name: Show testthat output
working-directory: RMixtCompUtilities
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: RMixtCompUtilities/check
- name: Install local RMixtCompUtilities
working-directory: RMixtCompUtilities
run: R CMD INSTALL --no-multiarch --with-keep.source .
- name: Install RMixtComp dependencies
working-directory: RMixtComp
run: remotes::update_packages(setdiff(remotes::local_package_deps(pkgdir = ".", dependencies = TRUE), c("RMixtCompIO", "RMixtCompUtilities")))
shell: Rscript {0}
- name: Check RMixtComp
working-directory: RMixtComp
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- name: Show testthat output
working-directory: RMixtComp
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: RMixtComp/check