Update cache #350
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |