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

Commit 4b5052d

Browse files
committed
[CI] Enable Conda cache
This commit enables caching check and unifies cache keys. Signed-off-by: Dmitrii Makarenko <[email protected]>
1 parent 1006e9b commit 4b5052d

File tree

4 files changed

+49
-12
lines changed

4 files changed

+49
-12
lines changed

.github/workflows/build-windows.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Restore Conda env cache
4646
id: conda-cache
47-
uses: actions/cache@v3
47+
uses: actions/cache/restore@v3
4848
with:
4949
path: |
5050
${{ env.CONDA_ENV_PATH }}
@@ -53,11 +53,20 @@ jobs:
5353
${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-windows-env.yml') }}-
5454
5555
- name: Update Conda env
56-
if: steps.conda-cache.cache-hit != 'true'
56+
if: steps.conda-cache.outputs.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+
if: steps.conda-cache.outputs.cache-hit != 'true'
63+
uses: actions/cache/save@v3
64+
with:
65+
path: |
66+
${{ env.CONDA_ENV_PATH }}
67+
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
68+
69+
6170
- name: Restore Maven cache
6271
uses: actions/cache@v3
6372
with:

.github/workflows/build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
4646
- name: Restore Conda env cache
4747
id: conda-cache
48-
uses: actions/cache@v3
48+
uses: actions/cache/restore@v3
4949
with:
5050
path: |
5151
${{ env.CONDA_ENV_PATH }}
@@ -54,7 +54,7 @@ jobs:
5454
${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-
5555
5656
- name: Update Conda env
57-
if: steps.conda-cache.cache-hit != 'true'
57+
if: steps.conda-cache.outputs.cache-hit != 'true'
5858
run: |
5959
conda update conda
6060
conda env update -f omniscidb/scripts/mapd-deps-conda-dev-env.yml
@@ -80,6 +80,15 @@ jobs:
8080
sudo dpkg -i intel-igc-core_1.0.12812.24_amd64.deb intel-level-zero-gpu_1.3.25018.24_amd64.deb libigdgmm12_22.3.0_amd64.deb intel-igc-opencl_1.0.12812.24_amd64.deb
8181
conda install -n omnisci-dev -c conda-forge level-zero-devel pkg-config
8282
83+
- name: Save Conda env cache
84+
if: steps.conda-cache.outputs.cache-hit != 'true'
85+
uses: actions/cache/save@v3
86+
with:
87+
path: |
88+
${{ env.CONDA_ENV_PATH }}
89+
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
90+
91+
8392
- name: Restore Maven cache
8493
uses: actions/cache@v3
8594
with:

.github/workflows/modin.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,33 @@ jobs:
2323

2424
- name: Set env context
2525
run: |
26-
echo RUN_STAMP=${{ runner.os }}-${{ (env.cuda_compiler_version != 'None') && format('cuda{0}', env.cuda_compiler_version) || 'cpu' }} >>$GITHUB_ENV
26+
echo RUN_STAMP=${{ runner.os }}-cpu >>$GITHUB_ENV
2727
echo CONDA_ENV_PATH=$CONDA/envs/${{ env.CONDA_ENV }} >>$GITHUB_ENV
2828
29-
- name: Update Conda
29+
- name: Restore Conda env cache
30+
id: restore-conda-cache
31+
uses: actions/cache/restore@v3
32+
with:
33+
path: |
34+
${{ env.CONDA_ENV_PATH }}
35+
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
36+
restore-keys: |
37+
${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-
38+
39+
- name: Update Conda env
40+
if: steps.restore-conda-cache.outputs.cache-hit != 'true'
3041
run: |
3142
conda update conda
3243
conda env update -f omniscidb/scripts/mapd-deps-conda-dev-env.yml
3344
45+
- name: Save Conda env cache
46+
if: steps.restore-conda-cache.outputs.cache-hit != 'true'
47+
uses: actions/cache/save@v3
48+
with:
49+
path: |
50+
${{ env.CONDA_ENV_PATH }}
51+
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
52+
3453
- name: Restore Maven cache
3554
uses: actions/cache@v3
3655
with:

.github/workflows/pytest.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set env context
1717
run: |
1818
echo CONDA_PATH=$CONDA >>$GITHUB_ENV
19-
echo RUN_STAMP=${{ runner.os }}-${{ (env.cuda_compiler_version != 'None') && format('cuda{0}', env.cuda_compiler_version) || 'cpu' }} >>$GITHUB_ENV
19+
echo RUN_STAMP=${{ runner.os }}-cpu >>$GITHUB_ENV
2020
echo CONDA_ENV_PATH=$CONDA/envs/${{ env.CONDA_ENV }} >>$GITHUB_ENV
2121
2222
- name: Restore Conda env cache
@@ -25,23 +25,23 @@ jobs:
2525
with:
2626
path: |
2727
${{ env.CONDA_ENV_PATH }}
28-
key: ${{ env.RUN_STAMP }}-conda-pytest-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
28+
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
2929
restore-keys: |
30-
${{ env.RUN_STAMP }}-conda-pytest-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-
30+
${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-
3131
3232
- name: Update Conda env
33-
if: steps.conda-cache.cache-hit != 'true'
33+
if: steps.restore-conda-cache.outputs.cache-hit != 'true'
3434
run: |
3535
conda update conda
3636
conda env update -f omniscidb/scripts/mapd-deps-conda-dev-env.yml
3737
3838
- name: Save Conda env cache
39-
id: save-conda-cache
39+
if: steps.restore-conda-cache.outputs.cache-hit != 'true'
4040
uses: actions/cache/save@v3
4141
with:
4242
path: |
4343
${{ env.CONDA_ENV_PATH }}
44-
key: ${{ env.RUN_STAMP }}-conda-pytest-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
44+
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
4545

4646
- name: Restore Maven cache
4747
uses: actions/cache@v3

0 commit comments

Comments
 (0)