From 0038a662085603268102f76e39bfd2f6b37d18cb Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 29 Aug 2020 15:26:06 +0100 Subject: [PATCH] [ci] fix R CMD check issue 'unable to verify current time' (#3341) --- .ci/test_r_package.sh | 4 ++++ .ci/test_r_package_windows.ps1 | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 0d65a5dcec8a..2f429df85ea4 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -7,6 +7,10 @@ mkdir -p $R_LIB_PATH export R_LIBS=$R_LIB_PATH export PATH="$R_LIB_PATH/R/bin:$PATH" +# hack to get around this: +# https://stat.ethz.ch/pipermail/r-package-devel/2020q3/005930.html +export _R_CHECK_SYSTEM_CLOCK_=0 + # Get details needed for installing R components # # NOTES: diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 04ed1b062c07..6b97b4b88fd8 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -74,6 +74,10 @@ $env:CTAN_MIRROR = "https://ctan.math.illinois.edu/systems/win32/miktex" $env:CTAN_MIKTEX_ARCHIVE = "$env:CTAN_MIRROR/setup/windows-x64/" $env:CTAN_PACKAGE_ARCHIVE = "$env:CTAN_MIRROR/tm/packages/" +# hack to get around this: +# https://stat.ethz.ch/pipermail/r-package-devel/2020q3/005930.html +$env:_R_CHECK_SYSTEM_CLOCK_ = 0 + if (($env:COMPILER -eq "MINGW") -and ($env:R_BUILD_TYPE -eq "cmake")) { $env:CXX = "$env:RTOOLS_MINGW_BIN/g++.exe" $env:CC = "$env:RTOOLS_MINGW_BIN/gcc.exe"