Skip to content

Commit 8f26aaa

Browse files
authored
Update tensorflow setup (#644)
* Update tensorflow setup * Enable running R-CMD-check manually * Workaround conda failing to downgrade python
1 parent 1439173 commit 8f26aaa

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
branches: [main, master]
1010
pull_request:
1111
branches: [main, master]
12+
workflow_dispatch:
1213

1314
name: R-CMD-check
1415

@@ -23,8 +24,7 @@ jobs:
2324
matrix:
2425
config:
2526
- {os: macOS-latest, r: 'release'}
26-
# disable until tensorflow install is worked out
27-
# - {os: windows-latest, r: 'release'}
27+
- {os: windows-latest, r: 'release'}
2828
# Use older ubuntu to maximise backward compatibility
2929
- {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'}
3030
- {os: ubuntu-18.04, r: 'release'}
@@ -53,20 +53,20 @@ jobs:
5353
with:
5454
extra-packages: rcmdcheck
5555

56-
- name: Install Miniconda
57-
run: |
58-
pak::pkg_install('rstudio/reticulate')
59-
reticulate::install_miniconda()
56+
- name: Install dev reticulate
57+
run: pak::pkg_install('rstudio/reticulate')
6058
shell: Rscript {0}
6159

62-
- name: Find Miniconda on macOS
63-
if: runner.os == 'macOS'
64-
run: echo "options(reticulate.conda_binary = reticulate:::miniconda_conda())" >> .Rprofile
60+
- name: Install Miniconda
61+
# conda can fail at downgrading python, so we specify python version in advance
62+
env:
63+
RETICULATE_MINICONDA_PYTHON_VERSION: "3.7"
64+
run: reticulate::install_miniconda() # creates r-reticulate conda env by default
65+
shell: Rscript {0}
6566

6667
- name: Install TensorFlow
6768
run: |
68-
reticulate::conda_create('r-reticulate', packages = c('python==3.6.9'))
69-
tensorflow::install_tensorflow(version='1.14.0')
69+
tensorflow::install_tensorflow(version='1.15', conda_python_version = NULL)
7070
shell: Rscript {0}
7171

7272
- uses: r-lib/actions/check-r-package@v2

0 commit comments

Comments
 (0)