11on : [push, pull_request]
2-
2+
33name : R-CMD-check
44
55jobs :
@@ -19,92 +19,123 @@ jobs:
1919 - {os: windows-latest, r: 'devel' }
2020 - {os: windows-latest, r: 'release' }
2121 - {os: windows-latest, r: 'oldrel' }
22- - {os: macOS-latest, r: 'devel' }
22+ # - {os: macOS-latest, r: 'devel' }
2323 - {os: macOS-latest, r: 'release' }
2424 - {os: macOS-latest, r: 'oldrel' }
2525 - {os: ubuntu-latest, r: 'devel' }
2626 - {os: ubuntu-latest, r: 'release' }
2727 - {os: ubuntu-latest, r: 'oldrel' }
2828 - {os: ubuntu-latest, r: 'oldrel-1' }
2929 - {os: ubuntu-latest, r: 'oldrel-2' }
30- - {os: ubuntu-latest, r: '3.4 ' }
31- - {os: windows -latest, r: 'release' , prune_functions: true , label: 'prune ' }
32- - {os: macOS -latest, r: 'release' , prune_functions: true , label: 'prune ' }
33- - {os: ubuntu-latest, r: 'devel ' , prune_functions: true, label: 'prune' }
34- - {os: ubuntu-latest, r: 'release' , prune_functions: true , label: 'prune' }
35- - {os: ubuntu-latest, r: 'oldrel ' , prune_functions: true , label: 'prune' }
36-
30+ - {os: ubuntu-latest, r: '4.0 ' }
31+ - {os: ubuntu -latest, r: 'release' , availablecores: 1 , label: 'availableCores.system=1 ' }
32+ - {os: ubuntu -latest, r: 'release' , availablecores: 2 , label: 'availableCores.system=2 ' }
33+ - {os: ubuntu-latest, r: 'release ' , language: ko, label: ko }
34+ - {os: ubuntu-latest, r: 'release' , language: zh_CN , label: zh_CN }
35+ - {os: ubuntu-latest, r: 'release ' , language: zh_TW , label: zh_TW }
36+
3737 env :
3838 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
3939 R_KEEP_PKG_SOURCE : yes
4040 R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
41+ # # Test in other locale (optional)
42+ LANGUAGE : ${{ matrix.config.language }}
43+ # # R (>= 4.4.0) Note, no trailing underscore (sic!)
44+ _R_COMPARE_LANG_OBJECTS : eqonly
4145 # # R CMD check
42- RCMDCHECK_ERROR_ON : note
4346 _R_CHECK_CRAN_INCOMING_ : false
44- _R_CHECK_LENGTH_1_CONDITION_ : true
45- _R_CHECK_LENGTH_1_LOGIC2_ : true
4647 _R_CHECK_MATRIX_DATA_ : true
4748 _R_CHECK_SUGGESTS_ONLY_ : true
49+ _R_CHECK_THINGS_IN_TEMP_DIR_ : true
50+ _R_CHECK_TESTS_NLINES_ : 300
51+ RCMDCHECK_ERROR_ON : note
4852 # # Specific to futures
49- R_FUTURE_PRUNE_FUNCTIONS : ${{ matrix.config.prune_functions }}
53+ R_PARALLELLY_AVAILABLECORES_SYSTEM : ${{ matrix.config.availablecores }}
54+ R_FUTURE_RNG_ONMISUSE : error
5055 R_FUTURE_GLOBALS_KEEPWHERE : ${{ matrix.config.globals_keepWhere }}
51-
56+ R_PARALLELLY_BRANCH : ${{ matrix.config.parallelly }}
57+
5258 steps :
53- - uses : actions/checkout@v3
59+ - uses : actions/checkout@v4
5460
5561 - uses : r-lib/actions/setup-pandoc@v2
5662
57- - uses : r-lib/actions/setup-tinytex@v2
58-
59- - name : Install system dependencies (Linux)
60- if : runner.os == 'Linux'
61- run : sudo apt-get install -y tidy
62-
6363 - uses : r-lib/actions/setup-r@v2
6464 with :
6565 r-version : ${{ matrix.config.r }}
66-
66+ http-user-agent : ${{ matrix.config.http-user-agent }}
67+ use-public-rspm : true
68+
6769 - uses : r-lib/actions/setup-r-dependencies@v2
6870 with :
69- extra-packages : any::rcmdcheck, any::remotes
71+ extra-packages : |
72+ any::rcmdcheck
73+ any::remotes
7074 needs : check
7175
72- - name : Install R package dependencies (part 2 )
76+ - name : Install package itself (special case )
7377 run : |
74- install.packages(".", repos = NULL, type = "source") ## self vignette engine
75- if (isTRUE(as.logical("${{ matrix.config.prune_functions }}"))) remotes::install_github("HenrikBengtsson/future", ref="feature/environments")
78+ install.packages(".", repos = NULL, type = "source") ## needed by parallel workers
79+ pver <- Sys.getenv("R_PARALLELLY_BRANCH")
80+ if (nzchar(pver)) {
81+ remotes::install_github("futureverse/parallelly", ref = pver)
82+ }
83+
7684 shell : Rscript {0}
7785
7886 - name : Session info
7987 run : |
8088 options(width = 100)
89+ parallelly::availableCores(which = "all")
90+ sapply(c(physical_cores = FALSE, logical_cores = TRUE), parallel::detectCores)
91+ 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())
8192 capabilities()
8293 pkgs <- installed.packages()[, "Package"]
8394 sessioninfo::session_info(pkgs, include_base = TRUE)
95+ ## Verify LANGUAGE settings by generating a translatable error
96+ cat(sprintf("LANGUAGE=%s\n", sQuote(Sys.getenv("LANGUAGE"))))
97+ cat(sprintf("locales: %s\n", sQuote(Sys.getlocale())))
98+ tryCatch(log("a"), error = conditionMessage)
8499 shell : Rscript {0}
85100
86- - name : Check (!Windows)
101+ - name : Check
87102 if : runner.os != 'Windows'
103+ env :
104+ # # FIXME: Eventually update to 'R_FUTURE_GLOBALS_ONREFERENCE=error'
105+ R_FUTURE_GLOBALS_ONREFERENCE : " warning"
106+ R_FUTURE_PLAN : ${{ matrix.config.plan }}
107+ R_FUTURE_FORK_ENABLE : ${{ matrix.config.fork_enable }}
108+ R_FUTURE_FORK_MULTITHREADING_ENABLE : ${{ matrix.config.fork_multithreading_enable }}
109+ R_FUTURE_PSOCK_RELAY_IMMEDIATE : ${{ matrix.config.psock_relay_immediate }}
88110 run : |
111+ if (nzchar(Sys.getenv("R_FUTURE_PLAN")) || getRversion() < "3.5.0") Sys.setenv(RCMDCHECK_ERROR_ON = "error")
89112 rcmdcheck::rcmdcheck(
90- args = "--as-cran",
113+ build_args = if (getRversion() < "3.5.0") "--no-build-vignettes",
114+ args = c("--no-manual", "--as-cran", if (getRversion() < "3.5.0") c("--no-vignettes", "--no-build-vignettes", "--ignore-vignettes")),
91115 check_dir = "check"
92116 )
93117 shell : Rscript {0}
94-
118+
95119 - name : Check (Windows)
96120 if : runner.os == 'Windows'
97121 run : |
98- remotes::install_github("HenrikBengtsson/future", ref = "develop")
99122 rcmdcheck::rcmdcheck(
100- args = c("--no-manual", "--as-cran"),
123+ args = c(
124+ "--as-cran",
125+ if (.Platform[["OS.type"]] == "windows" ||
126+ grepl("darwin", R.version[["os"]], ignore.case = TRUE))
127+ "--no-manual",
128+ if (.Platform[["OS.type"]] == "windows" &&
129+ getRversion() >= "4.2.0")
130+ "--no-multiarch"
131+ ),
101132 check_dir = "check"
102133 )
103134 shell : Rscript {0}
104135
105136 - name : Upload check results
106137 if : failure()
107- uses : actions/upload-artifact@v3
138+ uses : actions/upload-artifact@v4
108139 with :
109140 name : ${{ runner.os }}-r${{ matrix.config.r }}-results
110141 path : check
0 commit comments