From 37c4ba724007a8ccc8b9d26d1be174b624dbb810 Mon Sep 17 00:00:00 2001 From: "Brett M. Morris" Date: Thu, 27 Jul 2023 15:25:30 -0400 Subject: [PATCH] adding webbpsf data caching to GH actions --- .github/workflows/roman_ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/roman_ci.yml b/.github/workflows/roman_ci.yml index ff787c608..8d0ca7c3a 100644 --- a/.github/workflows/roman_ci.yml +++ b/.github/workflows/roman_ci.yml @@ -19,6 +19,25 @@ concurrency: cancel-in-progress: true jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Cache WebbPSF data + id: cache-webbpsf + uses: actions/cache@v3 + env: + cache-name: cache-webbpsf-data + with: + path: ./webbpsf-data + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + run: | # Get WebbPSF data files (just a subset of the full dataset!) and set up environment variable + wget https://stsci.box.com/shared/static/ykkvequ9cbble6qg88ldhjoep4m9ey6x.gz -O /tmp/minimal-webbpsf-data.tar.gz + tar -xzvf /tmp/minimal-webbpsf-data.tar.gz + echo "WEBBPSF_PATH=${{github.workspace}}/webbpsf-data" >> $GITHUB_ENV crds: name: retrieve current CRDS context runs-on: ubuntu-latest