Skip to content

Commit

Permalink
cache sncosmo and dustmap files
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodlz committed Oct 7, 2024
1 parent 1e03f86 commit 7403dc9
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/build-test-doc_upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ on:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
jobs:
build-test-doc:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:

if: github.repository_owner == 'fritz' && github.event.pull_request.draft == false

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
Expand All @@ -25,18 +33,38 @@ jobs:
with:
node-version: 20

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package.json') }}

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-${{ hashFiles('**/requirements*.txt') }}

# caching dustmap & sncosmo files is dependent on their corresponding
# python package versions, so we use that as the cache key
- uses: actions/cache@v4
with:
path: |
persistentdata/dustmap/sfd
key: ${{ runner.os }}-dustmap-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-dustmap-${{ hashFiles('**/requirements*.txt') }}
${{ runner.os }}-dustmap-
- uses: actions/cache@v4
with:
path: |
~/.astropy/cache/sncosmo/bandpasses
key: ${{ runner.os }}-sncosmo-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-sncosmo-${{ hashFiles('**/requirements*.txt') }}
${{ runner.os }}-sncosmo-
- name: Install system dependencies
run: |
sudo apt update -y && sudo apt install -y libcurl4-gnutls-dev libgnutls28-dev
Expand Down

0 comments on commit 7403dc9

Please sign in to comment.