Repository navigation
176 lines (137 loc) · 5.42 KB
/
Copy pathR-CMD-check-dev.yaml
File metadata and controls
176 lines (137 loc) · 5.42 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
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
168
169
170
171
172
173
174
175
176
# This workflow calls the GitHub API very frequently.
# Can't be run as part of commits
on:
schedule:
- cron: "0 5 * * *" # 05:00 UTC every day only run on main branch
push:
branches:
- "cran-*"
tags:
- "v*"
workflow_dispatch:
name: rcc dev
# Read-only by default; the jobs that need more opt back in below.
permissions:
contents: read
jobs:
matrix:
runs-on: ubuntu-26.04
timeout-minutes: 30 # longest run seen: 2 min
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
name: Collect deps
steps:
- uses: actions/checkout@v6
- name: Report the GitHub API rate limit
uses: cynkra/cynkratemplate/.github/actions/rate-limit@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: r-lib/actions/setup-r@v2
- name: Collect the dependencies into a matrix
id: set-matrix
uses: cynkra/cynkratemplate/.github/actions/dep-matrix@main
check-matrix:
runs-on: ubuntu-26.04
timeout-minutes: 15 # longest run seen: 1 min
needs: matrix
name: Check deps
steps:
- uses: actions/checkout@v6
- name: Check matrix definition
uses: cynkra/cynkratemplate/.github/actions/matrix-check@main
with:
matrix: ${{ needs.matrix.outputs.matrix }}
R-CMD-check-base:
runs-on: ubuntu-26.04
timeout-minutes: 120 # longest run seen: 46 min
name: base
outputs:
binary: ${{ steps.binary.outputs.artifact-name }}
permissions:
# Both required by the update-snapshots action, which opens a pull
# request with refreshed snapshots.
contents: write
pull-requests: write
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v6
- name: Run the repository-specific before-install steps
uses: ./.github/workflows/custom/before-install
if: hashFiles('.github/workflows/custom/before-install/action.yml') != ''
- name: Install R and the package dependencies
uses: cynkra/cynkratemplate/.github/actions/install@main
with:
cache-version: rcc-dev-base-1
needs: build, check
extra-packages: "any::rcmdcheck any::remotes"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Session info
uses: cynkra/cynkratemplate/.github/actions/session-info@main
- name: Run the repository-specific after-install steps
uses: ./.github/workflows/custom/after-install
if: hashFiles('.github/workflows/custom/after-install/action.yml') != ''
- name: Build, install and upload the binary package
id: binary
uses: cynkra/cynkratemplate/.github/actions/build-binary@main
with:
name: ubuntu-26.04-rrelease-base
- name: Update the testthat snapshots
uses: cynkra/cynkratemplate/.github/actions/update-snapshots@main
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
- name: Run R CMD check
uses: cynkra/cynkratemplate/.github/actions/check@main
with:
results: base
R-CMD-check-dev:
needs:
- matrix
- R-CMD-check-base
runs-on: ubuntu-26.04
timeout-minutes: 120 # longest run seen: 57 min
name: 'rcc-dev: ${{ matrix.package }}'
permissions:
# Both required by the update-snapshots action.
contents: write
pull-requests: write
strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v6
- name: Run the repository-specific before-install steps
uses: ./.github/workflows/custom/before-install
if: hashFiles('.github/workflows/custom/before-install/action.yml') != ''
- name: Install R and the package dependencies
uses: cynkra/cynkratemplate/.github/actions/install@main
with:
cache-version: rcc-dev-${{ matrix.package }}-1
needs: build, check
extra-packages: "any::rcmdcheck r-lib/remotes@f-618-universe"
token: ${{ secrets.GITHUB_TOKEN }}
# Same runner and R version as the base job, so its binary fits.
- name: Install the package from the base job's binary
uses: cynkra/cynkratemplate/.github/actions/install-binary@main
with:
name: ${{ needs.R-CMD-check-base.outputs.binary }}
- name: Install dev version of ${{ matrix.package }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
# r-universe builds Linux binaries for ubuntu:latest, which now tracks
# 26.04 "resolute" (it no longer publishes "noble"). This matches the
# ubuntu-26.04 runner above.
remotes::install_runiverse("${{ matrix.package }}", linux_distro = "resolute")
shell: Rscript {0}
- name: Session info
uses: cynkra/cynkratemplate/.github/actions/session-info@main
- name: Run the repository-specific after-install steps
uses: ./.github/workflows/custom/after-install
if: hashFiles('.github/workflows/custom/after-install/action.yml') != ''
- name: Update the testthat snapshots
uses: cynkra/cynkratemplate/.github/actions/update-snapshots@main
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
- name: Run R CMD check
uses: cynkra/cynkratemplate/.github/actions/check@main
with:
results: ${{ matrix.package }}