-
Notifications
You must be signed in to change notification settings - Fork 24
142 lines (129 loc) · 4.32 KB
/
update-cache.yml
File metadata and controls
142 lines (129 loc) · 4.32 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Update cache
on:
schedule:
- cron: '0 0 */7 * *'
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened, ready_for_review]
jobs:
update_cache:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
# ────────── source repo ──────────
- name: Checkout ARC
uses: actions/checkout@v4
# ────────── RMG‑Py ──────────
- name: Cache RMG
id: cache-rmg
uses: actions/cache@v4
with:
path: RMG-Py
key: ${{ runner.os }}-rmg-main
restore-keys: |
${{ runner.os }}-rmg-
- name: Checkout RMG-Py
if: steps.cache-rmg.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: ReactionMechanismGenerator/RMG-Py
path: RMG-Py
ref: 55464c54d1fa61b531e865682df598d33718597d
fetch-depth: 1
# ────────── RMG‑database ──────────
- name: Cache RMG-database
id: cache-rmg-db
uses: actions/cache@v4
with:
path: RMG-database
key: ${{ runner.os }}-rmgdb-main
restore-keys: |
${{ runner.os }}-rmgdb-
- name: Checkout RMG-database
if: steps.cache-rmg-db.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: ReactionMechanismGenerator/RMG-database
path: RMG-database
ref: main
fetch-depth: 1
# ────────── AutoTST ──────────
- name: Cache AutoTST
id: cache-autotst
uses: actions/cache@v4
with:
path: AutoTST
key: ${{ runner.os }}-autotst-main
restore-keys: |
${{ runner.os }}-autotst-
- name: Checkout AutoTST
if: steps.cache-autotst.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: ReactionMechanismGenerator/AutoTST
path: AutoTST
ref: main
fetch-depth: 1
# ────────── TS‑GCN ──────────
- name: Cache TS-GCN
id: cache-tsgcn
uses: actions/cache@v4
with:
path: TS-GCN
key: ${{ runner.os }}-tsgcn-main
restore-keys: |
${{ runner.os }}-tsgcn-
- name: Checkout TS-GCN
if: steps.cache-tsgcn.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: ReactionMechanismGenerator/TS-GCN
path: TS-GCN
ref: main
fetch-depth: 1
# ────────── KinBot ──────────
- name: Cache KinBot
id: cache-kinbot
uses: actions/cache@v4
with:
path: KinBot
key: ${{ runner.os }}-kinbot-2.0.6
restore-keys: |
${{ runner.os }}-kinbot-
- name: Checkout KinBot 2.0.6
if: steps.cache-kinbot.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: zadorlab/KinBot
path: KinBot
ref: v2.0.6
fetch-depth: 1
# ────────── Conda package cache ──────────
- name: Cache Conda packages
id: cache-conda-pkgs
uses: actions/cache@v4
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-0-${{ hashFiles('environment.yml') }}
# ────────── Create / restore env ──────────
- name: Setup ARC Env
uses: conda-incubator/setup-miniconda@v3.2.0
with:
auto-update-conda: true
environment-file: environment.yml
activate-environment: arc_env
miniconda-version: latest
conda-solver: libmamba
# ────────── Update env & save to cache ──────────
- name: Update environment
run: conda env update -n arc_env -f environment.yml
- name: Cache ARC env
if: github.event_name == 'push'
uses: actions/cache@v4
with:
path: ${{ env.CONDA }}/envs
key: conda-${{ runner.os }}-${{ runner.arch }}-0