Skip to content

Commit

Permalink
try pinning setup-pandoc instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Feb 3, 2024
1 parent bed203d commit 39237bc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .ci/test_r_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ if [[ $OS_NAME == "linux" ]]; then
automake \
|| exit -1
fi
if [[ $INSTALL_CMAKE_FROM_RELEASES == "true" ]]; then
curl -O -L \
https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-linux-x86_64.sh \
|| exit -1

sudo mkdir /opt/cmake || exit -1
sudo sh cmake-3.25.1-linux-x86_64.sh --skip-license --prefix=/opt/cmake || exit -1
sudo ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake || exit -1
fi
fi

# Installing R precompiled for Mac OS 10.11 or higher
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/r_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
compiler: gcc
r_version: 3.6
build_type: cmake
container: 'ubuntu:20.04'
container: 'ubuntu:18.04'
- os: ubuntu-latest
task: r-package
compiler: gcc
Expand All @@ -56,7 +56,7 @@ jobs:
compiler: clang
r_version: 3.6
build_type: cmake
container: 'ubuntu:20.04'
container: 'ubuntu:18.04'
- os: ubuntu-latest
task: r-package
compiler: clang
Expand Down Expand Up @@ -180,6 +180,12 @@ jobs:
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
if: matrix.r_version != '3.6'
# R 3.6 binary isn't easily available on buntu 18.04,
# but setup-pandoc>=2.7.1 is uses a too-new glibc for it.
# ref: https://github.com/microsoft/LightGBM/issues/6298
- name: Install pandoc
uses: r-lib/actions/[email protected]
if: matrix.r_version == '3.6'
- name: install tinytex
if: startsWith(matrix.os, 'windows')
uses: r-lib/actions/setup-tinytex@v2
Expand All @@ -198,6 +204,11 @@ jobs:
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
export OS_NAME="linux"
export IN_UBUNTU_BASE_CONTAINER="true"
# the default version of cmake provided on Ubuntu 18.04 (v3.10.2), is not supported by LightGBM
# see https://github.com/microsoft/LightGBM/issues/5642
if [[ "${{ matrix.container }}" == "ubuntu:18.04" ]]; then
export INSTALL_CMAKE_FROM_RELEASES="true"
fi
fi
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
export R_VERSION="${{ matrix.r_version }}"
Expand Down

0 comments on commit 39237bc

Please sign in to comment.