Skip to content

Commit 75ee6d3

Browse files
committed
Set miniconda env variable in matrix
1 parent 0a6ec85 commit 75ee6d3

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

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

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
config:
21-
- {os: macOS-latest, r: 'devel'}
22-
- {os: macOS-latest, r: 'release'}
21+
- {os: macOS-latest, r: 'devel', miniconda: 'miniconda/'}
22+
- {os: macOS-latest, r: 'release', miniconda: 'miniconda/'}
2323
- {os: windows-latest, r: 'release'}
2424
- {os: windows-latest, r: '3.6'}
2525
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
@@ -30,6 +30,7 @@ jobs:
3030
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3131
RSPM: ${{ matrix.config.rspm }}
3232
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
33+
RETICULATE_MINICONDA_PATH: ${{ matrix.config.miniconda }}
3334

3435
steps:
3536
- uses: actions/checkout@v2
@@ -70,21 +71,21 @@ jobs:
7071
remotes::install_cran("rcmdcheck")
7172
shell: Rscript {0}
7273

73-
- name: Install TensorFlow on macOS and Ubuntu
74-
if: runner.os != 'Windows'
75-
env:
76-
RETICULATE_MINICONDA_PATH: 'miniconda/'
74+
- name: Install TensorFlow on macOS
75+
if: runner.os == 'macOS'
7776
run: |
78-
Rscript -e "reticulate::install_miniconda()"
79-
Rscript -e "reticulate::conda_create('r-reticulate', packages = 'python==3.6.9', conda = 'miniconda/bin/conda')"
80-
Rscript -e "tensorflow::install_tensorflow(version='1.14.0', conda = 'miniconda/bin/conda')"
77+
reticulate::install_miniconda()
78+
reticulate::conda_create('r-reticulate', packages = 'python==3.6.9', conda = 'miniconda/bin/conda')
79+
tensorflow::install_tensorflow(version='1.14.0', conda = 'miniconda/bin/conda')
80+
shell: Rscript {0}
8181

82-
- name: Install TensorFlow on Windows
83-
if: runner.os == 'Windows'
82+
- name: Install TensorFlow on Ubuntu and Windows
83+
if: runner.os != 'macOS'
8484
run: |
85-
Rscript -e "reticulate::install_miniconda()"
86-
Rscript -e "reticulate::conda_create('r-reticulate', packages = 'python==3.6.9')"
87-
Rscript -e "tensorflow::install_tensorflow(version='1.14.0')"
85+
reticulate::install_miniconda()
86+
reticulate::conda_create('r-reticulate', packages = 'python==3.6.9')
87+
tensorflow::install_tensorflow(version='1.14.0')
88+
shell: Rscript {0}
8889

8990
- name: Session info
9091
run: |

0 commit comments

Comments
 (0)