diff --git a/.ci/README.md b/.ci/README.md
index 7b8ea3d2a9..72568fd844 100644
--- a/.ci/README.md
+++ b/.ci/README.md
@@ -16,6 +16,7 @@ Test jobs:
- `test-350-cran-lin` - R 3.5.0 on Linux, no `r-recommended`
- `test-rel-win` - `r-release` on Windows
- `test-dev-win` - `r-devel` on Windows
+- `test-old-win` - `r-oldrel` on Windows
- `test-rel-osx` - MacOSX build not yet deployed, see [#3326](https://github.com/Rdatatable/data.table/issues/3326) for status
Artifacts:
@@ -25,7 +26,7 @@ Artifacts:
- [html vignettes](https://rdatatable.gitlab.io/data.table/library/data.table/doc/index.html)
- R packages repository for `data.table` and all _Suggests_ dependencies, url: `https://Rdatatable.gitlab.io/data.table`
- sources
- - Windows binaries for `r-release` and `r-devel`
+ - Windows binaries for `r-release`, `r-devel` and `r-oldrel`
- [CRAN-like homepage](https://rdatatable.gitlab.io/data.table/web/packages/data.table/index.html)
- [CRAN-like checks results](https://rdatatable.gitlab.io/data.table/web/checks/check_results_data.table.html) - note that all artifacts, including check results page, are being published only when all test jobs successfully pass, thus one will not see an _ERROR_ status there (unless error happened on a job marked as `allow_failure`).
- [docker images](https://gitlab.com/Rdatatable/data.table/container_registry) - copy/paste-able `docker pull` commands can be found at the bottom of our [CRAN-like homepage](https://rdatatable.gitlab.io/data.table/web/packages/data.table/index.html)
diff --git a/.ci/publish.R b/.ci/publish.R
index fd95947ed4..526d9bd80d 100644
--- a/.ci/publish.R
+++ b/.ci/publish.R
@@ -1,12 +1,17 @@
format.deps <- function(file, which) {
deps.raw = read.dcf(file, fields=which)[[1L]]
if (all(is.na(deps.raw))) return(character())
+ deps.raw = gsub("\n", " ", deps.raw, fixed=TRUE)
deps.full = trimws(strsplit(deps.raw, ", ", fixed=TRUE)[[1L]])
deps = trimws(sapply(strsplit(deps.full, "(", fixed=TRUE), `[[`, 1L))
+ deps.full = gsub(">=", "≥", deps.full, fixed=TRUE)
+ deps.full = gsub("<=", "≤", deps.full, fixed=TRUE)
+ if (any(grepl(">", deps.full, fixed=TRUE), grepl("<", deps.full, fixed=TRUE), grepl("=", deps.full, fixed=TRUE)))
+ stop("formatting dependencies version for CRAN-line package website failed because some dependencies have version defined using operators other than >= and <=")
names(deps.full) <- deps
base.deps = c("R", unlist(tools:::.get_standard_package_names(), use.names = FALSE))
ans = sapply(deps, function(x) {
- if (x %in% base.deps) deps.full[[x]]
+ if (x %in% base.deps) deps.full[[x]] ## base R packages are not linked
else sprintf("%s ", x, deps.full[[x]])
})
sprintf("
%s: %s ", which, paste(ans, collapse=", "))
@@ -26,6 +31,39 @@ format.bins <- function(ver, bin_ver, cran.home, os.type, pkg, version, repodir)
paste(ans[fe], collapse=", ")
}
+format.entry <- function(field, dcf, url=FALSE) {
+ if (field %in% colnames(dcf)) {
+ value = gsub("\n", " ", dcf[,field], fixed=TRUE)
+ if (url) {
+ urls = trimws(strsplit(value, ",", fixed=TRUE)[[1L]])
+ value = paste(sprintf("%s ", urls, urls), collapse=", ")
+ }
+ sprintf("%s: %s ", field, value)
+ }
+}
+format.maintainer <- function(dcf) {
+ if ("Maintainer" %in% colnames(dcf)) {
+ text2html = function(x) {
+ # https://stackoverflow.com/a/64446320/2490497
+ splitted <- strsplit(x, "")[[1L]]
+ intvalues <- as.hexmode(utf8ToInt(enc2utf8(x)))
+ paste(paste0("", intvalues, ";"), collapse = "")
+ }
+ tmp = gsub("@", " at ", dcf[,"Maintainer"], fixed=TRUE)
+ sep = regexpr("<", tmp, fixed=TRUE)
+ name = trimws(substr(tmp, 1L, sep-1L))
+ mail = text2html(trimws(substr(tmp, sep, nchar(tmp))))
+ sprintf("Maintainer: %s %s ", name, mail)
+ }
+}
+format.materials <- function() {
+ return(NULL) ## TODO
+ value = NA
+ #NEWS
+ #README
+ sprintf("Materials: %s ", value)
+}
+
package.index <- function(package, lib.loc, repodir="bus/integration/cran") {
file = system.file("DESCRIPTION", package=package, lib.loc=lib.loc)
dcf = read.dcf(file)
@@ -40,21 +78,31 @@ package.index <- function(package, lib.loc, repodir="bus/integration/cran") {
format.deps(file, "LinkingTo"),
format.deps(file, "Suggests"),
format.deps(file, "Enhances"),
+ if ("Built" %in% colnames(dcf)) sprintf("Built: %s ", substr(trimws(strsplit(dcf[,"Built"], ";", fixed=TRUE)[[1L]][[3L]]), 1L, 10L)),
+ if ("Author" %in% colnames(dcf)) sprintf("Author: %s ", dcf[,"Author"]),
+ format.maintainer(dcf),
+ format.entry("BugReports", dcf, url=TRUE),
+ format.entry("License", dcf),
+ format.entry("URL", dcf, url=TRUE),
+ format.entry("NeedsCompilation", dcf),
+ format.entry("SystemRequirements", dcf),
+ format.materials(), ## TODO
if (pkg=="data.table") sprintf("Checks: %s results ", pkg, pkg)
)
vign = tools::getVignetteInfo(pkg, lib.loc=lib.loc)
- r_bin_ver = Sys.getenv("R_BIN_VERSION")
- r_devel_bin_ver = Sys.getenv("R_DEVEL_BIN_VERSION")
- stopifnot(nzchar(r_bin_ver), nzchar(r_devel_bin_ver))
+ r_rel_ver = Sys.getenv("R_REL_VERSION")
+ r_devel_ver = Sys.getenv("R_DEVEL_VERSION")
+ r_oldrel_ver = Sys.getenv("R_OLDREL_VERSION")
+ stopifnot(nzchar(r_rel_ver), nzchar(r_devel_ver), nzchar(r_oldrel_ver))
cran.home = "../../.."
tbl.dl = c(
sprintf(" Reference manual: %s.pdf , 00Index.html ", pkg, pkg, cran.home, pkg),
if (nrow(vign)) sprintf("Vignettes: %s ", paste(sprintf("%s ", cran.home, vign[,"PDF"], vign[,"Title"]), collapse="\n")), # location unline cran web/pkg/vignettes to not duplicate content, documentation is in ../../../library
sprintf(" Package source: %s_%s.tar.gz ", cran.home,pkg, version, pkg, version),
- sprintf(" Windows binaries: %s ", format.bins(ver=c("r-devel","r-release"), bin_ver=c(r_devel_bin_ver,r_bin_ver), cran.home=cran.home, os.type="windows", pkg=pkg, version=version, repodir=repodir)),
- sprintf(" OS X binaries: %s ", format.bins(ver=c("r-devel","r-release"), bin_ver=c(r_devel_bin_ver, r_bin_ver), cran.home=cran.home, os.type="macosx", pkg=pkg, version=version, repodir=repodir))
+ sprintf(" Windows binaries: %s ", format.bins(ver=c("r-devel","r-release","r-oldrel"), bin_ver=c(r_devel_ver, r_rel_ver, r_oldrel_ver), cran.home=cran.home, os.type="windows", pkg=pkg, version=version, repodir=repodir)),
+ sprintf(" macOS binaries: %s ", format.bins(ver=c("r-release","r-oldrel"), bin_ver=c(r_rel_ver, r_oldrel_ver), cran.home=cran.home, os.type="macosx", pkg=pkg, version=version, repodir=repodir))
)
- if (pkg=="data.table") {
+ if (pkg=="data.table") { ## docker images
registry = Sys.getenv("CI_REGISTRY", "registry.gitlab.com")
namespace = Sys.getenv("CI_PROJECT_NAMESPACE", "Rdatatable")
project = Sys.getenv("CI_PROJECT_NAME", "data.table")
@@ -74,7 +122,7 @@ package.index <- function(package, lib.loc, repodir="bus/integration/cran") {
"",
"",
"",
- sprintf("%s ", dcf[,"Title"]),
+ sprintf("%s: %s ", pkg, dcf[,"Title"]),
sprintf("%s
", dcf[,"Description"]),
sprintf("", pkg),
tbl,
@@ -117,7 +165,48 @@ doc.copy <- function(repodir="bus/integration/cran"){
c(ans1, ans2)
}
-plat <- function(x) if (grepl("^.*win", x)) "Windows" else if (grepl("^.*osx", x)) "Mac OS X" else "Linux"
+plat <- function(x) if (grepl("^.*win", x)) "Windows" else if (grepl("^.*mac", x)) "macOS" else "Linux"
+
+r.ver <- function(x) {
+ tmp = strsplit(x, "-", fixed=TRUE)[[1L]]
+ if (length(tmp) < 2L) stop("test job names must be test-[r.version]-...")
+ v = tmp[2L]
+ if (identical(v, "rel")) "r-release"
+ else if (identical(v, "dev")) "r-devel"
+ else if (identical(v, "old")) "r-oldrel"
+ else {
+ if (grepl("\\D", v)) stop("second word in test job name must be rel/dev/old or numbers of R version")
+ paste0("r-", paste(strsplit(v, "")[[1L]], collapse="."))
+ }
+}
+
+# this for now is constant but when we move to independent pipelines (commit, daily, weekly) those values can be different
+pkg.version <- function(job, pkg) {
+ dcf = read.dcf(file.path("bus", job, paste(pkg, "Rcheck", sep="."), pkg, "DESCRIPTION"))
+ dcf[,"Version"]
+}
+pkg.revision <- function(job, pkg) {
+ dcf = read.dcf(file.path("bus", job, paste(pkg, "Rcheck", sep="."), pkg, "DESCRIPTION"))
+ if ("Revision" %in% colnames(dcf)) {
+ proj.url = Sys.getenv("CI_PROJECT_URL", "")
+ if (!nzchar(proj.url)) {
+ warning("pkg.revision was designed to be run on GLCI where CI_PROJECT_URL var is set, links to commits will not be produced for checks table")
+ substr(dcf[,"Revision"], 1, 7)
+ } else {
+ sprintf("%s ", file.path(proj.url, "-", "commit", dcf[,"Revision"]), substr(dcf[,"Revision"], 1, 7))
+ }
+ } else ""
+}
+pkg.flags <- function(job, pkg) {
+ cc = file.path("bus", job, paste(pkg, "Rcheck", sep="."), pkg, "cc") ## data.table style cc file
+ if (file.exists(cc)) {
+ d = readLines(cc)
+ w.cflags = substr(d, 1, 7)=="CFLAGS="
+ if (sum(w.cflags)==1L)
+ return(sub("CFLAGS=", "", d[w.cflags], fixed=TRUE))
+ }
+ ""
+}
check.copy <- function(job, repodir="bus/integration/cran"){
dir.create(job.checks<-file.path(repodir, "web", "checks", pkg<-"data.table", job), recursive=TRUE);
@@ -146,6 +235,39 @@ check.copy <- function(job, repodir="bus/integration/cran"){
setNames(file.exists(file.path(job.checks, c(inst.check, routs))), c(inst.check, routs))
}
+check.flavors <- function(jobs, repodir="bus/integration/cran") {
+ th = "Flavor R Version OS Type CPU Type OS Info CPU Info Compilers "
+ tbl = sprintf(
+ "%s %s %s %s %s %s %s ",
+ sub("test-", "", jobs, fixed=TRUE),
+ sapply(jobs, r.ver),
+ sapply(jobs, plat),
+ "", # "x86_64"
+ "", # "Debian GNU/Linux testing"
+ "", # "2x 8-core Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz"
+ "" # "GCC 10.2.0 (Debian 10.2.0-13)"
+ )
+ file = file.path(repodir, "web/checks", "check_flavors.html")
+ writeLines(c(
+ "",
+ "",
+ "Package Check Flavors ",
+ " ",
+ " ",
+ "",
+ "",
+ "Package Check Flavors ",
+ sprintf("Last updated on %s.
", format(Sys.time(), usetz=TRUE)),
+ "",
+ "",th," ",
+ tbl,
+ "
",
+ "",
+ ""
+ ), file)
+ setNames(file.exists(file), file)
+}
+
check.index <- function(pkg, jobs, repodir="bus/integration/cran") {
status = function(x) if (grepl("^.*ERROR", x)) "ERROR" else if (grepl("^.*WARNING", x)) "WARNING" else if (grepl("^.*NOTE", x)) "NOTE" else if (grepl("^.*OK", x)) "OK" else NA_character_
test.files = function(job, files, trim.name=FALSE, trim.exts=0L, pkg="data.table") {
@@ -186,30 +308,36 @@ check.index <- function(pkg, jobs, repodir="bus/integration/cran") {
}
memouts
})
- tbl = sprintf("%s %s out %s %s %s ",
- sub("test-", "", jobs, fixed=TRUE),
- sapply(jobs, plat),
- pkg, jobs,
- pkg, jobs, sapply(sapply(jobs, check.test, pkg="data.table"), status),
- mapply(test.files, jobs, routs, trim.exts=2L), # 1st fail, 2nd Rout, keep just: tests_x64/main
- mapply(test.files, jobs, memouts, trim.name=TRUE))
+ th = "Flavor Version Revision Install Status Flags Rout.fail Memtest "
+ tbl = sprintf(
+ "%s %s %s out %s %s %s %s ",
+ sub("test-", "", jobs, fixed=TRUE),
+ sapply(jobs, pkg.version, pkg),
+ sapply(jobs, pkg.revision, pkg),
+ pkg, jobs, ## install
+ pkg, jobs, sapply(sapply(jobs, check.test, pkg="data.table"), status), ## check
+ sapply(jobs, pkg.flags, pkg),
+ mapply(test.files, jobs, routs, trim.exts=2L), # 1st fail, 2nd Rout, keep just: tests_x64/main
+ mapply(test.files, jobs, memouts, trim.name=TRUE)
+ )
file = file.path(repodir, "web/checks", sprintf("check_results_%s.html", pkg))
- writeLines(c("",
- "",
- sprintf("Package Check Results for Package %s ", pkg),
- " ",
- " ",
- "",
- "",
- sprintf("Package Check Results for Package %s ", pkg, pkg),
- sprintf("Last updated on %s.
", format(Sys.time(), usetz=TRUE)),
- sprintf("", pkg),
- "Test job OS type Install Check Rout.fail Memtest ",
- tbl,
- "
",
- "",
- ""),
- file)
+ writeLines(c(
+ "",
+ "",
+ sprintf("Package Check Results for Package %s ", pkg),
+ " ",
+ " ",
+ "",
+ "",
+ sprintf("Package Check Results for Package %s ", pkg, pkg),
+ sprintf("Last updated on %s.
", format(Sys.time(), usetz=TRUE)),
+ sprintf("", pkg),
+ "",th," ",
+ tbl,
+ "
",
+ "",
+ ""
+ ), file)
setNames(file.exists(file), file)
}
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9a5b4845f8..02b1471f52 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,9 @@ variables:
TZ: "UTC" ## to avoid 'Failed to create bus connection' from timedatectl via Sys.timezone() on Docker with R 3.4.
## Setting TZ for all GLCI jobs to isolate them from timezone. We could have a new GLCI job to test under
## a non-UTC timezone, although, that's what we do routinely in dev.
+ R_REL_VERSION: "4.0"
+ R_DEVEL_VERSION: "4.1"
+ R_OLDREL_VERSION: "3.6"
stages:
- dependencies
@@ -16,12 +19,12 @@ stages:
.artifacts-template: &artifacts
artifacts:
- expire_in: 4 weeks
+ expire_in: 2 weeks
when: always
paths:
- bus
-mirror-packages: ## mirror all recursive dependencies, source and win.binary, of data.table suggests and integration suggests from inst/tests/tests-DESCRIPTION
+mirror-packages: ## mirror all recursive dependencies, source and win.binary of data.table suggests from inst/tests/tests-DESCRIPTION
stage: dependencies
tags:
- linux
@@ -29,15 +32,26 @@ mirror-packages: ## mirror all recursive dependencies, source and win.binary, of
cache:
paths:
- bus/$CI_BUILD_NAME/cran
- variables:
- R_BIN_VERSION: "4.0"
- R_DEVEL_BIN_VERSION: "4.1"
script:
- echo 'source(".ci/ci.R")' >> .Rprofile
- mkdir -p bus/$CI_BUILD_NAME/cran/src/contrib
- - Rscript -e 'mirror.packages(dcf.dependencies(c("DESCRIPTION","inst/tests/tests-DESCRIPTION"), "all"), repos=c(Sys.getenv("CRAN_MIRROR"), dcf.repos("inst/tests/tests-DESCRIPTION")), repodir="bus/mirror-packages/cran")'
+ - Rscript -e 'mirror.packages(dcf.dependencies("DESCRIPTION", "all"), repos=Sys.getenv("CRAN_MIRROR"), repodir="bus/mirror-packages/cran")'
- rm bus/$CI_BUILD_NAME/cran/src/contrib/PACKAGES.rds ## fallback to PACKAGES dcf so available.packages:3.4.4 works
- - Rscript -e 'sapply(simplify=FALSE, setNames(nm=Sys.getenv(c("R_BIN_VERSION","R_DEVEL_BIN_VERSION"))), function(binary.ver) mirror.packages(type="win.binary", dcf.dependencies("DESCRIPTION", "all"), repos=Sys.getenv("CRAN_MIRROR"), repodir="bus/mirror-packages/cran", binary.ver=binary.ver))'
+ - Rscript -e 'sapply(simplify=FALSE, setNames(nm=Sys.getenv(c("R_REL_VERSION","R_DEVEL_VERSION","R_OLDREL_VERSION"))), function(binary.ver) mirror.packages(type="win.binary", dcf.dependencies("DESCRIPTION", "all"), repos=Sys.getenv("CRAN_MIRROR"), repodir="bus/mirror-packages/cran", binary.ver=binary.ver))'
+ <<: *artifacts
+
+mirror-other-packages: ## mirror integration suggests from inst/tests/tests-DESCRIPTION
+ stage: dependencies
+ tags:
+ - linux
+ image: registry.gitlab.com/jangorecki/dockerfiles/r-base-dev
+ cache:
+ paths:
+ - bus/$CI_BUILD_NAME/cran
+ script:
+ - echo 'source(".ci/ci.R")' >> .Rprofile
+ - mkdir -p bus/$CI_BUILD_NAME/cran/src/contrib
+ - Rscript -e 'mirror.packages(dcf.dependencies("inst/tests/tests-DESCRIPTION", "all"), repos=c(Sys.getenv("CRAN_MIRROR"), dcf.repos("inst/tests/tests-DESCRIPTION")), repodir="bus/mirror-other-packages/cran")'
<<: *artifacts
build: ## build data.table sources as tar.gz archive
@@ -45,8 +59,7 @@ build: ## build data.table sources as tar.gz archive
tags:
- linux
image: registry.gitlab.com/jangorecki/dockerfiles/r-builder
- dependencies:
- - mirror-packages
+ needs: ["mirror-packages"]
before_script:
- Rscript -e 'install.packages("knitr", repos=file.path("file:",normalizePath("bus/mirror-packages/cran")), quiet=TRUE)'
- rm -r bus
@@ -80,20 +93,23 @@ build: ## build data.table sources as tar.gz archive
- rm.exe $(ls.exe -1t data.table_*.tar.gz | head.exe -n 1)
.test-mv-bin-win: &mv-bin-win
- - mkdir.exe -p cran/bin/windows/contrib/$R_BIN_VERSION; mv.exe $(ls.exe -1t data.table_*.zip | head.exe -n 1) cran/bin/windows/contrib/$R_BIN_VERSION
+ - mkdir.exe -p cran/bin/windows/contrib/$R_VERSION; mv.exe $(ls.exe -1t data.table_*.zip | head.exe -n 1) cran/bin/windows/contrib/$R_VERSION
.test-install-r-rel-win: &install-r-rel-win
- - curl.exe -s -o ../R-win.exe https://cloud.r-project.org/bin/windows/base/old/4.0.0/R-4.0.0-win.exe; Start-Process -FilePath ..\R-win.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
-.test-install-r-dev-win: &install-r-dev-win
+ - curl.exe -s -o ../R-rel.exe https://cloud.r-project.org/bin/windows/base/old/4.0.3/R-4.0.3-win.exe; Start-Process -FilePath ..\R-rel.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
+.test-install-r-devel-win: &install-r-devel-win
- curl.exe -s -o ../R-devel.exe https://cloud.r-project.org/bin/windows/base/R-devel-win.exe; Start-Process -FilePath ..\R-devel.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
+.test-install-r-oldrel-win: &install-r-oldrel-win
+ - curl.exe -s -o ../R-oldrel.exe https://cloud.r-project.org/bin/windows/base/old/3.6.3/R-3.6.3-win.exe; Start-Process -FilePath ..\R-oldrel.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
+
.test-install-rtools-win: &install-rtools-win
- curl.exe -s -o ../rtools.exe https://cloud.r-project.org/bin/windows/Rtools/rtools40-x86_64.exe; Start-Process -FilePath ..\rtools.exe -ArgumentList "/VERYSILENT /DIR=C:\rtools40" -NoNewWindow -Wait
+.test-install-rtools35-win: &install-rtools35-win
+ - curl.exe -s -o ../Rtools35.exe https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe; Start-Process -FilePath ..\Rtools35.exe -ArgumentList "/VERYSILENT /DIR=C:\Rtools" -NoNewWindow -Wait
.test-template: &test
stage: test
- dependencies:
- - mirror-packages
- - build
+ needs: ["mirror-packages","build"]
<<: *artifacts
.test-lin-template: &test-lin
@@ -122,14 +138,15 @@ build: ## build data.table sources as tar.gz archive
- windows
- shared-windows
-.test-osx-template: &test-osx
- <<: *test
- tags:
- - macosx
+#.test-mac-template: &test-mac
+# <<: *test
+# tags:
+# - macosx
test-rel-lin: ## most comprehensive tests, force all suggests, also integration tests, using gcc -O3 -flto -fno-common -Wunused-result
<<: *test-lin
image: registry.gitlab.com/jangorecki/dockerfiles/r-builder
+ needs: ["mirror-packages","mirror-other-packages","build"]
variables:
_R_CHECK_CRAN_INCOMING_: "FALSE"
_R_CHECK_CRAN_INCOMING_REMOTE_: "FALSE"
@@ -138,7 +155,7 @@ test-rel-lin: ## most comprehensive tests, force all suggests, also integration
OPENBLAS_MAIN_FREE: "1"
TEST_DATA_TABLE_WITH_OTHER_PACKAGES: "TRUE"
before_script:
- - Rscript -e 'source(".ci/ci.R"); install.packages(dcf.dependencies(c("DESCRIPTION","inst/tests/tests-DESCRIPTION"), which="all"), quiet=TRUE)'
+ - Rscript -e 'source(".ci/ci.R"); install.packages(dcf.dependencies(c("DESCRIPTION","inst/tests/tests-DESCRIPTION"), which="all"), quiet=TRUE, repos=c(getOption("repos"), file.path("file:", normalizePath("bus/mirror-other-packages/cran", mustWork=FALSE))))'
- *cp-src
- rm -r bus
- mkdir -p ~/.R
@@ -225,7 +242,7 @@ test-350-cran-lin: ## R-3.5.0 on Linux, first R altrep version
test-rel-win: ## R-release on Windows, test and build binaries
<<: *test-win
variables:
- R_BIN_VERSION: "4.0"
+ R_VERSION: "$R_REL_VERSION"
before_script:
- *install-r-rel-win
- *install-rtools-win
@@ -244,9 +261,9 @@ test-rel-win: ## R-release on Windows, test and build binaries
test-dev-win: ## R-devel on Windows
<<: *test-win
variables:
- R_BIN_VERSION: "4.1"
+ R_VERSION: "$R_DEVEL_VERSION"
before_script:
- - *install-r-dev-win
+ - *install-r-devel-win
- *install-rtools-win
- $ENV:PATH = "C:\R\bin;C:\rtools40\usr\bin;$ENV:PATH"
- *install-deps-win
@@ -260,9 +277,29 @@ test-dev-win: ## R-devel on Windows
- *rm-src-win
- *mv-bin-win
-#test-rel-osx: ## R-release on MacOS, no macosx runner yet
+test-old-win: ## R-oldrel on Windows
+ <<: *test-win
+ variables:
+ R_VERSION: "$R_OLDREL_VERSION"
+ before_script:
+ - *install-r-oldrel-win
+ - *install-rtools35-win
+ - $ENV:PATH = "C:\R\bin;C:\Rtools\bin;$ENV:PATH"
+ - *install-deps-win
+ - *cp-src-win
+ - rm.exe -r bus
+ script:
+ - *mv-src-win
+ - cd bus/$CI_BUILD_NAME
+ - R.exe CMD check --no-manual --ignore-vignettes $(ls.exe -1t data.table_*.tar.gz | head.exe -n 1)
+ - R.exe CMD INSTALL --build $(ls.exe -1t data.table_*.tar.gz | head.exe -n 1)
+ - *rm-src-win
+ - *mv-bin-win
+
+#test-rel-mac: ## R-release on MacOS, no macosx runner yet
+# <<: *test-mac
# variables:
-# R_BIN_VERSION: "4.0"
+# R_VERSION: "$R_REL_VERSION"
# before_script:
# - *install-deps
# - *cp-src
@@ -272,9 +309,10 @@ test-dev-win: ## R-devel on Windows
# - cd bus/$CI_BUILD_NAME
# - R CMD check $(ls -1t data.table_*.tar.gz | head -n 1)
# - R CMD INSTALL --build $(ls -1t data.table_*.tar.gz | head -n 1)
-# - mkdir -p cran/bin/macosx/el-capitan/contrib/$R_BIN_VERSION
-# - mv $(ls -1t data.table_*.tgz | head -n 1) cran/bin/macosx/el-capitan/contrib/$R_BIN_VERSION
+# - mkdir -p cran/bin/macosx/el-capitan/contrib/$R_VERSION
+# - mv $(ls -1t data.table_*.tgz | head -n 1) cran/bin/macosx/el-capitan/contrib/$R_VERSION
# - *rm-src
+# - *mv-bin-mac
integration: ## merging all artifacts to produce single R repository, documentation and website
stage: integration
@@ -283,22 +321,7 @@ integration: ## merging all artifacts to produce single R repository, documentat
- linux
only:
- master
- dependencies:
- - mirror-packages
- - build
- - test-rel-lin
- - test-rel-cran-lin
- - test-dev-cran-lin
- - test-rel-vanilla-lin
- - test-310-cran-lin
- - test-344-cran-lin
- - test-350-cran-lin
- - test-rel-win
- - test-dev-win
- #- test-rel-osx
- variables:
- R_BIN_VERSION: "4.0"
- R_DEVEL_BIN_VERSION: "4.1"
+ needs: ["mirror-packages","build","test-rel-lin","test-rel-cran-lin","test-dev-cran-lin","test-rel-vanilla-lin","test-310-cran-lin","test-344-cran-lin","test-350-cran-lin","test-rel-win","test-dev-win","test-old-win"]
script:
- Rscript -e 'pkgdown::build_site(override=list(destination="./pkgdown"))'
## html manual, vignettes, repos, cran_web, cran_checks
@@ -309,10 +332,12 @@ integration: ## merging all artifacts to produce single R repository, documentat
- mkdir -p bus/$CI_BUILD_NAME
## delete any existing non-dev version of data.table
- rm -f bus/mirror-packages/cran/src/contrib/data.table_*.tar.gz
- - rm -f bus/mirror-packages/cran/bin/windows/contrib/$R_BIN_VERSION/data.table_*.zip
- - rm -f bus/mirror-packages/cran/bin/windows/contrib/$R_DEVEL_BIN_VERSION/data.table_*.zip
- #- rm -f bus/mirror-packages/cran/bin/macosx/el-capitan/contrib/$R_BIN_VERSION/data.table_*.tgz
- #- rm -f bus/mirror-packages/cran/bin/macosx/el-capitan/contrib/$R_DEVEL_BIN_VERSION/data.table_*.tgz
+ - rm -f bus/mirror-packages/cran/bin/windows/contrib/$R_REL_VERSION/data.table_*.zip
+ - rm -f bus/mirror-packages/cran/bin/windows/contrib/$R_DEVEL_VERSION/data.table_*.zip
+ - rm -f bus/mirror-packages/cran/bin/windows/contrib/$R_OLDREL_VERSION/data.table_*.zip
+ #- rm -f bus/mirror-packages/cran/bin/macosx/el-capitan/contrib/$R_REL_VERSION/data.table_*.tgz
+ #- rm -f bus/mirror-packages/cran/bin/macosx/el-capitan/contrib/$R_DEVEL_VERSION/data.table_*.tgz
+ #- rm -f bus/mirror-packages/cran/bin/macosx/el-capitan/contrib/$R_OLDREL_VERSION/data.table_*.tgz
## merge mirror-packages and R devel packages
- mv bus/mirror-packages/cran bus/$CI_BUILD_NAME/
## publish package sources
@@ -320,17 +345,21 @@ integration: ## merging all artifacts to produce single R repository, documentat
- mv $(ls -1t bus/build/cran/src/contrib/data.table_*.tar.gz | head -n 1) bus/$CI_BUILD_NAME/cran/src/contrib
- Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="source"), type="source", fields="Revision", addFiles=TRUE)'
## publish binaries
- - Rscript -e 'move.bin("test-rel-win", Sys.getenv("R_BIN_VERSION"), os.type="windows")'
- - Rscript -e 'move.bin("test-dev-win", Sys.getenv("R_DEVEL_BIN_VERSION"), os.type="windows", silent=TRUE)'
- - Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="win.binary", ver=Sys.getenv("R_BIN_VERSION")), type="win.binary", fields="Revision", addFiles=TRUE)'
- - Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="win.binary", ver=Sys.getenv("R_DEVEL_BIN_VERSION")), type="win.binary", fields="Revision", addFiles=TRUE)'
- #- Rscript -e 'move.bin("test-rel-osx", Sys.getenv("R_BIN_VERSION"), os.type="macosx")'
- #- Rscript -e 'move.bin("test-dev-osx", Sys.getenv("R_DEVEL_BIN_VERSION"), os.type="macosx", silent=TRUE)'
- #- Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="mac.binary.el-capitan", ver=Sys.getenv("R_BIN_VERSION")), type="mac.binary.el-capitan", fields="Revision", addFiles=TRUE)'
- #- Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="mac.binary.el-capitan", ver=Sys.getenv("R_DEVEL_BIN_VERSION")), type="mac.binary.el-capitan", fields="Revision", addFiles=TRUE)'
+ - Rscript -e 'move.bin("test-rel-win", Sys.getenv("R_REL_VERSION"), os.type="windows")'
+ - Rscript -e 'move.bin("test-dev-win", Sys.getenv("R_DEVEL_VERSION"), os.type="windows")'
+ - Rscript -e 'move.bin("test-old-win", Sys.getenv("R_OLDREL_VERSION"), os.type="windows")'
+ - Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="win.binary", ver=Sys.getenv("R_REL_VERSION")), type="win.binary", fields="Revision", addFiles=TRUE)'
+ - Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="win.binary", ver=Sys.getenv("R_DEVEL_VERSION")), type="win.binary", fields="Revision", addFiles=TRUE)'
+ - Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="win.binary", ver=Sys.getenv("R_OLDREL_VERSION")), type="win.binary", fields="Revision", addFiles=TRUE)'
+ #- Rscript -e 'move.bin("test-rel-mac", Sys.getenv("R_REL_VERSION"), os.type="macosx")'
+ #- Rscript -e 'move.bin("test-dev-mac", Sys.getenv("R_DEVEL_VERSION"), os.type="macosx")'
+ #- Rscript -e 'move.bin("test-old-mac", Sys.getenv("R_OLDREL_VERSION"), os.type="macosx")'
+ #- Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="mac.binary.el-capitan", ver=Sys.getenv("R_REL_VERSION")), type="mac.binary.el-capitan", fields="Revision", addFiles=TRUE)'
+ #- Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="mac.binary.el-capitan", ver=Sys.getenv("R_DEVEL_VERSION")), type="mac.binary.el-capitan", fields="Revision", addFiles=TRUE)'
+ #- Rscript -e 'tools::write_PACKAGES(contrib.url("bus/integration/cran", type="mac.binary.el-capitan", ver=Sys.getenv("R_OLDREL_VERSION")), type="mac.binary.el-capitan", fields="Revision", addFiles=TRUE)'
## install all pkgs to render html and double check successful installation of all devel packages
- - mkdir -p /tmp/opencran/library /tmp/opencran/doc/html
- - Rscript -e 'install.packages("data.table", dependencies=TRUE, lib="/tmp/opencran/library", repos=file.path("file:",normalizePath("bus/integration/cran")), INSTALL_opts="--html", quiet=TRUE)'
+ - mkdir -p /tmp/opencran/library /tmp/opencran/doc/html ## reset R_LIBS_USER to re-install all with html because pkgdown image has pre installed curl knitr
+ - R_LIBS_USER="" Rscript -e 'install.packages("data.table", dependencies=TRUE, lib="/tmp/opencran/library", repos=file.path("file:",normalizePath("bus/integration/cran")), INSTALL_opts="--html", quiet=TRUE)'
- Rscript -e 'packageVersion("data.table", lib.loc="/tmp/opencran/library")'
## CRAN style web/CRAN_web.css
- wget -q -P bus/integration/cran/web https://cran.r-project.org/web/CRAN_web.css
@@ -349,6 +378,8 @@ integration: ## merging all artifacts to produce single R repository, documentat
- Rscript -e 'pdf.copy("data.table", "test-rel-lin")'
## web/checks/check_results_$pkg.html
- Rscript -e 'check.index("data.table", names(test.jobs))'
+ ## web/checks/check_flavors.html
+ - Rscript -e 'check.flavors(names(test.jobs))'
## pkgdown merge
- Rscript -e 'common_files<-function(path1, path2) intersect(list.files(path1, all.files=TRUE, no..=TRUE), list.files(path2, all.files=TRUE, no..=TRUE)); msg = if (length(f<-common_files("pkgdown","bus/integration/cran"))) paste(c("Following artifacts will be overwritten by pkgdown artifacts:", paste0(" ", f)), collapse="\n") else "No overlapping files from pkgdown artifacts"; message(msg); q("no")'
- mv pkgdown/* bus/integration/cran/
@@ -366,8 +397,10 @@ integration: ## merging all artifacts to produce single R repository, documentat
image: docker
services:
- docker:dind
- dependencies:
- - build
+ needs:
+ - job: build
+ - job: integration
+ artifacts: false
before_script:
- sed "s/SRC_IMAGE_NAME/$SRC_IMAGE_NAME/" < .ci/Dockerfile.in > Dockerfile
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
@@ -420,13 +453,12 @@ pages: ## publish R repository, test jobs summaries, html documentation of all p
only:
- master
image: ubuntu
- dependencies:
- - integration
+ needs: ["integration"]
script:
- mkdir -p public
- cp -r bus/integration/cran/* public
- cat public/src/contrib/PACKAGES
artifacts: ## publish only when no failure
- expire_in: 4 weeks
+ expire_in: 2 weeks
paths:
- public
diff --git a/inst/tests/other.Rraw b/inst/tests/other.Rraw
index 55718e23b4..1bd91286f9 100644
--- a/inst/tests/other.Rraw
+++ b/inst/tests/other.Rraw
@@ -10,7 +10,7 @@ if (!"package:data.table" %in% search()) stop("data.table should be already atta
test = data.table:::test
INT = data.table:::INT
-pkgs = c("ggplot2", "hexbin", "plyr", "caret", "xts", "gdata", "zoo", "nlme", "bit64", "knitr", "plm", "parallel")
+pkgs = c("ggplot2", "hexbin", "plyr", "caret", "xts", "gdata", "zoo", "nlme", "bit64", "knitr", "parallel")
if (any(duplicated(pkgs))) stop("Packages defined to be loaded for integration tests in 'inst/tests/other.Rraw' contains duplicates.")
is.require = function(pkg) suppressWarnings(suppressMessages(isTRUE(require(pkg, character.only=TRUE, quietly=TRUE, warn.conflicts=FALSE))))
@@ -155,15 +155,6 @@ if (loaded[["knitr"]]) {
test(11, kable(DT), output="x.*y.*1.*2")
}
-# for plm package
-if (loaded[["plm"]]) {
- set.seed(45L)
- x = data.table(V1=c(1L,2L), V2=LETTERS[1:3], V3=round(rnorm(4),4), V4=1:12)
- px = pdata.frame(x, index=c("V2", "V4"), drop.index=FALSE, row.names=TRUE)
- test(12.1, class(as.data.table(px)), class(x))
- test(12.2, class(setDT(px)), class(x))
-}
-
if (loaded[["parallel"]]) {
#1745 and #1727
if (.Platform$OS.type=="windows") {
@@ -200,7 +191,3 @@ test(14.1, !inherits(res, 'error'))
res = tryCatch(example('CJ', package='data.table', local=TRUE))
test(14.2, !inherits(res, 'error'))
-
-###################################
-# Add new tests above this line #
-###################################
diff --git a/inst/tests/tests-DESCRIPTION b/inst/tests/tests-DESCRIPTION
index edfadceb0b..35e3411ad0 100644
--- a/inst/tests/tests-DESCRIPTION
+++ b/inst/tests/tests-DESCRIPTION
@@ -4,4 +4,4 @@ Type: Backend
Title: List of data.table dependencies used in integration tests
Authors@R: c(person("data.table team", role = c("aut", "cre", "cph"), email="mattjdowle@gmail.com"))
Description: Standalone R DESCRIPTION file which defines R dependencies for integration tests of data.table package. Integration tests are not part of main testing workflow. They are performed only when TEST_DATA_TABLE_WITH_OTHER_PACKAGES environment variable is set to true. This allows us to run those integration tests in our CI pipeline and not impose dependency chains on the user.
-Suggests: ggplot2 (>= 0.9.0), reshape, hexbin, fastmatch, nlme, gdata, caret, plm, rmarkdown, parallel
+Suggests: ggplot2 (>= 0.9.0), reshape, hexbin, fastmatch, nlme, gdata, caret, rmarkdown, parallel