1212
1313 env :
1414 R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
15+ RETICULATE_PYTHON : /usr/bin/python3
1516
1617 steps :
1718 - name : Checkout repository
@@ -33,35 +34,23 @@ jobs:
3334 restore-keys : |
3435 ${{ runner.os }}-r-pkgs-
3536
36- - name : Cache reticulate environment
37- uses : actions/cache@v3
38- with :
39- path : ~/.local/share/r-reticulate
40- key : ${{ runner.os }}-reticulate-${{ hashFiles('DESCRIPTION') }}
41- restore-keys : |
42- ${{ runner.os }}-reticulate-
43-
4437 - name : Install Python deps
4538 run : |
4639 python3 -m pip install --upgrade pip
47- pip install tensorflow==2.9.1 numpy h5py
40+ python3 -m pip install tensorflow==2.9.1 numpy h5py
4841
4942 - name : Install R dependencies with pinned reticulate
5043 run : |
5144 Rscript -e '
52- install.packages(c("remotes", "testthat", "tensorflow"), repos = "https://cloud.r-project.org");
53- remotes::install_version("reticulate", version = "1.34.0", repos = "https://cloud.r-project.org")'
54-
55- - name : Point reticulate to system Python
56- run : |
57- Rscript -e 'reticulate::use_python("/usr/bin/python3", required = TRUE)'
58- Rscript -e 'reticulate::py_config()'
45+ install.packages(c("remotes", "testthat", "tensorflow", "reticulate"), repos = "https://cloud.r-project.org");
46+ reticulate::use_python(Sys.getenv("RETICULATE_PYTHON"), required = TRUE);
47+ tensorflow::tf_config() # trigger TF detection'
5948
6049 - name : Configure GitHub PAT
6150 run : |
6251 echo "GITHUB_PAT=${{ secrets.GH_PAT }}" >> $GITHUB_ENV
6352 echo "GITHUB_PAT=${{ secrets.GH_PAT }}" >> ~/.Renviron
64-
53+
6554 - name : Install ANTsR
6655 run : |
6756 Rscript -e 'remotes::install_github("ANTsX/ANTsR", dependencies = TRUE)'
0 commit comments