-
Notifications
You must be signed in to change notification settings - Fork 6
146 lines (126 loc) · 4.31 KB
/
R-CMD-check.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
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
schedule:
- cron: "24 06 * * 1"
push:
branches:
- main
- master
paths-ignore:
- "Meta**"
- "memcheck**"
- "docs**"
- "**.git"
- "**.json"
- "**.md"
- "**.yml"
- "!**R-CMD-check.yml"
- "**.R[dD]ata"
- "**.Rpro*"
pull_request:
branches:
- main
- master
paths-ignore:
- "Meta**"
- "memcheck**"
- "docs**"
- "**.git"
- "**.json"
- "**.md"
- "**.yml"
- "!**R-CMD-check.yml"
- "**.R[dD]ata"
- "**.Rpro*"
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: '4.1', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
env:
_R_CHECK_CRAN_INCOMING_: true # Seemingly not set by --as-cran
_R_CHECK_FORCE_SUGGESTS_: false # CRAN settings
R_COMPILE_AND_INSTALL_PACKAGES: 'never'
_R_CHECK_THINGS_IN_CHECK_DIR_: false
R_REMOTES_STANDALONE: true
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout git repo
uses: actions/checkout@v2
# https://github.com/r-lib/actions/issues/534
- name: Remove TreeDistData from DESCRIPTION - pak bug workaround
if: runner.os != 'MacOS'
run: |
sed -i "s/ TreeDistData.*/ glue,/" DESCRIPTION # glue as placeholder
- name: Remove TreeDistData from DESCRIPTION (Mac)
if: runner.os == 'MacOS'
run: |
brew install gnu-sed
gsed -i "s/ TreeDistData.*/ glue,/" DESCRIPTION # glue as placeholder
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
- name: Install apt packages (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install \
texlive-latex-base texlive-fonts-recommended libcurl4-openssl-dev
- name: pak bug workaround - install pak # https://github.com/r-lib/actions/issues/534
run: |
install.packages("pak")
install.packages("pkgdepends")
shell: Rscript {0}
- name: pak bug workaround - install TreeDist (CRAN)
if: runner.os == 'Windows'
run: pak::pkg_install("TreeDist")
shell: Rscript {0}
- name: pak bug workaround - install TreeDistData
run: pak::pkg_install("ms609/TreeDistData")
shell: Rscript {0}
- name: Set up R dependencies (Windows)
if: runner.os == 'Windows'
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
TreeDistData=?ignore-before-r=99.0.0
needs: |
check
coverage
- name: Set up R dependencies (Non-Windows)
if: runner.os != 'Windows'
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
TreeDistData=?ignore-before-r=99.0.0
phangorn=?ignore-before-r=4.1.0
needs: |
check
- name: Restore suggests-TreeDistData (Mac)
if: runner.os == 'MacOS'
run: |
gsed -i "s/ glue,/ TreeDistData,/" DESCRIPTION
- name: Restore suggests-TreeDistData (non-Mac)
if: runner.os != 'MacOS'
run: |
sed -i "s/ glue,/ TreeDistData,/" DESCRIPTION
- name: Set up pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Check package
uses: r-lib/actions/check-r-package@v2
- name: Code coverage
if: runner.os == 'Windows'
run: covr::codecov()
shell: Rscript {0}