Skip to content

adding workflow actions back #4

adding workflow actions back

adding workflow actions back #4

Workflow file for this run

# NOTE: This workflow is overkill for most R packages
# check-standard.yaml is likely a better choice
# usethis::use_github_action("check-standard") will install it.
#
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
name: R-CMD-check
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel'}
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: 'oldrel-1', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: 'oldrel-2', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
env:
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RETICULATE_AUTOCONFIGURE: 'FALSE'
TF_VERSION: '1.14.0'
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
id: install-r
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: |
local::.
any::keras
any::rcmdcheck
- name: Install Miniconda
run: |
reticulate::install_miniconda()
shell: Rscript {0}
- name: Set options for conda binary for macOS
if: runner.os == 'macOS'
run: |
echo "options(reticulate.conda_binary = reticulate:::miniconda_conda())" >> .Rprofile
- name: Install TensorFlow
run: |
cat("::group::Create Environment", sep = "\n")
reticulate::conda_create('r-reticulate', packages = c('python==3.7'))
cat("::endgroup::", sep = "\n")
cat("::group::Install Tensorflow", sep = "\n")
keras::install_keras(tensorflow = Sys.getenv('TF_VERSION'),
extra_packages = c('IPython', 'requests', 'certifi', 'urllib3', 'tensorflow-probability==0.7.0', 'numpy==1.16.4'))
cat("::endgroup::", sep = "\n")
shell: Rscript {0}
- name: Python + TF details
run: |
tensorflow::tf_config()
tensorflow::tf_version()
reticulate::py_module_available("tensorflow_probability")
reticulate::py_config()
shell: Rscript {0}
- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran", "--no-multiarch")'