diff --git a/.github/workflows/create-cache.yaml b/.github/workflows/create-cache.yaml index c3cdcea2..3d1f4b3d 100644 --- a/.github/workflows/create-cache.yaml +++ b/.github/workflows/create-cache.yaml @@ -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: @@ -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