Skip to content

Commit 2b52437

Browse files
More changes to occasional CI (#6138)
* More changes to occasional CI * R 4.1.0 lambda snuck in * Declare UTF-8 encoding in DESCRIPTION * add with_c_collate() in case it's needed, not used yet * Adapt to potential build failure
1 parent c8c35f3 commit 2b52437

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
schedule:
3-
- cron: '18 13 11 * *' # 11th of month at 13:18 UTC
3+
- cron: '17 13 18 * *' # 18th of month at 13:17 UTC
44

55
# A more complete suite of checks to run monthly; each PR/merge need not pass all these, but they should pass before CRAN release
66
name: R-CMD-check-occasional
@@ -79,7 +79,7 @@ jobs:
7979
if: matrix.os != 'windows-latest' && matrix.os != 'macOS-latest'
8080
run: |
8181
sudo apt-get update
82-
sudo apt-get install -y libcurl4-openssl-dev
82+
sudo apt-get install -y libcurl4-openssl-dev libudunits2-dev
8383
8484
- name: Query dependencies
8585
run: |
@@ -134,7 +134,9 @@ jobs:
134134
} else {
135135
Rbin = if (.Platform$OS.type == "windows") "R.exe" else "R"
136136
system2(Rbin, c("CMD", "build", "."))
137-
res = system2(Rbin, c("CMD", "check", "data.table_*.tar.gz", args), stdout=TRUE)
137+
dt_tar <- list.files(pattern = "^data[.]table_.*[.]tar[.]gz$")
138+
if (!length(dt_tar)) stop("Built tar.gz not found among: ", toString(list.files()))
139+
res = system2(Rbin, c("CMD", "check", dt_tar[1L], args), stdout=TRUE)
138140
if (!is.null(attr(res, "status")) || grep("^Status:.*(ERROR|WARNING)", res)) {
139141
writeLines(res)
140142
stop("R CMD check failed")

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ License: MPL-2.0 | file LICENSE
99
URL: https://r-datatable.com, https://Rdatatable.gitlab.io/data.table, https://github.com/Rdatatable/data.table
1010
BugReports: https://github.com/Rdatatable/data.table/issues
1111
VignetteBuilder: knitr
12+
Encoding: UTF-8
1213
ByteCompile: TRUE
1314
Authors@R: c(
1415
person("Tyson","Barrett", role=c("aut","cre"), email="[email protected]"),

inst/tests/nafill.Rraw

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ for (s in sugg) {
2121
if (!loaded) cat("\n**** Suggested package",s,"is not installed or has dependencies missing. Tests using it will be skipped.\n\n")
2222
}
2323

24+
# Ensure an operation uses C-locale sorting (#3502). For test set-ups/comparisons that use base operations, which are
25+
# susceptible to locale-specific sorting issues, but shouldn't be needed for data.table code, which always uses C sorting.
26+
# TODO(R>=3.3.0): use order(method="radix") as a way to avoid needing this helper
27+
with_c_collate = function(expr) {
28+
old = Sys.getlocale("LC_COLLATE")
29+
on.exit(Sys.setlocale("LC_COLLATE", old))
30+
Sys.setlocale("LC_COLLATE", "C")
31+
expr
32+
}
33+
2434
x = 1:10
2535
x[c(1:2, 5:6, 9:10)] = NA
2636
test(1.01, nafill(x, "locf"), INT(NA,NA,3,4,4,4,7,8,8,8))

inst/tests/tests.Rraw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18380,7 +18380,7 @@ test(2250.10, dt[1:2, paste(names(.SD), 'max', sep = '_') := lapply(.SD, max), b
1838018380
test(2250.11, dt[, names(.SD(2)) := lapply(.SD, .I)], error=base_messages$missing_function('.SD'))
1838118381

1838218382
dt = data.table(a = 1:3, b = 5:7, grp = c('a', 'a', 'b'))
18383-
test(2250.12, dt[, names(.SD) := lapply(.SD, \(x) x + b), .SDcols = "a"], data.table(a = 1:3 + 5:7, b = 5:7, grp = c('a', 'a', 'b')))
18383+
test(2250.12, dt[, names(.SD) := lapply(.SD, function(x) x + b), .SDcols = "a"], data.table(a = 1:3 + 5:7, b = 5:7, grp = c('a', 'a', 'b')))
1838418384

1838518385

1838618386
dt = data.table(a = 1L, b = 2L, c = 3L, d = 4L, e = 5L, f = 6L)

0 commit comments

Comments
 (0)