From 37283921ae08d0c45acbc2a3e1fdebde9370cfb6 Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Tue, 8 Feb 2022 11:52:26 -0500 Subject: [PATCH 1/3] Update tensorflow setup --- .github/workflows/R-CMD-check.yaml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index b69f1fd92..53ac8aba2 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -23,8 +23,7 @@ jobs: matrix: config: - {os: macOS-latest, r: 'release'} - # disable until tensorflow install is worked out - # - {os: windows-latest, r: 'release'} + - {os: windows-latest, r: 'release'} # Use older ubuntu to maximise backward compatibility - {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-18.04, r: 'release'} @@ -53,20 +52,17 @@ jobs: with: extra-packages: rcmdcheck - - name: Install Miniconda - run: | - pak::pkg_install('rstudio/reticulate') - reticulate::install_miniconda() + - name: Install dev reticulate + run: pak::pkg_install('rstudio/reticulate') shell: Rscript {0} - - name: Find Miniconda on macOS - if: runner.os == 'macOS' - run: echo "options(reticulate.conda_binary = reticulate:::miniconda_conda())" >> .Rprofile + - name: Install Miniconda + run: reticulate::install_miniconda() # creates r-reticulate conda env by default + shell: Rscript {0} - name: Install TensorFlow run: | - reticulate::conda_create('r-reticulate', packages = c('python==3.6.9')) - tensorflow::install_tensorflow(version='1.14.0') + tensorflow::install_tensorflow(version='1.15', conda_python_version = '3.7') shell: Rscript {0} - uses: r-lib/actions/check-r-package@v2 From 2270653d103c64a26c382182b2a67e78fc3db75b Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Tue, 8 Feb 2022 12:12:08 -0500 Subject: [PATCH 2/3] Enable running R-CMD-check manually --- .github/workflows/R-CMD-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 53ac8aba2..30bc990d2 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -9,6 +9,7 @@ on: branches: [main, master] pull_request: branches: [main, master] + workflow_dispatch: name: R-CMD-check From 4555adc89caf0aef74d1072a93171f467f22cf6f Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Tue, 8 Feb 2022 12:26:29 -0500 Subject: [PATCH 3/3] Workaround conda failing to downgrade python --- .github/workflows/R-CMD-check.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 30bc990d2..b6d36677f 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -58,12 +58,15 @@ jobs: shell: Rscript {0} - name: Install Miniconda + # conda can fail at downgrading python, so we specify python version in advance + env: + RETICULATE_MINICONDA_PYTHON_VERSION: "3.7" run: reticulate::install_miniconda() # creates r-reticulate conda env by default shell: Rscript {0} - name: Install TensorFlow run: | - tensorflow::install_tensorflow(version='1.15', conda_python_version = '3.7') + tensorflow::install_tensorflow(version='1.15', conda_python_version = NULL) shell: Rscript {0} - uses: r-lib/actions/check-r-package@v2