Skip to content

Commit 1db7b62

Browse files
author
tilo-14
committed
ci: skip AVM install on cache hit
1 parent a35d669 commit 1db7b62

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/actions/setup/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ runs:
6969

7070
- name: Cache AVM and Anchor
7171
if: inputs.node-version != ''
72+
id: cache-avm
7273
uses: actions/cache@v4
7374
with:
7475
path: |
@@ -98,13 +99,18 @@ runs:
9899
fi
99100
100101
- name: Install Anchor CLI
101-
if: inputs.node-version != ''
102+
if: inputs.node-version != '' && steps.cache-avm.outputs.cache-hit != 'true'
102103
shell: bash
103104
run: |
104105
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
105106
avm install ${{ inputs.anchor-version }}
106107
avm use ${{ inputs.anchor-version }}
107108
109+
- name: Set Anchor version
110+
if: inputs.node-version != '' && steps.cache-avm.outputs.cache-hit == 'true'
111+
shell: bash
112+
run: avm use ${{ inputs.anchor-version }}
113+
108114
- name: Install Light CLI
109115
shell: bash
110116
run: npm install -g @lightprotocol/zk-compression-cli@0.27.1-alpha.2

0 commit comments

Comments
 (0)