Skip to content

Commit

Permalink
use generalized cache path
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Jul 17, 2024
1 parent 5245dc5 commit 0ff04b1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 29 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/roman_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ jobs:
with:
envs: |
- linux: check-dependencies
webbpsf_data_cache_key:
webbpsf_data_cache:
uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@develop
with:
minimal: true
crds_contexts:
uses: spacetelescope/crds/.github/workflows/contexts.yml@master
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
needs: [ webbpsf_data_cache_key, crds_contexts ]
needs: [ webbpsf_data_cache, crds_contexts ]
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
setenv: |
WEBBPSF_PATH: $RUNNER_TEMP/webbpsf-data/
CRDS_PATH: $RUNNER_TEMP/crds_cache/
WEBBPSF_PATH: ${{ needs.webbpsf_data_cache.outputs.cache_path }}/webbpsf-data/
CRDS_PATH: ${{ needs.webbpsf_data_cache.outputs.cache_path }}/crds_cache/
CRDS_SERVER_URL: https://roman-crds.stsci.edu
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
Expand All @@ -48,11 +48,9 @@ jobs:
DD_GIT_REPOSITORY_URL: ${{ github.repositoryUrl }}
DD_GIT_COMMIT_SHA: ${{ github.sha }}
DD_GIT_BRANCH: ${{ github.ref_name }}
cache-path: |
$RUNNER_TEMP/webbpsf-data
$RUNNER_TEMP/crds_cache
cache-key: data-${{ needs.webbpsf_data_cache_key.outputs.cache_key }}-${{ needs.crds_contexts.outputs.roman }}
cache-restore-keys: ${{ needs.webbpsf_data_cache_key.outputs.cache_key }}
cache-path: ${{ needs.webbpsf_data_cache.outputs.cache_path }}
cache-key: data-${{ needs.webbpsf_data_cache.outputs.cache_key }}-${{ needs.crds_contexts.outputs.roman }}
cache-restore-keys: ${{ needs.webbpsf_data_cache.outputs.cache_key }}
envs: |
- linux: py310-oldestdeps-webbpsf-cov
pytest-results-summary: true
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/roman_ci_cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency:
cancel-in-progress: true

jobs:
webbpsf_data_cache_key:
webbpsf_data_cache:
if: (github.repository == 'spacetelescope/romancal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run scheduled tests')))
uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@develop
with:
Expand All @@ -32,23 +32,20 @@ jobs:
if: (github.repository == 'spacetelescope/romancal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run scheduled tests')))
uses: spacetelescope/crds/.github/workflows/contexts.yml@master
test:
if: (github.repository == 'spacetelescope/romancal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run scheduled tests')))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
needs: [ webbpsf_data_cache_key, crds_contexts ]
needs: [ webbpsf_data_cache, crds_contexts ]
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
setenv: |
WEBBPSF_PATH: $RUNNER_TEMP/data/webbpsf_data/
CRDS_PATH: $RUNNER_TEMP/data/crds_cache/
WEBBPSF_PATH: ${{ needs.webbpsf_data_cache.outputs.cache_path }}/webbpsf-data/
CRDS_PATH: ${{ needs.webbpsf_data_cache.outputs.cache_path }}/crds_cache/
CRDS_SERVER_URL: https://roman-crds.stsci.edu
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
cache-path: |
$RUNNER_TEMP/webbpsf-data/
$RUNNER_TEMP/crds_cache/
cache-key: data-${{ needs.webbpsf_data_cache_key.outputs.cache_key }}-${{ needs.crds_contexts.outputs.roman }}
cache-restore-keys: ${{ needs.webbpsf_data_cache_key.outputs.cache_key }}
cache-path: ${{ needs.webbpsf_data_cache.outputs.cache_path }}
cache-key: data-${{ needs.webbpsf_data_cache.outputs.cache_key }}-${{ needs.crds_contexts.outputs.roman }}
cache-restore-keys: ${{ needs.webbpsf_data_cache.outputs.cache_key }}
envs: |
- macos: py310-webbpsf
pytest-results-summary: true
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/tests_devdeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ concurrency:
cancel-in-progress: true

jobs:
webbpsf_data_cache_key:
webbpsf_data_cache:
if: (github.repository == 'spacetelescope/romancal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run devdeps tests')))
uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@develop
with:
Expand All @@ -33,21 +33,18 @@ jobs:
if: (github.repository == 'spacetelescope/romancal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run devdeps tests')))
uses: spacetelescope/crds/.github/workflows/contexts.yml@master
test:
if: (github.repository == 'spacetelescope/romancal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run devdeps tests')))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
needs: [ webbpsf_data_cache_key, crds_contexts ]
needs: [ webbpsf_data_cache, crds_contexts ]
with:
setenv: |
WEBBPSF_PATH: $RUNNER_TEMP/webbpsf-data/
CRDS_PATH: $RUNNER_TEMP/crds_cache/
WEBBPSF_PATH: ${{ needs.webbpsf_data_cache.outputs.cache_path }}/webbpsf-data/
CRDS_PATH: ${{ needs.webbpsf_data_cache.outputs.cache_path }}/crds_cache/
CRDS_SERVER_URL: https://roman-crds.stsci.edu
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
cache-path: |
$RUNNER_TEMP/webbpsf-data/
$RUNNER_TEMP/crds_cache/
cache-key: data-${{ needs.webbpsf_data_cache_key.outputs.cache_key }}-${{ needs.crds_contexts.outputs.roman }}
cache-restore-keys: ${{ needs.webbpsf_data_cache_key.outputs.cache_key }}
cache-path: ${{ needs.webbpsf_data_cache.outputs.cache_path }}
cache-key: data-${{ needs.webbpsf_data_cache.outputs.cache_key }}-${{ needs.crds_contexts.outputs.roman }}
cache-restore-keys: ${{ needs.webbpsf_data_cache.outputs.cache_key }}
envs: |
- linux: py310-stdevdeps-webbpsf
- linux: py310-devdeps-webbpsf
Expand Down

0 comments on commit 0ff04b1

Please sign in to comment.