Skip to content

try doing more binary installs upfront #12

try doing more binary installs upfront

try doing more binary installs upfront #12

name: R reverse dependency checks
on:
push:
# 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: 'release'
- name: install system dependencies
run: |
brew install libomp
- name: build package
run: |
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores(), type = 'binary')"
sh ./build-cran-package.sh
- name: pre-install binary packages
# pre-install all of the dependencies... tools::check_packages_in_dir()
# is hard-coded to compile them all from source
# (https://github.com/wch/r-source/blob/594b842678e932088b16ec0cd3c39714a141eed9/src/library/tools/R/checktools.R#L295)
run: |
Rscript -e "install.packages('crandep', repos='https://cran.r-project.org')"
Rscript ./.ci/download-r-revdeps.R
- name: run revdepchecks
run: |
bash ./.ci/run-revdep-checks.sh
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) }}