forked from duckdb/duckdb-r
-
Notifications
You must be signed in to change notification settings - Fork 0
161 lines (133 loc) · 5.72 KB
/
Copy pathrevdep.yaml
File metadata and controls
161 lines (133 loc) · 5.72 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
# This workflow creates many jobs, run only when a branch is created
on:
push:
branches:
- "revdep*" # never run automatically on main branch
name: revdep
permissions:
contents: read
jobs:
matrix:
runs-on: ubuntu-26.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
name: Collect revdeps
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: https://packagemanager.posit.co/cran/__linux__/resolute/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# prevent rgl issues because no X11 display is available
RGL_USE_NULL: true
steps:
- name: Check rate limits
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -s --header "authorization: Bearer ${GH_TOKEN}" https://api.github.com/rate_limit
shell: bash
- uses: actions/checkout@v6
# FIXME: Avoid reissuing successful jobs
# https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#list-jobs-for-a-workflow-run
# https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#workflow-runs
- name: Collect the reverse dependencies
id: set-matrix
uses: cynkra/cynkratemplate/.github/actions/revdep-collect-deps@main
check-matrix:
runs-on: ubuntu-26.04
needs: matrix
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:
needs: matrix
runs-on: ubuntu-26.04
name: 'revdep: ${{ matrix.package }}'
strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: https://packagemanager.posit.co/cran/__linux__/resolute/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# prevent rgl issues because no X11 display is available
RGL_USE_NULL: true
steps:
- name: Check rate limits before checking
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -s --header "authorization: Bearer ${GH_TOKEN}" https://api.github.com/rate_limit
shell: bash
- uses: actions/checkout@v6
- name: Use RSPM
run: |
mkdir -p /home/runner/work/_temp/Library
echo 'local({release <- system2("lsb_release", "-sc", stdout = TRUE); options(repos=c(CRAN = paste0("https://packagemanager.posit.co/all/__linux__/", release, "/latest")), HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version$platform, R.version$arch, R.version$os)))}); .libPaths("/home/runner/work/_temp/Library")' | sudo tee /etc/R/Rprofile.site
- name: Install remotes
run: |
if (!requireNamespace("curl", quietly = TRUE)) install.packages("curl")
if (!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes")
shell: Rscript {0}
- uses: r-lib/actions/setup-pandoc@v2
- name: Close the log group that setup-pandoc leaves open
# See `.github/actions/install/action.yml` for why this is needed.
# Fixed upstream by https://github.com/r-lib/actions/pull/1103.
if: runner.os == 'Linux'
run: |
echo "::endgroup::"
shell: bash
- name: Install system dependencies
if: runner.os == 'Linux'
# The runner is ubuntu-26.04, but remotes::system_requirements() hardcodes
# its supported list up to ubuntu-24.04 (r-lib/remotes, R/system_requirements.R;
# no tracking issue yet -- one should be filed). The rstudio/r-system-requirements
# catalog itself already covers 26.04, and apt package names are stable across
# LTS releases, so the 24.04 mappings install correctly on 26.04.
run: |
sudo apt-get update -y
Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "24.04")); package <- "${{ matrix.package }}"; deps <- tools::package_dependencies(package, which = "Suggests")[[1]]; lapply(c(package, deps), function(x) { writeLines(remotes::system_requirements("ubuntu", "24.04", package = x)) })' | sort | uniq > .github/deps.sh
cat .github/deps.sh
sudo sh < .github/deps.sh
- name: Install package
run: |
package <- "${{ matrix.package }}"
install.packages(package, dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
- name: Session info old
uses: cynkra/cynkratemplate/.github/actions/session-info@main
- name: Check old
# Avoid downloading binary package from RSPM
uses: cynkra/cynkratemplate/.github/actions/revdep-check-old@main
with:
package: ${{ matrix.package }}
- name: Install local package
run: |
remotes::install_local(".", force = TRUE)
shell: Rscript {0}
- name: Session info new
uses: cynkra/cynkratemplate/.github/actions/session-info@main
- name: Check new
uses: cynkra/cynkratemplate/.github/actions/revdep-check-new@main
with:
package: ${{ matrix.package }}
- name: Compare
uses: cynkra/cynkratemplate/.github/actions/revdep-compare@main
with:
package: ${{ matrix.package }}
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.package }}-results
path: revdep/${{ matrix.package }}
- name: Check rate limits after checking
if: always()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -s --header "authorization: Bearer ${GH_TOKEN}" https://api.github.com/rate_limit
shell: bash