Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit ee1f220

Browse files
committed
Use explicit restore/save steps for Windows Conda env cache
Update cache restore code in Windows Test workflow
1 parent f19a6e1 commit ee1f220

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/build-windows.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,29 @@ jobs:
4242
Get-PSDrive
4343
4444
- name: Restore Conda env cache
45-
id: conda-cache
46-
uses: actions/cache@v3
45+
id: restore-conda-cache
46+
uses: actions/cache/restore@v3
4747
with:
4848
path: |
4949
${{ env.CONDA_ENV_PATH }}
50-
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ env.DATE }}
50+
key: ${{ env.RUN_STAMP }}-conda-windows-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ env.DATE }}
5151
restore-keys: |
52-
${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-
52+
${{ env.RUN_STAMP }}-conda-windows-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-
5353
5454
- name: Update Conda env
5555
if: steps.conda-cache.cache-hit != 'true'
5656
run: |
5757
& $env:CONDA\condabin\conda.bat update conda
5858
& $env:CONDA\condabin\conda.bat env update -f omniscidb/scripts/mapd-deps-conda-windows-env.yml
5959
60+
- name: Save Conda env cache
61+
id: save-conda-cache
62+
uses: actions/cache/save@v3
63+
with:
64+
path: |
65+
${{ env.CONDA_ENV_PATH }}
66+
key: ${{ env.RUN_STAMP }}-conda-windows-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ env.DATE }}
67+
6068
- name: Restore Maven cache
6169
uses: actions/cache@v3
6270
with:

.github/workflows/test-windows.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Reusable test action on windows
22
on:
3-
workflow_call:
3+
workflow_call:
44
inputs:
55
name:
66
type: string
7-
default: 'gcc-cpu'
7+
default: "gcc-cpu"
88
cache-suffix:
99
type: string
1010
required: true
@@ -32,14 +32,16 @@ jobs:
3232
dir
3333
3434
- name: Restore Conda env cache
35-
uses: actions/cache@v3
35+
id: restore-conda-cache
36+
uses: actions/cache/restore@v3
3637
with:
3738
path: |
3839
${{ env.CONDA_ENV_PATH }}
39-
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ inputs.cache-suffix }}
40+
key: ${{ env.RUN_STAMP }}-conda-windows-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ env.DATE }}
41+
restore-keys: |
42+
${{ env.RUN_STAMP }}-conda-windows-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-
4043
4144
- name: Run sanity tests
4245
if: inputs.test == 'sanity'
4346
run: |
4447
& $env:CONDA\condabin\conda.bat run --no-capture-output -n omnisci-dev omniscidb/scripts/conda/test.bat
45-

0 commit comments

Comments
 (0)