-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Set environment cache key based on current week of year to avoid …
…outdated cache in the "Setup Micromamba" step (#3234)
- Loading branch information
Showing
4 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,10 @@ jobs: | |
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
- name: Get current week number of year | ||
id: date | ||
run: echo "date=$(date +%Y-W%W)" >> $GITHUB_OUTPUT # e.g., 2024-W19 | ||
|
||
# Install Micromamba with conda-forge dependencies | ||
- name: Setup Micromamba | ||
uses: mamba-org/[email protected] | ||
|
@@ -85,6 +89,8 @@ jobs: | |
- nodefaults | ||
cache-downloads: false | ||
cache-environment: true | ||
# environment cache is persistent for one week. | ||
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }} | ||
create-args: >- | ||
python=3.12 | ||
gmt=6.5.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,6 +99,10 @@ jobs: | |
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
- name: Get current week number of year | ||
id: date | ||
run: echo "date=$(date +%Y-W%W)" >> $GITHUB_OUTPUT # e.g., 2024-W19 | ||
|
||
# Install Micromamba with conda-forge dependencies | ||
- name: Setup Micromamba | ||
uses: mamba-org/[email protected] | ||
|
@@ -110,6 +114,8 @@ jobs: | |
- nodefaults | ||
cache-downloads: false | ||
cache-environment: true | ||
# environment cache is persistent for one week. | ||
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }} | ||
create-args: >- | ||
python=${{ matrix.python-version }}${{ matrix.optional-packages }} | ||
gmt=6.5.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,10 @@ jobs: | |
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
- name: Get current week number of year | ||
id: date | ||
run: echo "date=$(date +%Y-W%W)" >> $GITHUB_OUTPUT # e.g., 2024-W19 | ||
|
||
# Install Micromamba with conda-forge dependencies | ||
- name: Setup Micromamba | ||
uses: mamba-org/[email protected] | ||
|
@@ -63,6 +67,8 @@ jobs: | |
- nodefaults | ||
cache-downloads: false | ||
cache-environment: true | ||
# environment cache is persistent for one week. | ||
cache-environment-key: micromamba-environment-${{ steps.date.outputs.date }} | ||
create-args: >- | ||
python=3.12 | ||
cmake | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters