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

Commit abf7e99

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

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/build-windows.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,29 @@ jobs:
4343
Get-PSDrive
4444
4545
- name: Restore Conda env cache
46-
id: conda-cache
47-
uses: actions/cache@v3
46+
id: restore-conda-cache
47+
uses: actions/cache/restore@v3
4848
with:
4949
path: |
5050
${{ env.CONDA_ENV_PATH }}
51-
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ env.DATE }}
51+
key: ${{ env.RUN_STAMP }}-conda-windows-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ env.DATE }}
5252
restore-keys: |
53-
${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-
53+
${{ env.RUN_STAMP }}-conda-windows-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-
5454
5555
- name: Update Conda env
5656
if: steps.conda-cache.cache-hit != 'true'
5757
run: |
5858
& $env:CONDA\condabin\conda.bat update conda
5959
& $env:CONDA\condabin\conda.bat env update -f omniscidb/scripts/mapd-deps-conda-windows-env.yml
6060
61+
- name: Save Conda env cache
62+
id: save-conda-cache
63+
uses: actions/cache/save@v3
64+
with:
65+
path: |
66+
${{ env.CONDA_ENV_PATH }}
67+
key: ${{ env.RUN_STAMP }}-conda-windows-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-${{ env.DATE }}
68+
6169
- name: Restore Maven cache
6270
uses: actions/cache@v3
6371
with:

.github/workflows/test-windows.yml

Lines changed: 7 additions & 5 deletions
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)