Skip to content

Commit cfa5d1b

Browse files
committed
Make CI more reliable
1 parent 15a7c4d commit cfa5d1b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/actions/setup-numba-dpex/action.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,31 @@ inputs:
99
environment-name:
1010
description: Environment name
1111
default: work-env
12+
python-version:
13+
description: Python version
14+
default: 3.9
1215
runs:
1316
using: "composite"
1417
steps:
18+
- name: Cache conda
19+
uses: actions/cache@v2
20+
env:
21+
# Increase this value to reset cache if etc/example-environment.yml has not changed
22+
CACHE_NUMBER: 0
23+
with:
24+
path: ~/conda_pkgs_dir
25+
key:
26+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
27+
inputs.python-version }}-${{ hashFiles('${{ inputs.environment }}') }}
1528
- uses: conda-incubator/setup-miniconda@v2
1629
with:
17-
python-version: 3.9
30+
python-version: ${{ inputs.python-version }}
31+
miniforge-variant: Mambaforge
32+
miniforge-version: latest
1833
activate-environment: "${{ inputs.environment-name }}"
1934
channel-priority: "disabled"
2035
environment-file: "${{ inputs.environment }}"
36+
# use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
2137

2238
- name: Test conda environment
2339
shell: bash -l {0}

0 commit comments

Comments
 (0)