Skip to content

Commit

Permalink
Add cache for Micromamba installation
Browse files Browse the repository at this point in the history
This endpoint sometimes fails to resolve, so caching as a fallback
should help.
  • Loading branch information
victorlin committed Jan 18, 2024
1 parent 4c25ecf commit 6aead8f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,26 @@ jobs:
name: build and test (os=${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
# First, restore Micromamba from cache in case the installation script is not reachable.
- name: Restore Micromamba from cache
uses: actions/cache/restore@v4
with:
path: ~/.local/bin/micromamba
# Cache should remain for 7 days from last usage.
# <https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy>
key: ${{ runner.os }}-micromamba

- name: Install Micromamba
run: |
curl -fsSL --proto 'https=' https://micro.mamba.pm/install.sh | bash
echo ~/.local/bin >> "$GITHUB_PATH"
- name: Save Micromamba to cache
uses: actions/cache/save@v4
with:
path: ~/.local/bin/micromamba
key: ${{ runner.os }}-micromamba

- uses: actions/checkout@v3

- run: ./devel/setup
Expand Down

0 comments on commit 6aead8f

Please sign in to comment.