Skip to content

WIP: [ci] [R-package] add a CI job to run R reverse dependency checks #5

WIP: [ci] [R-package] add a CI job to run R reverse dependency checks

WIP: [ci] [R-package] add a CI job to run R reverse dependency checks #5

name: R reverse dependency checks
on:
push:
pull_request:
# Run manually by clicking a button in the UI
workflow_dispatch:
# Run on the 5th day of every month
schedule:
- cron: '0 0 5 * *'
# automatically cancel in-progress builds if another commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# parallelize compilation (extra important for Linux, where CRAN doesn't supply pre-compiled binaries)
MAKEFLAGS: "-j4"
# ignore R CMD CHECK NOTE checking how long it has
# been since the last submission
_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
_R_CHECK_PKG_SIZES_THRESHOLD_: 100
jobs:
test:
name: r-revdepchecks (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os:
- macos-14
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
submodules: true
- uses: r-lib/actions/setup-pandoc@v2
- name: Install tinytex
if: startsWith(matrix.os, 'windows')
uses: r-lib/actions/setup-tinytex@v2
env:
CTAN_MIRROR: https://ctan.math.illinois.edu/systems/win32/miktex
TINYTEX_INSTALLER: TinyTeX
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'devel'
- name: install system dependencies
run: |
brew install libomp
- name: build package
run: |
sh ./build-cran-package.sh
- name: run revdepchecks
run: |
bash ./.ci/run-revdep-checks.sh
- name: Setup and run tests on Windows
if: startsWith(matrix.os, 'windows')
shell: pwsh -command ". {0}"
run: |
$env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE
$env:LGB_VER = (Get-Content -TotalCount 1 $env:BUILD_SOURCESDIRECTORY\VERSION.txt).trim().replace('rc', '-')
$env:TOOLCHAIN = "${{ matrix.toolchain }}"
$env:R_VERSION = "${{ matrix.r_version }}"
$env:R_BUILD_TYPE = "${{ matrix.build_type }}"
$env:COMPILER = "${{ matrix.compiler }}"
$env:TASK = "${{ matrix.task }}"
& "$env:GITHUB_WORKSPACE/.ci/test-windows.ps1"
all-r-revdepchecks-jobs-successful:
if: always()
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Note that all tests succeeded
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}