MilesCranmer commited on
Commit
14e466a
1 Parent(s): f086a92

Add caching for conda builds

Browse files
Files changed (1) hide show
  1. .github/workflows/CI.yml +19 -0
.github/workflows/CI.yml CHANGED
@@ -91,6 +91,23 @@ jobs:
91
 
92
  steps:
93
  - uses: actions/checkout@v3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  - name: "Set up Conda"
95
  uses: conda-incubator/setup-miniconda@v2
96
  with:
@@ -100,6 +117,8 @@ jobs:
100
  python-version: ${{ matrix.python-version }}
101
  activate-environment: pysr-test
102
  environment-file: environment.yml
 
 
103
  - name: "Install PySR"
104
  run: |
105
  python3 -m pip install .
 
91
 
92
  steps:
93
  - uses: actions/checkout@v3
94
+ - name: "Cache Julia"
95
+ uses: actions/cache@v1
96
+ env:
97
+ cache-name: cache-artifacts
98
+ with:
99
+ path: ~/.julia/artifacts
100
+ key: ${{ runner.os }}-julia-${{ env.cache-name }}-${{ hashFiles('pysr/version.py') }}
101
+ restore-keys: |
102
+ ${{ runner.os }}-julia-${{ env.cache-name }}-
103
+ ${{ runner.os }}-julia-
104
+ - name: "Cache conda"
105
+ uses: actions/cache@v2
106
+ env:
107
+ CACHE_NUMBER: 0
108
+ with:
109
+ path: ~/conda_pkgs_dir
110
+ key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
111
  - name: "Set up Conda"
112
  uses: conda-incubator/setup-miniconda@v2
113
  with:
 
117
  python-version: ${{ matrix.python-version }}
118
  activate-environment: pysr-test
119
  environment-file: environment.yml
120
+ - name: "Echo conda dir"
121
+ run: echo $CONDA_PREFIX
122
  - name: "Install PySR"
123
  run: |
124
  python3 -m pip install .