From dc58dc9756c9bb4405449fbb9a4c5001d1b7ba03 Mon Sep 17 00:00:00 2001 From: AbhinavOhri Date: Wed, 22 May 2024 14:56:55 +0530 Subject: [PATCH] Updating the worfklow to use atomic data from cache rather than downloading it. --- .github/workflows/build-docs.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 00153800b6a..e8adeaa3292 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -24,7 +24,8 @@ on: env: CACHE_NUMBER: 0 # increase to reset cache manually DEPLOY_BRANCH: gh-pages # deployed docs branch - HDF5_USE_FILE_LOCKING: "FALSE" # disable file locking + HDF5_USE_FILE_LOCKING: "FALSE" # disable file lockingenv: + ATOM_DATA_PATH: Downloads/tardis_data/kurucz_cd23_chianti_H_He.h5 #Path where the atomic data is stored concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -94,6 +95,27 @@ jobs: echo "file_hash=$file_hash" >> "${GITHUB_OUTPUT}" id: cache-environment-key + - name: Restore Atom Data + uses: actions/cache/restore@v3 + id: atom-data-restore + with: + path: ${{env.ATOM_DATA_PATH}} + key: atom-data + + - name: Download Atom Data + if: steps.atom-data-restore.outputs.cache-hit != 'true' + run: | + REPO_URL="https://dev.azure.com/tardis-sn/TARDIS/_apis/git/repositories/tardis-refdata" + wget -q "$REPO_URL/items?path=atom_data/kurucz_cd23_chianti_H_He.h5&versionType=branch&version=master&resolveLfs=true" -O ${{ env.ATOM_DATA_PATH }} + + - name: Save Atom Data + uses: actions/cache/save@v3 + if: ${{ steps.atom-data-restore.outputs.cache-hit != 'true' && always() || false }} + id: atom-data-cache-save + with: + path: ${{env.ATOM_DATA_PATH}} + key: atom-data + - uses: mamba-org/setup-micromamba@v1 with: environment-file: conda-linux-64.lock