11on : [push, pull_request]
2-
2+
33name : R-CMD-check
44
55jobs :
66 R-CMD-check :
77 if : " ! contains(github.event.head_commit.message, '[ci skip]')"
88
9- timeout-minutes : 15
9+ timeout-minutes : 30
1010
1111 runs-on : ${{ matrix.config.os }}
1212
@@ -16,22 +16,35 @@ jobs:
1616 fail-fast : false
1717 matrix :
1818 config :
19- # - {os: windows-latest, r: 'release' }
20- # - {os: macOS-latest, r: 'release' }
21- - {os: ubuntu-latest, r: 'devel' }
22- # - {os: ubuntu-latest, r: 'release' }
23-
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+
2427 env :
2528 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
26- RSPM : https://packagemanager.rstudio.com/cran/__linux__/jammy/latest
29+ R_KEEP_PKG_SOURCE : yes
2730 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
2835 # # R CMD check
2936 _R_CHECK_CRAN_INCOMING_ : false
30- _R_CHECK_LENGTH_1_CONDITION_ : true
31- _R_CHECK_LENGTH_1_LOGIC2_ : true
3237 _R_CHECK_MATRIX_DATA_ : true
3338 _R_CHECK_SUGGESTS_ONLY_ : true
34-
39+ _R_CHECK_THINGS_IN_TEMP_DIR_ : true
40+ _R_CHECK_TESTS_NLINES_ : 300
41+ RCMDCHECK_ERROR_ON : note
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+
3548 steps :
3649 - uses : actions/checkout@v4
3750
@@ -40,59 +53,59 @@ jobs:
4053 - uses : r-lib/actions/setup-r@v2
4154 with :
4255 r-version : ${{ matrix.config.r }}
43-
44- - name : Query R package dependencies
45- run : |
46- install.packages('remotes')
47- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48- writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
49- shell : Rscript {0}
50-
51- - name : Cache R packages
52- if : runner.os != 'Windows'
53- uses : actions/cache@v1
56+ http-user-agent : ${{ matrix.config.http-user-agent }}
57+ use-public-rspm : true
58+
59+ - uses : r-lib/actions/setup-r-dependencies@v2
5460 with :
55- path : ${{ env.R_LIBS_USER }}
56- key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57- restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
61+ extra-packages : |
62+ any::rcmdcheck
63+ any::remotes
64+ needs : check
5865
59- - name : Install R package system dependencies (Linux)
60- if : runner.os == 'Linux'
61- env :
62- RHUB_PLATFORM : linux-x86_64-ubuntu-gcc
66+ - name : Install package itself (special case)
6367 run : |
64- Rscript -e "remotes::install_github('r-hub/sysreqs')"
65- sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
66- sudo -s eval "$sysreqs"
67- sudo apt install -y libcurl4-openssl-dev
68-
69- - name : Install R package dependencies
70- run : |
71- remotes::install_deps(dependencies = TRUE)
72- install.packages(".", repos = NULL, type = "source") ## self vignette engine
73- shell : Rscript {0}
74-
75- - name : Install 'rcmdcheck'
76- run : |
77- remotes::install_cran("rcmdcheck")
78- library(rcmdcheck) ## triggers an error, if installation failed
68+ install.packages(".", repos = NULL, type = "source") ## needed by parallel workers
69+ remotes::install_github("futureverse/doFuture", ref = "develop")
70+
7971 shell : Rscript {0}
8072
8173 - name : Session info
8274 run : |
8375 options(width = 100)
76+ parallelly::availableCores(which = "all")
77+ sapply(c(physical_cores = FALSE, logical_cores = TRUE), parallel::detectCores)
78+ 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())
8479 capabilities()
8580 pkgs <- installed.packages()[, "Package"]
8681 sessioninfo::session_info(pkgs, include_base = TRUE)
82+ ## Verify LANGUAGE settings by generating a translatable error
83+ cat(sprintf("LANGUAGE=%s\n", sQuote(Sys.getenv("LANGUAGE"))))
84+ cat(sprintf("locales: %s\n", sQuote(Sys.getlocale())))
85+ tryCatch(log("a"), error = conditionMessage)
8786 shell : Rscript {0}
8887
8988 - name : Check
90- run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", if (.Platform$OS.type == "windows" && getRversion() >= "4.2.0") "--no-multiarch"), error_on = "warning", check_dir = "check")
89+ if : runner.os != 'Windows'
90+ run : |
91+ rcmdcheck::rcmdcheck(
92+ args = c("--no-manual", "--as-cran"),
93+ check_dir = "check"
94+ )
95+ shell : Rscript {0}
96+
97+ - name : Check (Windows)
98+ if : runner.os == 'Windows'
99+ run : |
100+ rcmdcheck::rcmdcheck(
101+ args = c("--no-manual", "--as-cran", if (getRversion() >= "4.2.0") "--no-multiarch"),
102+ check_dir = "check"
103+ )
91104 shell : Rscript {0}
92105
93106 - name : Upload check results
94107 if : failure()
95- uses : actions/upload-artifact@v2
108+ uses : actions/upload-artifact@v4
96109 with :
97110 name : ${{ runner.os }}-r${{ matrix.config.r }}-results
98111 path : check
0 commit comments