File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change 77 - main
88 workflow_dispatch :
99
10- env :
11- CACHE_NUMBER : 0 # increase to reset cache manually
12-
1310jobs :
1411 basic-testing :
1512 runs-on : ${{matrix.os}}
2522 - name : Git clone
2623 uses : actions/checkout@v3
2724
25+ # See caching environments
26+ # https://github.com/conda-incubator/setup-miniconda#caching-environments
2827 - name : Setup Mambaforge
2928 uses : conda-incubator/setup-miniconda@v2
3029 with :
@@ -33,13 +32,22 @@ jobs:
3332 activate-environment : env_qolmat_ci
3433 use-mamba : true
3534
36- - name : Set cache date
37- run : echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
35+ - name : Get Date
36+ id : get-date
37+ run : echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
3838
39- - uses : actions/cache@v2
39+ - name : Cache Conda env
40+ uses : actions/cache@v2
4041 with :
41- path : ${{ matrix.prefix }}
42- key : ${{ matrix.label }}-conda-${{ hashFiles('environment.ci.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
42+ path : ${{ env.CONDA }}/envs
43+ key :
44+ conda-${{ runner.os }}--${{ runner.arch }}--${{
45+ steps.get-date.outputs.today }}-${{
46+ hashFiles('environment.ci.yml') }}-${{ env.CACHE_NUMBER
47+ }}
48+ env :
49+ # Increase this value to reset cache if environment.ci.yml has not changed
50+ CACHE_NUMBER : 0
4351 id : cache
4452
4553 - name : Update environment
You can’t perform that action at this time.
0 commit comments