Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] test against R 4.2.2 #5621

Merged
merged 3 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .ci/test_r_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ if [[ "${R_MAJOR_VERSION}" == "3" ]]; then
export R_LINUX_VERSION="3.6.3-1bionic"
export R_APT_REPO="bionic-cran35/"
elif [[ "${R_MAJOR_VERSION}" == "4" ]]; then
export R_MAC_VERSION=4.2.1
export R_MAC_VERSION=4.2.2
export R_MAC_PKG_URL=${CRAN_MIRROR}/bin/macosx/base/R-${R_MAC_VERSION}.pkg
export R_LINUX_VERSION="4.2.1-1.2004.0"
export R_LINUX_VERSION="4.2.2-1.2004.0"
export R_APT_REPO="focal-cran40/"
else
echo "Unrecognized R version: ${R_VERSION}"
Expand Down Expand Up @@ -76,7 +76,7 @@ if [[ $OS_NAME == "macos" ]]; then
brew install --cask basictex || exit -1
export PATH="/Library/TeX/texbin:$PATH"
sudo tlmgr --verify-repo=none update --self || exit -1
sudo tlmgr --verify-repo=none install inconsolata helvetic || exit -1
sudo tlmgr --verify-repo=none install inconsolata helvetic rsfs || exit -1
Copy link
Collaborator Author

@jameslamb jameslamb Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the following error on macOS jobs related to missing fonts used when creating the PDF version of the docs.

* checking PDF version of manual ... � � � � WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! Font U/rsfs/m/n/10=rsfs10 at 10.0pt not loadable: Metric (TFM) file not found
.
<to be read again> 
                   relax 
l.24 ...ghly-efficient-gradient-boosting-decision}
! Font U/rsfs/m/n/7=rsfs7 at 7.0pt not loadable: Metric (TFM) file not found.
<to be read again> 
                   relax 
l.24 ...ghly-efficient-gradient-boosting-decision}
                                                  \AsIs{>.
! Font U/rsfs/m/n/5=rsfs5 at 5.0pt not loadable: Metric (TFM) file not found.
<to be read again> 
                   relax 
l.24 ...ghly-efficient-gradient-boosting-decision}
                                                  \AsIs{>


curl -sL ${R_MAC_PKG_URL} -o R.pkg || exit -1
sudo installer \
Expand Down Expand Up @@ -163,11 +163,12 @@ elif [[ $R_BUILD_TYPE == "cran" ]]; then
|| (cat ${RCHK_LOG_FILE} && exit -1)
cat ${RCHK_LOG_FILE}

# the exception below is from R itself and not LightGBM:
# the exceptions below are from R itself and not LightGBM:
# https://github.com/kalibera/rchk/issues/22#issuecomment-656036156
exit $(
cat ${RCHK_LOG_FILE} \
| grep -v "in function strptime_internal" \
| grep -v "in function RunGenCollect" \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to address the following new error from rchk on R 4.2.2.

ERROR: too many states (abstraction error?) in function RunGenCollect

full rchk log (click me)
Library name (usually package name): lightgbm
Initialization function: R_init_lightgbm
Functions: 41
Checked call to R_registerRoutines: 1
ERROR: too many states (abstraction error?) in function strptime_internal
ERROR: too many states (abstraction error?) in function RunGenCollect
Analyzed 40027 functions, traversed 105616 states.

Rchk version: 29e18222e1cfa67ba8e63bd3b22a25f78593c554
R version: 83396/R Under development (unstable) (2022-12-02 r83396)
LLVM version: 14.0.0

I think it's ok to skip it, based on kalibera/rchk#22 (comment), for the same reason we skip the warning about strptime_internal.

RunGenCollect is from R's internals, not LightGBM's code.

| grep --count -E '\[PB\]|ERROR'
)
fi
Expand Down
2 changes: 1 addition & 1 deletion .ci/test_r_package_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if ($env:R_MAJOR_VERSION -eq "3") {
$env:RTOOLS_BIN = "$RTOOLS_INSTALL_PATH\usr\bin"
$env:RTOOLS_MINGW_BIN = "$RTOOLS_INSTALL_PATH\x86_64-w64-mingw32.static.posix\bin"
$env:RTOOLS_EXE_FILE = "rtools42-5253-5107.exe"
$env:R_WINDOWS_VERSION = "4.2.1"
$env:R_WINDOWS_VERSION = "4.2.2"
} else {
Write-Output "[ERROR] Unrecognized R version: $env:R_VERSION"
Check-Output $false
Expand Down