Skip to content

Commit 06fbb59

Browse files
committed
Merge branch 'master' into bench-vign
2 parents 4e4578a + 5376881 commit 06fbb59

File tree

315 files changed

+49731
-21448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

315 files changed

+49731
-21448
lines changed

.Rbuildignore

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,44 @@
1-
^\.travis\.yml$
2-
^CONTRIBUTING\.md$
3-
^ISSUE_TEMPLATE\.md$
4-
^CRAN_Release\.cmd$
5-
^deploy\.sh$
1+
.dir-locals.el
2+
^\.Rprofile$
3+
^data\.table_.*\.tar\.gz$
4+
^vignettes/plots/figures$
5+
^\.Renviron$
6+
^[^/]+\.R$
7+
^[^/]+\.csv$
8+
^[^/]+\.csvy$
9+
^[^/]+\.RDS$
10+
^[^/]+\.diff$
11+
^[^/]+\.patch$
12+
13+
^\.ci$
14+
^\.dev$
15+
^\.devcontainer$
16+
^\.graphics$
17+
^\.github$
18+
19+
^\.appveyor\.yml$
20+
^\.gitlab-ci\.yml$
21+
22+
^Makefile$
23+
^NEWS\.0\.md$
24+
^_pkgdown\.yml$
25+
^src/Makevars$
26+
^CODEOWNERS$
27+
28+
^\.RData$
29+
^\.Rhistory$
30+
631
^\.emacs\.desktop
732
^\.emacs\.desktop\.lock
833
^.*\.Rproj$
934
^\.Rproj\.user$
10-
^appveyor\.yml$
11-
^.gitlab-ci\.yml$
1235
^\.idea$
13-
^\.RData$
14-
^\.Rhistory$
15-
^data\.table_.*\.tar\.gz$
16-
^cc\.R$
17-
^ci\.R$
18-
^publish\.R$
19-
^Makefile$
20-
^NEWS.0.md$
36+
^\.libs$
37+
38+
^.*\.dll$
39+
2140
^bus$
22-
^Dockerfile$
23-
^Dockerfile\.in$
41+
^pkgdown$
42+
^lib$
43+
^library$
44+
^devwd$

appveyor.yml renamed to .appveyor.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@ skip_branch_with_pr: true
1414

1515
environment:
1616
global:
17-
CRAN: http://cloud.r-project.org/
17+
CRAN: http://cloud.r-project.org
1818
WARNINGS_ARE_ERRORS: 1
19-
R_CHECK_ARGS: --no-manual
20-
# R_CHECK_ARGS specified in order to turn off --as-cran (on by default) as that can be slow
21-
R_ARCH: x64
22-
# multiarch is on by default which runs tests on both 32bit R and 64bit R in one x64 job; i.e. very nice and convenient for all.
23-
# The default for R_ARCH is i386, though, for which multiarch would just compile and test 32bit, hence setting R_ARCH to x64
24-
GCC_PATH: mingw_64
25-
# Default GCC_PATH appears to be gcc-4.6.3 which is now unsupported as from Rtools.exe v3.4.
19+
R_CHECK_ARGS: --as-cran --no-manual
20+
# --no-manual to avoid error 'pdflatex is not available'
21+
# --as-cran no longer a lot slower (now takes under 6 mins with and without); logs show _R_CHECK_CRAN_INCOMING_=FALSE which could take 5+ mins
22+
_R_CHECK_NO_STOP_ON_TEST_ERROR_: true
23+
# continue tests even if some script failed
24+
_R_CHECK_TESTS_NLINES_: 0
25+
# Block truncation of any error messages in R CMD check
26+
# R is 64-bit only on Windows from 4.2.0 (prior default was build and test both 32bit and 64bit) so we no longer use R_ARCH to pick one to reduce CI time in PRs
2627

2728
matrix:
2829

2930
- R_VERSION: release # the single Windows.zip binary (both 32bit/64bit) that users following dev version of installation instructions should click
3031

31-
- R_VERSION: devel
32+
# - R_VERSION: devel # Never turn back on. GLCI after merge covers latest daily R-devel very well, so we shouldn't confuse and slow down PR dev cycle by measuring PRs against daily R-devel too. If a change in R-devel yesterday breaks the PR, it's very unlikely to be due to something in the PR. So we should accept the PR if it passes R-release and fix separately anything related to R-devel which we'll see from GLCI.
3233

3334
before_build:
3435
- cmd: ECHO no Revision metadata added to DESCRIPTION
@@ -41,6 +42,7 @@ build_script:
4142
- travis-tool.sh r_install xts
4243
- travis-tool.sh r_install nanotime
4344
- travis-tool.sh r_install R.utils
45+
- travis-tool.sh r_install yaml
4446

4547
test_script:
4648
- travis-tool.sh run_tests

