update cran comments #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
# | |
# NOTE: This workflow is overkill for most R packages and | |
# check-standard.yaml is likely a better choice. | |
# usethis::use_github_action("check-standard") will install it. | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
# Allow manually triggering the workflow via GitHub website, gh CLI tool etc. | |
# Also adds parameter to enable tmate (inetractive tmux session for debugging) | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
name: R-CMD-check | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (R-${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: 'macOS-latest' , r: 'release'} | |
- {os: 'windows-latest', r: 'release'} | |
- {os: 'ubuntu-latest', r: 'devel', http-user-agent: 'release'} | |
- {os: 'ubuntu-latest', r: 'release'} | |
- {os: 'ubuntu-latest', r: 'oldrel-1'} | |
- {os: 'ubuntu-latest', r: 'oldrel-2'} | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
TORCH_TEST: 1 | |
TORCH_INSTALL: 1 | |
TORCH_COMMIT_SHA: "none" | |
OMP_NUM_THREADS: 1 | |
MKL_NUM_THREADS: 1 | |
PYTORCH_ENABLE_MPS_FALLBACK: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
id: setup-r | |
with: | |
r-version: ${{ matrix.config.r }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::rcmdcheck | |
needs: check | |
- name: Install Miniconda | |
run: reticulate::install_miniconda() | |
shell: Rscript {0} | |
- name: Install Tensorflow + Keras deps | |
run: keras::install_keras() | |
shell: Rscript {0} | |
# Get a tmux ssh session for interactive debugging | |
# Controlled via inputs from GitHub webinterface | |
# See https://github.com/mxschmitt/action-tmate | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
- name: Check if torch is installed | |
run: | | |
library(torch) | |
if (!torch_is_installed()) { | |
print("Torch is not installed!") | |
install_torch() | |
} | |
if (torch::backends_mps_is_available()) { | |
print("LibTorch is built with MPS support!") | |
} | |
print(paste0("Default number of threads: ", torch_get_num_threads())) | |
print(torch_randn(1)) | |
shell: Rscript {0} | |
- uses: r-lib/actions/check-r-package@v2 | |
with: | |
error-on: '"error"' | |
args: 'c("--no-multiarch", "--no-manual", "--as-cran")' | |
upload-snapshots: true |