-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (55 loc) · 1.69 KB
/
cache.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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: macos-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 requirements
shell: bash -l {0}
run: |
mamba install --quiet --file=requirements.txt
mamba install --quiet --file=test-requirements.txt
- name: install rubin_scheduler
shell: bash -l {0}
run: |
echo `pwd`
ls ${{ github.workspace }}
python -m pip install .
- 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 --force --tdqm_disable
- 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