.ci/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# data.table continuous integration and deployment
2+
3+
On each Pull Request opened in GitHub we run GitHub Actions test jobs to provide prompt feedback about the status of PR. Our main CI pipeline runs on GitLab CI nightly. GitLab repository automatically mirrors our GitHub repository and runs pipeline on `master` branch every night. It tests more environments and different configurations. It publish variety of artifacts.
4+
5+
## Environments
6+
7+
### [GitLab CI](./../.gitlab-ci.yml)
8+
9+
Test jobs:
10+
- `test-lin-rel` - `r-release` on Linux, most comprehensive test environment, force all suggests, `-O3 -flto=auto -fno-common -Wunused-result`, test for no compilation warnings.
11+
- `test-lin-rel-vanilla` - `r-release` on Linux, no suggested deps, no zlib, no OpenMP, flags `-g -O0 -fno-openmp`, skip manual and vignettes.
12+
- `test-lin-rel-cran` - `--as-cran` on Linux, strict test for final status of `R CMD check`.
13+
- `test-lin-dev-gcc-strict-cran` - `--as-cran` on Linux, `r-devel` built with `-enable-strict-barrier --disable-long-double`, test for compilation warnings, test for new NOTEs/WARNINGs from `R CMD check`.
14+
- `test-lin-dev-clang-cran` - same as `gcc-strict` job but R built with `clang` and no `--enable-strict-barrier --disable-long-double` flags.
15+
- `test-lin-310-cran` - R 3.1.0 on Linux, stated R dependency version.
16+
- `test-win-rel` - `r-release` on Windows.
17+
- `test-win-dev` - `r-devel` on Windows.
18+
- `test-win-old` - `r-oldrel` on Windows.
19+
- `test-mac-rel` - macOS build not yet available, see [#3326](https://github.com/Rdatatable/data.table/issues/3326) for status
20+
21+
Tests jobs are allowed to fail, summary and logs of test jobs are later published at _CRAN-like checks_ page, see artifacts below.
22+
23+
Artifacts:
24+
- [homepage](https://rdatatable.gitlab.io/data.table) - made with [pkgdown](https://github.com/r-lib/pkgdown)
25+
- [html manual](https://rdatatable.gitlab.io/data.table/library/data.table/html/00Index.html)
26+
- [pdf manual](https://rdatatable.gitlab.io/data.table/web/packages/data.table/data.table.pdf)
27+
- [html vignettes](https://rdatatable.gitlab.io/data.table/library/data.table/doc/index.html)
28+
- R packages repository for `data.table` and all _Suggests_ dependencies, url: `https://rdatatable.gitlab.io/data.table`
29+
- sources
30+
- Windows binaries for `r-release`, `r-devel` and `r-oldrel`
31+
- [CRAN-like homepage](https://rdatatable.gitlab.io/data.table/web/packages/data.table/index.html)
32+
- [CRAN-like checks results](https://rdatatable.gitlab.io/data.table/web/checks/check_results_data.table.html)
33+
34+
### [GitHub Actions](./../.github/workflows)
35+
36+
TODO document
37+
38+
### [Appveyor](./../.appveyor.yml)
39+
40+
TODO document
41+
42+
## CI tools
43+
44+
### [`ci.R`](./ci.R)
45+
46+
Base R implemented helper script, [originally proposed to base R](https://svn.r-project.org/R/branches/tools4pkgs/src/library/tools/R/packages.R), that ease the process of extracting dependency information from description files, and to mirror packages and their recursive dependencies from CRAN to local CRAN-like directory. It is used in [GitLab CI pipeline](./../.gitlab-ci.yml).
47+
48+
### [`publish.R`](./publish.R)
49+
50+
Base R implemented helper script to orchestrate generation of most artifacts and to arrange them nicely. It is being used only in [_integration_ stage in GitLab CI pipeline](./../.gitlab-ci.yml).

ci.R renamed to .ci/ci.R

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
## added ver argument to produce R version independent urls
66
## https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17420
77
contrib.url <-
8-
function (repos, type = getOption("pkgType"), ver)
8+
function (repos, type = getOption("pkgType"), ver)
99
{
1010
type <- utils:::resolvePkgType(type)
11-
if (is.null(repos))
11+
if (is.null(repos))
1212
return(NULL)
1313
if ("@CRAN@" %in% repos && interactive()) {
1414
cat(gettext("--- Please select a CRAN mirror for use in this session ---"), "\n", sep = "")
@@ -17,12 +17,12 @@ function (repos, type = getOption("pkgType"), ver)
1717
m <- match("@CRAN@", repos)
1818
nm <- names(repos)
1919
repos[m] <- getOption("repos")["CRAN"]
20-
if (is.null(nm))
20+
if (is.null(nm))
2121
nm <- rep("", length(repos))
2222
nm[m] <- "CRAN"
2323
names(repos) <- nm
2424
}
25-
if ("@CRAN@" %in% repos)
25+
if ("@CRAN@" %in% repos)
2626
stop("trying to use CRAN without setting a mirror")
2727
if(missing(ver)) {
2828
ver <- paste(R.version$major, strsplit(R.version$minor, ".", fixed=TRUE)[[1L]][1L], sep = ".")
@@ -37,17 +37,18 @@ function (repos, type = getOption("pkgType"), ver)
3737
res <- switch(
3838
type,
3939
source = paste(gsub("/$", "", repos), "src", "contrib", sep = "/"),
40-
mac.binary = paste(gsub("/$", "", repos), "bin", mac.path, "contrib", ver, sep = "/"),
40+
mac.binary = paste(gsub("/$", "", repos), "bin", mac.path, "contrib", ver, sep = "/"),
4141
win.binary = paste(gsub("/$", "", repos), "bin", "windows", "contrib", ver, sep = "/")
4242
)
4343
res
4444
}
4545

4646
## returns dependencies for a package based on its DESCRIPTION file
4747
dcf.dependencies <-
48-
function(file = "DESCRIPTION",
48+
function(file = "DESCRIPTION",
4949
which = NA,
50-
except.priority = "base") {
50+
except.priority = "base",
51+
exclude = NULL) {
5152
if (!is.character(file) || !length(file) || !all(file.exists(file)))
5253
stop("file argument must be character of filepath(s) to existing DESCRIPTION file(s)")
5354
if (!is.character(except.priority))
@@ -71,15 +72,21 @@ function(file = "DESCRIPTION",
7172
}, which = which), use.names = FALSE)
7273
local.extract_dependency_package_names = function (x) {
7374
## do not filter out R like tools:::.extract_dependency_package_names, used for web/$pkg/index.html
74-
if (is.na(x))
75+
if (is.na(x))
7576
return(character())
7677
x <- unlist(strsplit(x, ",[[:space:]]*"))
7778
x <- sub("[[:space:]]*([[:alnum:].]+).*", "\\1", x)
7879
x[nzchar(x)]
7980
}
8081
x <- unlist(lapply(x, local.extract_dependency_package_names))
8182
except <- if (length(except.priority)) c("R", unlist(tools:::.get_standard_package_names()[except.priority], use.names = FALSE))
82-
setdiff(x, except)
83+
x = setdiff(x, except)
84+
if (length(exclude)) { # to exclude knitr/rmarkdown, 5294
85+
if (!is.character(exclude) || anyDuplicated(exclude))
86+
stop("exclude may be NULL or a character vector containing no duplicates")
87+
x = setdiff(x, exclude)
88+
}
89+
x
8390
}
8491

8592
## returns additional repositories for dependency packages based on its DESCRIPTION file
@@ -101,13 +108,13 @@ function(file = "DESCRIPTION") {
101108
## download dependencies recursively for provided packages
102109
## put all downloaded packages into local repository
103110
mirror.packages <-
104-
function(pkgs,
105-
which = c("Depends", "Imports", "LinkingTo"),
106-
repos = getOption("repos"),
107-
type = c("source", "mac.binary", "win.binary"),
108-
repodir,
109-
except.repodir = repodir,
110-
except.priority = "base",
111+
function(pkgs,
112+
which = c("Depends", "Imports", "LinkingTo"),
113+
repos = getOption("repos"),
114+
type = c("source", "mac.binary", "win.binary"),
115+
repodir,
116+
except.repodir = repodir,
117+
except.priority = "base",
111118
method,
112119
quiet = TRUE,
113120
binary.ver,
@@ -161,7 +168,7 @@ function(pkgs,
161168
warning(sprintf("Packages binaries could not be found in provided reposistories for R version %s: %s", binary.ver, paste(newpkgs[!availpkgs], collapse = ", ")))
162169
newpkgs <- newpkgs[availpkgs]
163170
}
164-
171+
165172
pkgsext <- switch(type,
166173
"source" = "tar.gz",
167174
"mac.binary" = "tgz",
@@ -171,14 +178,10 @@ function(pkgs,
171178
unlink(dlfiles[file.exists(dlfiles)])
172179
## repos argument is not used in download.packages, only as default for contriburl argument
173180
## we provide contriburl to avoid interactive CRAN menu popup twice in mirror.packages
174-
dp <- utils::download.packages(pkgs = newpkgs, destdir = destdir,
175-
available = db, contriburl = repos.url,
181+
dp <- utils::download.packages(pkgs = newpkgs, destdir = destdir,
182+
available = db, contriburl = repos.url,
176183
type = type, method = method, quiet = quiet)
177184
tools::write_PACKAGES(dir = destdir, type = type, ...)
178185
dp
179186
}
180187

181-
## set repositories for CI tests
182-
if (as.logical(Sys.getenv("GITLAB_CI","false")) && identical(Sys.getenv("CI_PROJECT_NAME"), "data.table")) {
183-
options("repos" = if (.Platform$OS.type == "windows") file.path("file://",getwd(),"bus/mirror-packages/cran") else file.path("file:", normalizePath("bus/mirror-packages/cran", mustWork=FALSE)))
184-
}

0 commit comments

Comments
 (0)