Skip to content

Commit

Permalink
Fix anchor build action
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass committed Sep 28, 2023
1 parent 99d6a3b commit 4770c8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-anchor/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ runs:
with:
path: |
./target/
key: build-${{ runner.os }}-v0001-${{ inputs.devnet }}-${{ inputs.testing }}-${{ hashFiles('./programs/**/**') }}-${{ inputs.program }}
key: build-${{ runner.os }}-${{env.ANCHOR_VERSION}}-${{env.ANCHOR_SHA}}-v0001-${{ inputs.devnet }}-${{ inputs.testing }}-${{ hashFiles('./programs/**/**') }}-${{ inputs.program }}
- run: ${{ inputs.testing == 'true' && 'TESTING=true' || '' }} ~/.cargo/bin/anchor build ${{ (inputs.program != '' && '-p') || '' }} ${{ inputs.program || '' }} ${{ inputs.devnet == 'true' && '-- --features devnet' || '' }}
if: steps.cache-anchor-build.outputs.cache-hit != 'true'
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/setup-anchor/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
~/.cargo/bin/anchor
key: anchor-cli-${{ runner.os }}-v0002-${{ env.ANCHOR_VERSION }}
# if ANCHOR_VERSION is 0, then install the anchor-cli from source
- run: if [ $ANCHOR_VERSION -eq 0 ]; then cargo install --git https://github.com/coral-xyz/anchor anchor-cli --locked --force; else cargo install --git https://github.com/coral-xyz/anchor --tag "v$ANCHOR_VERSION" anchor-cli --locked; fi
- run: if [ $ANCHOR_VERSION -eq 0 ]; then cargo install --git https://github.com/coral-xyz/anchor anchor-cli --locked --force; else cargo install --git https://github.com/coral-xyz/anchor/tree/$ANCHOR_SHA --tag "v$ANCHOR_VERSION" anchor-cli --locked; fi
shell: bash
if: steps.cache-anchor-cli.outputs.cache-hit != 'true'
- uses: actions/cache@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ runs:
# On anchor 0.28.1 we can probably stop using 0 as the source
- run: echo "ANCHOR_VERSION=0" >> $GITHUB_ENV
shell: bash
- run: echo "ANCHOR_SHA=3e8bc76d72e2bfdb3962868b5066b2479cf49d25" >> $GITHUB_ENV
shell: bash
- run: git submodule update --init --recursive --depth 1
shell: bash

0 comments on commit 4770c8f

Please sign in to comment.