Skip to content

Commit

Permalink
[ci] upgrade R CI scripts to work on Ubuntu 20.04 (#4084)
Browse files Browse the repository at this point in the history
* [ci] install additional LaTeX packages in R CI jobs

* update autoconf version

* bump upper limit on package size to 100
  • Loading branch information
jameslamb authored Mar 19, 2021
1 parent 4580393 commit 971b548
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .ci/test_r_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export _R_CHECK_CRAN_INCOMING_REMOTE_=0
# CRAN ignores the "installed size is too large" NOTE,
# so our CI can too. Setting to a large value here just
# to catch extreme problems
export _R_CHECK_PKG_SIZES_THRESHOLD_=60
export _R_CHECK_PKG_SIZES_THRESHOLD_=100

# don't fail builds for long-running examples unless they're very long.
# See https://github.com/microsoft/LightGBM/issues/4049#issuecomment-793412254.
Expand Down Expand Up @@ -59,6 +59,7 @@ if [[ $OS_NAME == "linux" ]]; then
devscripts \
r-base-dev=${R_LINUX_VERSION} \
texinfo \
texlive-latex-extra \
texlive-latex-recommended \
texlive-fonts-recommended \
texlive-fonts-extra \
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 @@ -90,7 +90,7 @@ $env:_R_CHECK_CRAN_INCOMING_REMOTE_ = 0
# CRAN ignores the "installed size is too large" NOTE,
# so our CI can too. Setting to a large value here just
# to catch extreme problems
$env:_R_CHECK_PKG_SIZES_THRESHOLD_ = 60
$env:_R_CHECK_PKG_SIZES_THRESHOLD_ = 100

# don't fail builds for long-running examples unless they're very long.
# See https://github.com/microsoft/LightGBM/issues/4049#issuecomment-793412254.
Expand Down
2 changes: 1 addition & 1 deletion R-package/AUTOCONF_UBUNTU_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.69-11
2.69-11.1
8 changes: 4 additions & 4 deletions R-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,20 +291,20 @@ This section briefly explains the key files for building a CRAN package. To upda
At build time, `configure` will be run and used to create a file `Makevars`, using `Makevars.in` as a template.

1. Edit `configure.ac`.
2. Create `configure` with `autoconf`. Do not edit it by hand. This file must be generated on Ubuntu 18.04.
2. Create `configure` with `autoconf`. Do not edit it by hand. This file must be generated on Ubuntu 20.04.

If you have an Ubuntu 18.04 environment available, run the provided script from the root of the `LightGBM` repository.
If you have an Ubuntu 20.04 environment available, run the provided script from the root of the `LightGBM` repository.

```shell
./R-package/recreate-configure.sh
```

If you do not have easy access to an Ubuntu 18.04 environment, the `configure` script can be generated using Docker by running the code below from the root of this repo.
If you do not have easy access to an Ubuntu 20.04 environment, the `configure` script can be generated using Docker by running the code below from the root of this repo.

```shell
docker run \
-v $(pwd):/opt/LightGBM \
-t ubuntu:18.04 \
-t ubuntu:20.04 \
/bin/bash -c "cd /opt/LightGBM && ./R-package/recreate-configure.sh"
```

Expand Down
2 changes: 1 addition & 1 deletion R-package/recreate-configure.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# recreates 'configure' from 'configure.ac'
# this script should run on Ubuntu 18.04
# this script should run on Ubuntu 20.04
AUTOCONF_VERSION=$(cat R-package/AUTOCONF_UBUNTU_VERSION)

# R packages cannot have versions like 3.0.0rc1, but
Expand Down

0 comments on commit 971b548

Please sign in to comment.