diff --git a/.github/actions/build-anchor/action.yaml b/.github/actions/build-anchor/action.yaml index c35f2f235..82cd2037a 100644 --- a/.github/actions/build-anchor/action.yaml +++ b/.github/actions/build-anchor/action.yaml @@ -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 diff --git a/.github/actions/setup-anchor/action.yaml b/.github/actions/setup-anchor/action.yaml index df94639a3..5724fde49 100644 --- a/.github/actions/setup-anchor/action.yaml +++ b/.github/actions/setup-anchor/action.yaml @@ -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 diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 45a381c13..e2d8e226a 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -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