Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] set a generalized cache path, allowing multiple data caches to be combined downstream #883

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ jobs:
- name: Get WebbPSF Data
uses: actions/cache/restore@v4
with:
path: ${{ runner.temp }}/webbpsf-data
path: ${{ needs.retrieve_cache.outputs.cache_path }}
key: ${{ needs.retrieve_cache.outputs.cache_key }}

- name: Set WebbPSF data path
run: echo "WEBBPSF_PATH=${{ runner.temp }}/webbpsf-data" >> $GITHUB_ENV
run: echo "WEBBPSF_PATH=${{ needs.retrieve_cache.outputs.cache_path }}/webbpsf-data/" >> $GITHUB_ENV

- name: Check conda info
run: conda info
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/download_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: wget ${{ (github.event_name == 'schedule' || github.event_name == 'release') && env.MINIMAL_DATA_URL || inputs.minimal && env.MINIMAL_DATA_URL || env.DATA_URL }} -O ${{ runner.temp }}/webbpsf-data.tar.gz
- run: tar -xzvf ${{ runner.temp }}/webbpsf-data.tar.gz -C ${{ runner.temp }}
- run: tar -xzvf ${{ runner.temp }}/webbpsf-data.tar.gz -C ${{ runner.temp }}/data/
- id: cache_path
run: echo cache_path=${{ runner.temp }}/webbpsf-data >> $GITHUB_OUTPUT
run: echo cache_path=${{ runner.temp }}/data/ >> $GITHUB_OUTPUT
- id: version
run: echo "version=$(cat ${{ steps.cache_path.outputs.cache_path }}/version.txt)" >> $GITHUB_OUTPUT
- id: cache_key
run: echo "cache_key=webbpsf-data-${{ (github.event_name == 'schedule' || github.event_name == 'release') && 'mini' || inputs.minimal && 'mini' || 'full' }}-${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
- uses: actions/cache/save@v4
with:
path: ${{ runner.temp }}/webbpsf-data
path: ${{ runner.temp }}/data/
key: ${{ steps.cache_key.outputs.cache_key }}
outputs:
version: ${{ steps.version.outputs.version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/retrieve_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ jobs:
run: echo "version=$(${{ steps.latest_cache_key.outputs.cache_key }} | awk -F '-' '{print $4}')" >> $GITHUB_OUTPUT
outputs:
version: ${{ steps.version.outputs.version }}
cache_path: ${{ runner.temp }}/webbpsf-data
cache_path: ${{ runner.temp }}/data/
cache_key: ${{ steps.latest_cache_key.outputs.cache_key }}
Loading