Skip to content

Commit bda0a2f

Browse files
Illviljandcherian
andauthored
Use micromamba in ASV benchmark workflow (#6926)
* Use micromamba in asv workflow * asv in extra-specs and cache environment key * Update .github/workflows/benchmarks.yml Co-authored-by: Deepak Cherian <[email protected]> Co-authored-by: Deepak Cherian <[email protected]>
1 parent 28647ea commit bda0a2f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/benchmarks.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ubuntu-20.04
1313
env:
1414
ASV_DIR: "./asv_bench"
15+
CONDA_ENV_FILE: ci/requirements/environment.yml
1516

1617
steps:
1718
# We need the full repo to avoid this issue
@@ -20,17 +21,16 @@ jobs:
2021
with:
2122
fetch-depth: 0
2223

23-
- name: Setup Miniconda
24-
uses: conda-incubator/setup-miniconda@v2
24+
- name: Set up conda environment
25+
uses: mamba-org/provision-with-micromamba@v12
2526
with:
26-
# installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
27-
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
27+
environment-file: ${{env.CONDA_ENV_FILE}}
28+
environment-name: xarray-tests
29+
cache-env: true
30+
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
31+
extra-specs: |
32+
asv
2833
29-
- name: Setup some dependencies
30-
shell: bash -l {0}
31-
run: |
32-
pip install asv
33-
sudo apt-get update -y
3434
3535
- name: Run benchmarks
3636
shell: bash -l {0}

0 commit comments

Comments
 (0)