fix(gha): fixed anchor install caching
This commit is contained in:
parent
96257bf437
commit
92c2929833
|
@ -87,31 +87,52 @@ runs:
|
||||||
solana --version
|
solana --version
|
||||||
|
|
||||||
# Install Anchor
|
# Install Anchor
|
||||||
- name: Setup AVM Cache
|
- name: Setup Anchor Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
id: cache-avm-cli
|
id: cache-anchor-cli
|
||||||
|
if: inputs.anchor-version != ''
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
key: ${{ runner.os }}-avm
|
key: anchor-cli-${{ runner.os }}-${{ inputs.anchor-version }}
|
||||||
- name: Install AVM
|
- name: Install Anchor
|
||||||
if: steps.cache-avm-cli.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: steps.cache-anchor-cli.outputs.cache-hit != 'true'
|
||||||
run:
|
run:
|
||||||
cargo install --git https://github.com/project-serum/anchor avm --locked
|
cargo install --git https://github.com/coral-xyz/anchor --tag
|
||||||
--force
|
v"${{inputs.anchor-version }}" anchor-cli --locked
|
||||||
- name: Set Anchor Version
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
avm install ${{ inputs.anchor-version }}
|
|
||||||
avm use ${{ inputs.anchor-version }}
|
|
||||||
- name: Verify Anchor install
|
- name: Verify Anchor install
|
||||||
shell: bash
|
shell: bash
|
||||||
run: anchor --version
|
run: anchor --version
|
||||||
|
|
||||||
|
# - name: Setup AVM Cache
|
||||||
|
# uses: actions/cache@v3
|
||||||
|
# id: cache-avm-cli
|
||||||
|
# with:
|
||||||
|
# path: |
|
||||||
|
# ~/.cargo/bin/
|
||||||
|
# ~/.cargo/registry/index/
|
||||||
|
# ~/.cargo/registry/cache/
|
||||||
|
# ~/.cargo/git/db/
|
||||||
|
# key: ${{ runner.os }}-avm
|
||||||
|
# - name: Install AVM
|
||||||
|
# if: steps.cache-avm-cli.outputs.cache-hit != 'true'
|
||||||
|
# shell: bash
|
||||||
|
# run:
|
||||||
|
# cargo install --git https://github.com/project-serum/anchor avm --locked
|
||||||
|
# --force
|
||||||
|
# - name: Set Anchor Version
|
||||||
|
# shell: bash
|
||||||
|
# run: |
|
||||||
|
# avm install ${{ inputs.anchor-version }}
|
||||||
|
# avm use ${{ inputs.anchor-version }}
|
||||||
|
# - name: Verify Anchor install
|
||||||
|
# shell: bash
|
||||||
|
# run: anchor --version
|
||||||
|
|
||||||
# Setup Keypair
|
# Setup Keypair
|
||||||
- name: Find or Create Keypair
|
- name: Find or Create Keypair
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Reference in New Issue