generated from greta-dev/greta.template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
280 additions
and
280 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,108 @@ | ||
# 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")' | ||
# # 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")' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
name: greta-install-deps | ||
|
||
jobs: | ||
test-coverage: | ||
runs-on: ubuntu-18.04 | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v1 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v1 | ||
|
||
- name: Fix Conda permissions on macOS | ||
if: runner.os == 'macOS' | ||
run: sudo chown -R $UID $CONDA | ||
|
||
- name: Remotes install greta | ||
run: | | ||
install.packages('remotes') | ||
remotes::install_github("greta-dev/greta") | ||
shell: Rscript {0} | ||
|
||
- name: Greta install deps | ||
run: | | ||
library(greta) | ||
install_greta_deps(timeout = 50) | ||
shell: Rscript {0} | ||
|
||
- name: Check the installation happened properly? | ||
run: | | ||
greta:::have_greta_conda_env() | ||
greta:::have_conda() | ||
greta:::have_python() | ||
greta:::have_tf() | ||
greta:::have_tfp() | ||
shell: Rscript {0} | ||
|
||
- name: Greta run model | ||
run: | | ||
library(greta) | ||
model(normal(0,1)) | ||
shell: Rscript {0} | ||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
# - master | ||
# pull_request: | ||
# branches: | ||
# - main | ||
# - master | ||
|
||
# name: greta-install-deps | ||
|
||
# jobs: | ||
# test-coverage: | ||
# runs-on: ubuntu-18.04 | ||
# env: | ||
# GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
|
||
# - uses: r-lib/actions/setup-r@v1 | ||
|
||
# - uses: r-lib/actions/setup-pandoc@v1 | ||
|
||
# - name: Fix Conda permissions on macOS | ||
# if: runner.os == 'macOS' | ||
# run: sudo chown -R $UID $CONDA | ||
|
||
# - name: Remotes install greta | ||
# run: | | ||
# install.packages('remotes') | ||
# remotes::install_github("greta-dev/greta") | ||
# shell: Rscript {0} | ||
|
||
# - name: Greta install deps | ||
# run: | | ||
# library(greta) | ||
# install_greta_deps(timeout = 50) | ||
# shell: Rscript {0} | ||
|
||
# - name: Check the installation happened properly? | ||
# run: | | ||
# greta:::have_greta_conda_env() | ||
# greta:::have_conda() | ||
# greta:::have_python() | ||
# greta:::have_tf() | ||
# greta:::have_tfp() | ||
# shell: Rscript {0} | ||
|
||
# - name: Greta run model | ||
# run: | | ||
# library(greta) | ||
# model(normal(0,1)) | ||
# shell: Rscript {0} |
Oops, something went wrong.