@@ -2,128 +2,136 @@ name: Update cache
22
33on :
44 schedule :
5- - cron : " 0 0 */7 * *"
5+ - cron : ' 0 0 */7 * *'
66 push :
7- branches :
8- - main
7+ branches : [ main ]
98
109jobs :
1110 update_cache :
1211 runs-on : ubuntu-latest
1312 defaults :
1413 run :
15- shell : bash -el {0}
14+ shell : bash -el {0}
15+
1616 steps :
17+ # ────────── source repo ──────────
1718 - name : Checkout ARC
18- uses : actions/checkout@v3
19-
19+ uses : actions/checkout@v4
20+
21+ # ────────── RMG‑Py ──────────
2022 - name : Cache RMG
2123 id : cache-rmg
22- uses : actions/cache@v2
24+ uses : actions/cache@v4
2325 with :
24- path : RMG-Py
25- key : ${{ runner.os }}-rmg-main
26-
27- - name : Checkout RMG
28- uses : actions/checkout@v3
26+ path : RMG-Py
27+ key : ${{ runner.os }}-rmg-main
28+ restore-keys : |
29+ ${{ runner.os }}-rmg-
30+ - name : Checkout RMG-Py
31+ if : steps.cache-rmg.outputs.cache-hit != 'true'
32+ uses : actions/checkout@v4
2933 with :
30- repository : ReactionMechanismGenerator/RMG-Py
31- path : RMG-Py
32- ref : main
33- fetch-depth : 1
34+ repository : ReactionMechanismGenerator/RMG-Py
35+ path : RMG-Py
36+ ref : 55464c54d1fa61b531e865682df598d33718597d
37+ fetch-depth : 1
3438
39+ # ────────── RMG‑database ──────────
3540 - name : Cache RMG-database
3641 id : cache-rmg-db
37- uses : actions/cache@v2
42+ uses : actions/cache@v4
3843 with :
39- path : RMG-database
40- key : ${{ runner.os }}-rmgdb-main
41-
44+ path : RMG-database
45+ key : ${{ runner.os }}-rmgdb-main
46+ restore-keys : |
47+ ${{ runner.os }}-rmgdb-
4248 - name : Checkout RMG-database
43- uses : actions/checkout@v3
49+ if : steps.cache-rmg-db.outputs.cache-hit != 'true'
50+ uses : actions/checkout@v4
4451 with :
45- repository : ReactionMechanismGenerator/RMG-database
46- path : RMG-database
47- ref : main
48- fetch-depth : 1
49-
52+ repository : ReactionMechanismGenerator/RMG-database
53+ path : RMG-database
54+ ref : main
55+ fetch-depth : 1
56+
57+ # ────────── AutoTST ──────────
5058 - name : Cache AutoTST
5159 id : cache-autotst
52- uses : actions/cache@v2
60+ uses : actions/cache@v4
5361 with :
54- path : AutoTST
55- key : ${{ runner.os }}-autotst-main
56- restore-keys : |
57- ${{ runner.os }}-autotst-
62+ path : AutoTST
63+ key : ${{ runner.os }}-autotst-main
64+ restore-keys : |
65+ ${{ runner.os }}-autotst-
5866 - name : Checkout AutoTST
5967 if : steps.cache-autotst.outputs.cache-hit != 'true'
60- uses : actions/checkout@v3
68+ uses : actions/checkout@v4
6169 with :
62- repository : ReactionMechanismGenerator/AutoTST
63- path : AutoTST
64- ref : main
65- fetch-depth : 1
66-
70+ repository : ReactionMechanismGenerator/AutoTST
71+ path : AutoTST
72+ ref : main
73+ fetch-depth : 1
74+
75+ # ────────── TS‑GCN ──────────
6776 - name : Cache TS-GCN
6877 id : cache-tsgcn
69- uses : actions/cache@v2
78+ uses : actions/cache@v4
7079 with :
71- path : TS-GCN
72- key : ${{ runner.os }}-tsgcn-main
73- restore-keys : |
74- ${{ runner.os }}-tsgcn-
80+ path : TS-GCN
81+ key : ${{ runner.os }}-tsgcn-main
82+ restore-keys : |
83+ ${{ runner.os }}-tsgcn-
7584 - name : Checkout TS-GCN
7685 if : steps.cache-tsgcn.outputs.cache-hit != 'true'
77- uses : actions/checkout@v3
86+ uses : actions/checkout@v4
7887 with :
79- repository : ReactionMechanismGenerator/TS-GCN
80- path : TS-GCN
81- ref : main
82- fetch-depth : 1
83-
88+ repository : ReactionMechanismGenerator/TS-GCN
89+ path : TS-GCN
90+ ref : main
91+ fetch-depth : 1
92+
93+ # ────────── KinBot ──────────
8494 - name : Cache KinBot
8595 id : cache-kinbot
86- uses : actions/cache@v2
96+ uses : actions/cache@v4
8797 with :
88- path : KinBot
89- key : ${{ runner.os }}-kinbot-2.0.6
90- restore-keys : |
91- ${{ runner.os }}-kinbot-
92-
93- - name : Checkout Kinbot 2.0.6
98+ path : KinBot
99+ key : ${{ runner.os }}-kinbot-2.0.6
100+ restore-keys : |
101+ ${{ runner.os }}-kinbot-
102+ - name : Checkout KinBot 2.0.6
94103 if : steps.cache-kinbot.outputs.cache-hit != 'true'
95- uses : actions/checkout@v3
104+ uses : actions/checkout@v4
96105 with :
97- repository : zadorlab/KinBot
98- path : KinBot
99- ref : v2.0.6
100- fetch-depth : 1
101-
102- - name : Cache Packages Packages
103- uses : actions/cache@v2
104- env :
105- CACHE_NUMBER : 0
106+ repository : zadorlab/KinBot
107+ path : KinBot
108+ ref : v2.0.6
109+ fetch-depth : 1
110+
111+ # ────────── Conda package cache ──────────
112+ - name : Cache Conda packages
113+ id : cache-conda-pkgs
114+ uses : actions/cache@v4
106115 with :
107- path : ~/conda_pkgs_dir
108- key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
116+ path : ~/conda_pkgs_dir
117+ key : ${{ runner.os }}-conda-0-${{ hashFiles('environment.yml') }}
118+
119+ # ────────── Create / restore env ──────────
109120 - name : Setup ARC Env
110- uses : conda-incubator/setup-miniconda@v3
121+ uses : conda-incubator/setup-miniconda@v3.2.0
111122 with :
112- auto-update-conda : true
113- environment-file : environment.yml
114- activate-environment : arc_env
115- miniconda-version : latest
116- conda-solver : libmamba
117-
123+ auto-update-conda : true
124+ environment-file : environment.yml
125+ activate-environment : arc_env
126+ miniconda-version : latest
127+ conda-solver : libmamba
128+
129+ # ────────── Update env & save to cache ──────────
130+ - name : Update environment
131+ run : mamba env update -n arc_env -f environment.yml
132+
118133 - name : Cache ARC env
119- uses : actions/cache@v2
134+ uses : actions/cache@v4
120135 with :
121- path : ${{ env.CONDA }}/envs
122- key : conda-${{ runner.os }}--${{ runner.arch }}--${{ env.CACHE_NUMBER}}
123- env :
124- # Increase this value to reset cache if etc/example-environment.yml has not changed
125- CACHE_NUMBER : 0
126- id : cache-arc-env
127- - name : Update environment
128- run : conda env update -n arc_env -f environment.yml
129- if : steps.cache-arc-env.outputs.cache-hit != 'true'
136+ path : ${{ env.CONDA }}/envs
137+ key : conda-${{ runner.os }}-${{ runner.arch }}-0
0 commit comments