Skip to content

Commit 5483d48

Browse files
authored
Update GitLab CI rules (#7065)
* GLCI: update R versions and links Since R-4.5.0 has been released, provide the links to up-to-date versions of released, development, and old-release versions of R. * GLCI: fail Mac checks if worse than NOTE * glci: install gettext from mac.r-project.org * test-lin-rel: run --as-cran checks * mirror-packages: version-2 PACKAGES.rds Apparently, unlike R-3.3, R-3.4 outright fails the call to available.packages() when it sees PACKAGES.rds it cannot parse. Try to make tools::write_PACKAGES() prepare a file compatible with R<3.5. * test-lin-rel: try harder to ignore -Wvla NOTE * glci: update failure rules * glci: use R CMD check dependencies from containers Not as easy for lin-dev checks, those install packages from source
1 parent 05d6797 commit 5483d48

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

.gitlab-ci.yml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ variables:
1313
TZ: "UTC" ## to avoid 'Failed to create bus connection' from timedatectl via Sys.timezone() on Docker with R 3.4.
1414
## Setting TZ for all GLCI jobs to isolate them from timezone. We could have a new GLCI job to test under
1515
## a non-UTC timezone, although, that's what we do routinely in dev.
16-
R_REL_VERSION: "4.4" # only raise when RTOOLS for REL is available
17-
R_REL_WIN_BIN: "https://cloud.r-project.org/bin/windows/base/old/4.4.1/R-4.4.1-win.exe"
18-
R_DEV_VERSION: "4.5"
16+
R_REL_VERSION: "4.5" # only raise when RTOOLS for REL is available
17+
R_REL_WIN_BIN: "https://cloud.r-project.org/bin/windows/base/old/4.5.0/R-4.5.0-win.exe"
18+
R_DEV_VERSION: "4.6"
1919
R_DEV_WIN_BIN: "https://cloud.r-project.org/bin/windows/base/R-devel-win.exe"
20-
R_OLD_VERSION: "4.3"
21-
R_OLD_WIN_BIN: "https://cloud.r-project.org/bin/windows/base/old/4.3.3/R-4.3.3-win.exe"
22-
R_REL_MAC_BIN: "https://cloud.r-project.org/bin/macosx/big-sur-arm64/base/R-4.4.1-arm64.pkg"
23-
R_OLD_MAC_BIN: "https://cloud.r-project.org/bin/macosx/big-sur-arm64/base/R-4.3.3-arm64.pkg"
20+
R_OLD_VERSION: "4.4"
21+
R_OLD_WIN_BIN: "https://cloud.r-project.org/bin/windows/base/old/4.4.3/R-4.4.3-win.exe"
22+
R_REL_MAC_BIN: "https://cloud.r-project.org/bin/macosx/big-sur-arm64/base/R-4.5.0-arm64.pkg"
23+
R_OLD_MAC_BIN: "https://cloud.r-project.org/bin/macosx/big-sur-arm64/base/R-4.4.3-arm64.pkg"
2424

2525
stages:
2626
- dependencies
@@ -48,6 +48,9 @@ mirror-packages:
4848
cache:
4949
paths:
5050
- bus/$CI_JOB_NAME/cran
51+
variables:
52+
# TODO(R-ancient>=3.5.0): remove this; let it save PACKAGES.rds in version-3 format
53+
R_DEFAULT_SERIALIZE_VERSION: 2
5154
script:
5255
- echo 'source(".ci/ci.R")' >> .Rprofile
5356
- mkdir -p bus/$CI_JOB_NAME/cran/src/contrib
@@ -104,21 +107,23 @@ build:
104107
# force all suggests
105108
# flags: gcc -O3 -flto=auto -fno-common -Wunused-result
106109
# tests for compilation warnings
110+
# runs the --as-cran check, including the URL checks
107111
test-lin-rel:
108112
<<: *test-lin
109113
image: registry.gitlab.com/rdatatable/dockerfiles/r-data.table
110114
variables:
111-
_R_CHECK_COMPILATION_FLAGS_KNOWN_: "-Wvla"
112-
_R_CHECK_CRAN_INCOMING_: "FALSE"
113-
_R_CHECK_CRAN_INCOMING_REMOTE_: "FALSE"
114115
_R_CHECK_FORCE_SUGGESTS_: "TRUE"
115116
OPENBLAS_MAIN_FREE: "1"
116117
script:
117118
- *install-deps
118119
- echo 'CFLAGS=-g -O3 -flto=auto -fno-common -fopenmp -Wall -Wvla -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2' > ~/.R/Makevars
119120
- echo 'CXXFLAGS=-g -O3 -flto=auto -fno-common -fopenmp -Wall -Wvla -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2' >> ~/.R/Makevars
120-
- R CMD check $(ls -1t data.table_*.tar.gz | head -n 1)
121-
- (! grep "warning:" data.table.Rcheck/00install.out)
121+
- echo '_R_CHECK_COMPILATION_FLAGS_KNOWN_=-Wvla' >> ~/.Renviron
122+
- |
123+
res1=0; R CMD check --as-cran $(ls -1t data.table_*.tar.gz | head -n 1) || res1=$?
124+
res2=0; grep -v "warning:" data.table.Rcheck/00install.out || res2=$?
125+
res3=0; Rscript -e 'l=tail(readLines("data.table.Rcheck/00check.log"), 1L); if (!identical(l, "Status: 2 NOTEs")) stop("Last line of ", shQuote("00check.log"), " is not ", shQuote("Status: 2 NOTEs"), " (CRAN incoming feasibility, non-API) but ", shQuote(l))' || res3=$?
126+
if [ $res1 -ne 0 ] || [ $res2 -ne 0 ] || [ $res3 -ne 0 ]; then exit 1; fi
122127
123128
## vanilla minimal
124129
# no zlib
@@ -151,9 +156,10 @@ test-lin-rel-cran:
151156
- *install-deps
152157
- echo 'CFLAGS=-g -O2 -fopenmp -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2' > ~/.R/Makevars
153158
- echo 'CXXFLAGS=-g -O2 -fopenmp -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2' >> ~/.R/Makevars
154-
- R CMD check --as-cran $(ls -1t data.table_*.tar.gz | head -n 1)
155-
- >-
156-
Rscript -e 'l=tail(readLines("data.table.Rcheck/00check.log"), 1L); if (!identical(l, "Status: OK")) stop("Last line of ", shQuote("00check.log"), " is not ", shQuote("Status: OK"), " but ", shQuote(l)) else q("no")'
159+
- |
160+
res1=0; R CMD check --as-cran $(ls -1t data.table_*.tar.gz | head -n 1) || res1=$?
161+
res2=0; Rscript -e 'l=tail(readLines("data.table.Rcheck/00check.log"), 1L); if (!identical(l, "Status: 1 NOTE")) stop("Last line of ", shQuote("00check.log"), " is not ", shQuote("Status: 1 NOTE"), " (non-API) but ", shQuote(l))' || res2=$?
162+
if [ $res1 -ne 0 ] || [ $res2 -ne 0 ]; then exit 1; fi
157163
158164
## R-devel on Linux gcc strict
159165
# R built with --enable-strict-barrier --disable-long-double
@@ -175,7 +181,7 @@ test-lin-dev-gcc-strict-cran:
175181
- R CMD check --as-cran $(ls -1t data.table_*.tar.gz | head -n 1)
176182
- (! grep "warning:" data.table.Rcheck/00install.out)
177183
- >-
178-
Rscript -e 'l=tail(readLines("data.table.Rcheck/00check.log"), 1L); notes<-"Status: 3 NOTEs"; if (!identical(l, notes)) stop("Last line of ", shQuote("00check.log"), " is not ", shQuote(notes), " (size of tarball, installed package size, non-API calls) but ", shQuote(l)) else q("no")'
184+
Rscript -e 'l=tail(readLines("data.table.Rcheck/00check.log"), 1L); notes<-"Status: 3 NOTEs"; if (!identical(l, notes)) stop("Last line of ", shQuote("00check.log"), " is not ", shQuote(notes), " (size of tarball, non-API calls, V8 package) but ", shQuote(l)) else q("no")'
179185
180186
## R-devel on Linux clang
181187
# R compiled with clang, flags removed: -flto=auto -fopenmp
@@ -198,7 +204,7 @@ test-lin-dev-clang-cran:
198204
- R CMD check --as-cran $(ls -1t data.table_*.tar.gz | head -n 1)
199205
- (! grep "warning:" data.table.Rcheck/00install.out)
200206
- >-
201-
Rscript -e 'l=tail(readLines("data.table.Rcheck/00check.log"), 1L); notes<-"Status: 2 NOTEs"; if (!identical(l, notes)) stop("Last line of ", shQuote("00check.log"), " is not ", shQuote(notes), " (size of tarball, non-API calls) but ", shQuote(l)) else q("no")'
207+
Rscript -e 'l=tail(readLines("data.table.Rcheck/00check.log"), 1L); notes<-"Status: 3 NOTEs"; if (!identical(l, notes)) stop("Last line of ", shQuote("00check.log"), " is not ", shQuote(notes), " (size of tarball, non-API calls, V8 package) but ", shQuote(l)) else q("no")'
202208
203209
# stated dependency on R
204210
test-lin-ancient-cran:
@@ -290,11 +296,14 @@ test-win-old:
290296
before_script:
291297
- curl -O $R_BIN
292298
- sudo installer -pkg "$(ls -1t R-*-arm64.pkg | head -n 1)" -target /
299+
- sudo Rscript -e "source('https://mac.R-project.org/bin/install.R'); install.libs('gettext')"
293300
- *install-deps
294301
- cp $(ls -1t bus/build/data.table_*.tar.gz | head -n 1) .
295302
script:
296303
- R CMD check --no-manual $(ls -1t data.table_*.tar.gz | head -n 1)
297304
- R CMD INSTALL --build $(ls -1t data.table_*.tar.gz | head -n 1)
305+
- >-
306+
tail -n 1 data.table.Rcheck/00check.log | grep -q -e '^Status: [0-9]* NOTEs*$' -e '^Status: OK$'
298307
after_script:
299308
- mkdir -p bus/$CI_JOB_NAME
300309
- '[ -d data.table.Rcheck ] && mv data.table.Rcheck bus/$CI_JOB_NAME/'

0 commit comments

Comments
 (0)