Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
60 changes: 60 additions & 0 deletions .github/workflows/create-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
TEST_DATA_PATH: ./test_data/8.1.3/c12_6ranks_standard
TEST_DATA_URL: "https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data"

jobs:
# GitHub Actions cache of the pre-commit environment
pre-commit:
Expand All @@ -42,3 +46,59 @@ jobs:
run: |
pip install pre-commit
pre-commit install --install-hooks

# GitHub Actions cache of the translate test data

# GitHub Actions cache of pyFV3 test data
pyFV3-data:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- uses: actions/cache@v4
id: cache
with:
path: pyFV3/test_data
key: ${{ env.TEST_DATA_PATH }}/dycore
lookup-only: true # don't actually download the cache

- name: Download test_data (if not already cached)
if: steps.cache.outputs.cache-hit != 'true'
run: |
mkdir -p pyFV3/test_data && cd pyFV3/test_data
wget "${{ env.TEST_DATA_URL }}/8.1.3_c12_6ranks_standard.tar.gz"
tar -xzvf 8.1.3_c12_6ranks_standard.tar.gz
rm 8.1.3_c12_6ranks_standard.tar.gz

# GitHub Actions cache of pySHiELD test data
pySHiELD-data:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- uses: actions/cache@v4
id: cache
with:
path: pySHiELD/test_data
key: ${{ env.TEST_DATA_PATH }}/physics
lookup-only: true # don't actually download the cache

- name: Download test data (if not already cached)
if: steps.cache.outputs.cache-hit != 'true'
run: |
mkdir -p pySHiELD/test_data && cd pySHiELD/test_data
wget "${{ env.TEST_DATA_URL }}/8.1.3_c12_6ranks_baroclinic.physics.tar.gz"
tar -xzvf 8.1.3_c12_6ranks_baroclinic.physics.tar.gz
rm 8.1.3_c12_6ranks_baroclinic.physics.tar.gz