|
11 | 11 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
12 | 12 | GH_PAT: ${{ secrets.GH_PAT }}
|
13 | 13 | GITHUB_PAT: ${{ secrets.GH_PAT }}
|
| 14 | + PYENV_PATHS_ROOT: '~/.pyenv' |
| 15 | + PYENV_PATHS_VENV: '~/.virtualenvs/venv' |
| 16 | + PYENV_PATHS_RETICULATE: '~/.local/share/r-reticulate' |
14 | 17 |
|
15 | 18 | steps:
|
16 | 19 | - uses: actions/checkout@v4
|
|
38 | 41 | renv::status()
|
39 | 42 | renv::diagnostics()
|
40 | 43 |
|
| 44 | + - name: Restore reticulate cache |
| 45 | + id: restore-reticulate-cache |
| 46 | + uses: actions/cache@v4 |
| 47 | + with: |
| 48 | + path: | |
| 49 | + ${{ env.PYENV_PATHS_RETICULATE }} |
| 50 | + key: local-share-reticulate-${{ env.PY_CACHE_STR }} |
| 51 | + restore-keys: local-share-reticulate- |
| 52 | + |
| 53 | + - name: Restore venv cache |
| 54 | + id: restore-venv-cache |
| 55 | + uses: actions/cache@v4 |
| 56 | + with: |
| 57 | + path: | |
| 58 | + ${{ env.PYENV_PATHS_VENV }} |
| 59 | + key: pyenv-${{ env.PY_CACHE_STR }} |
| 60 | + restore-keys: pyenv- |
| 61 | + |
| 62 | + - name: Restore pyenv cache |
| 63 | + id: restore-pyenv-cache |
| 64 | + uses: actions/cache@v4 |
| 65 | + with: |
| 66 | + path: | |
| 67 | + ${{ env.PYENV_PATHS_ROOT }} |
| 68 | + key: reticulate-venv-${{ env.PY_CACHE_STR }} |
| 69 | + restore-keys: reticulate-venv- |
| 70 | + |
| 71 | + |
41 | 72 | - name: Setup Python/venv with reqs file in reticulate
|
| 73 | + if: ${{ steps.restore-pyenv-cache.outputs.cache-hit != 'true' && steps.restore-venv-cache.outputs.cache-hit != 'true' && steps.restore-reticulate-cache.outputs.cache-hit != 'true' }} |
42 | 74 | id: setup-reticulate-venv
|
43 | 75 | shell: Rscript {0}
|
44 | 76 | run: |
|
@@ -69,21 +101,22 @@ jobs:
|
69 | 101 | devtools::session_info()
|
70 | 102 | reticulate::py_config()
|
71 | 103 |
|
| 104 | + - uses: actions/cache@v4 # v4.0.0 |
| 105 | + id: cache-venv-deps2 |
| 106 | + with: |
| 107 | + path: ~/.pyenv |
| 108 | + key: pyenv-${{ env.PY_CACHE_STR }} |
72 | 109 | - uses: actions/cache@v4 # v4.0.0
|
73 | 110 | id: cache-venv
|
74 | 111 | with:
|
75 |
| - path: ~/.virtualenvs/r-reticulate |
| 112 | + path: ~/.virtualenvs/venv |
76 | 113 | key: reticulate-venv-${{ env.PY_CACHE_STR }}
|
77 | 114 | - uses: actions/cache@v4 # v4.0.0
|
78 | 115 | id: cache-venv-deps1
|
79 | 116 | with:
|
80 | 117 | path: ~/.local/share/r-reticulate
|
81 | 118 | key: local-share-reticulate-${{ env.PY_CACHE_STR }}
|
82 |
| - - uses: actions/cache@v4 # v4.0.0 |
83 |
| - id: cache-venv-deps2 |
84 |
| - with: |
85 |
| - path: ~/.pyenv |
86 |
| - key: pyenv-${{ env.PY_CACHE_STR }} |
| 119 | + |
87 | 120 |
|
88 | 121 | - uses: quarto-dev/quarto-actions/setup@v2
|
89 | 122 | with:
|
|
0 commit comments