Skip to content

Commit 658f556

Browse files
Enable GitHub Actions checks
1 parent 070543a commit 658f556

File tree

3 files changed

+112
-2
lines changed

3 files changed

+112
-2
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
on: [push, pull_request]
2+
3+
name: R-CMD-check
4+
5+
jobs:
6+
R-CMD-check:
7+
if: "! contains(github.event.head_commit.message, '[ci skip]')"
8+
9+
timeout-minutes: 30
10+
11+
runs-on: ${{ matrix.config.os }}
12+
13+
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) ${{ matrix.config.label }}
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
config:
19+
- {os: windows-latest, r: 'release' }
20+
- {os: windows-latest, r: 'oldrel' }
21+
- {os: macOS-latest, r: 'release' }
22+
- {os: ubuntu-latest, r: 'devel' }
23+
- {os: ubuntu-latest, r: 'release' }
24+
- {os: ubuntu-latest, r: 'oldrel' }
25+
- {os: ubuntu-latest, r: '4.1' }
26+
27+
env:
28+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
29+
R_KEEP_PKG_SOURCE: yes
30+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
31+
## Test in other locale (optional)
32+
LANGUAGE: ${{ matrix.config.language }}
33+
## R (>= 4.4.0) Note, no trailing underscore (sic!)
34+
_R_COMPARE_LANG_OBJECTS: eqonly
35+
## R CMD check
36+
_R_CHECK_CRAN_INCOMING_: false
37+
_R_CHECK_MATRIX_DATA_: true
38+
_R_CHECK_SUGGESTS_ONLY_: true
39+
_R_CHECK_THINGS_IN_TEMP_DIR_: true
40+
_R_CHECK_TESTS_NLINES_: 300
41+
RCMDCHECK_ERROR_ON: warning
42+
## Specific to futures
43+
R_FUTURE_CONNECTIONS_ONMISUSE: "error[details=TRUE]"
44+
R_FUTURE_GLOBALENV_ONMISUSE: "error"
45+
R_FUTURE_GLOBALS_ONREFERENCE: "warning"
46+
R_FUTURE_RNG_ONMISUSE: error
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- uses: r-lib/actions/setup-pandoc@v2
52+
53+
- uses: r-lib/actions/setup-r@v2
54+
with:
55+
r-version: ${{ matrix.config.r }}
56+
http-user-agent: ${{ matrix.config.http-user-agent }}
57+
use-public-rspm: true
58+
59+
- uses: r-lib/actions/setup-r-dependencies@v2
60+
with:
61+
extra-packages: |
62+
any::rcmdcheck
63+
any::remotes
64+
needs: check
65+
66+
- name: Install package itself (special case)
67+
run: |
68+
install.packages(".", repos = NULL, type = "source") ## needed by parallel workers
69+
70+
shell: Rscript {0}
71+
72+
- name: Session info
73+
run: |
74+
options(width = 100)
75+
parallelly::availableCores(which = "all")
76+
sapply(c(physical_cores = FALSE, logical_cores = TRUE), parallel::detectCores)
77+
if (require(RhpcBLASctl, quietly=TRUE)) c(get_num_procs = get_num_procs(), get_num_cores = get_num_cores(), blas_get_num_procs = blas_get_num_procs(), omp_get_num_procs = omp_get_num_procs(), omp_get_max_threads = omp_get_max_threads())
78+
capabilities()
79+
pkgs <- installed.packages()[, "Package"]
80+
sessioninfo::session_info(pkgs, include_base = TRUE)
81+
## Verify LANGUAGE settings by generating a translatable error
82+
cat(sprintf("LANGUAGE=%s\n", sQuote(Sys.getenv("LANGUAGE"))))
83+
cat(sprintf("locales: %s\n", sQuote(Sys.getlocale())))
84+
tryCatch(log("a"), error = conditionMessage)
85+
shell: Rscript {0}
86+
87+
- name: Check
88+
if: runner.os != 'Windows'
89+
run: |
90+
rcmdcheck::rcmdcheck(
91+
args = c("--no-manual", "--as-cran"),
92+
check_dir = "check"
93+
)
94+
shell: Rscript {0}
95+
96+
- name: Check (Windows)
97+
if: runner.os == 'Windows'
98+
run: |
99+
rcmdcheck::rcmdcheck(
100+
args = c("--no-manual", "--as-cran", if (getRversion() >= "4.2.0") "--no-multiarch"),
101+
check_dir = "check"
102+
)
103+
shell: Rscript {0}
104+
105+
- name: Upload check results
106+
if: failure()
107+
uses: actions/upload-artifact@v4
108+
with:
109+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
110+
path: check

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Because of this, it is important that you only join shared P2P cluster
4545
that you trust, i.e. where you trust all the P2P user and the user who
4646
hosts it such that they do not invite non-trusted or unknown users.
4747

48-
There a mechanisms for launching P2P workers in _sandboxed_
48+
There are mechanisms for launching P2P workers in _sandboxed_
4949
environments. For instance, by running P2P workers in a sandboxed
5050
virtual machine (VM), in a sandboxed Linux container
5151
(e.g. [Apptainer], [Docker] and [Podman]), or via dedicated sandboxing

vignettes/future.p2p-10-getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Because of this, it is important that you only join shared P2P cluster
6363
that you trust, i.e. where you trust all the P2P user and the user who
6464
hosts it such that they do not invite non-trusted or unknown users.
6565

66-
There a mechanisms for launching P2P workers in _sandboxed_
66+
There are mechanisms for launching P2P workers in _sandboxed_
6767
environments. For instance, by running P2P workers in a sandboxed
6868
virtual machine (VM), in a sandboxed Linux container
6969
(e.g. [Apptainer], [Docker] and [Podman]), or via dedicated sandboxing

0 commit comments

Comments
 (0)