Skip to content

Cache rubin-sim-data #384

Cache rubin-sim-data

Cache rubin-sim-data #384

Workflow file for this run

name: Cache rubin-sim-data
on:
# Run job at the end of each day
schedule:
- cron: "0 0 * * *"
# and on manual workflow
workflow_dispatch:
jobs:
make-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-variant: Miniforge3
channels: conda-forge,defaults
use-mamba: true
channel-priority: strict
show-channel-urls: true
- name: Configure conda and install minimal requirements for cache
shell: bash -l {0}
run: |
mamba install --quiet rubin-scheduler -c conda-forge
- name: Install rubin_sim from git
shell: bash -l {0}
run: |
echo `pwd`
ls ${{ github.workspace }}
python -m pip install -e . --no-deps
- name: Access rubin-sim-data cache
id: cache-rs
uses: actions/cache@v4
env:
cache-name: cached-rubin-sim-data
with:
path: ~/rubin_sim_data
key: ${{ env.cache-name }}
restore-keys: |
${{ env.cache-name }}
- name: Download data.
shell: bash -l {0}
run: |
export RUBIN_SIM_DATA_DIR=~/rubin_sim_data
scheduler_download_data --tdqm_disable --update
rs_download_testing
- name: Check data
shell: bash -l {0}
run: |
export RUBIN_SIM_DATA_DIR=~/rubin_sim_data
echo $RUBIN_SIM_DATA_DIR contents
ls $RUBIN_SIM_DATA_DIR
echo "__contents of versions.txt__"
cat $RUBIN_SIM_DATA_DIR/versions.txt