Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/actions/deploy-verifiable-buffer/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
default: "false"
network:
description: "The Solana network"
required: true
required: false
default: "devnet"
program:
description: "The program to build and upload"
Expand All @@ -33,6 +33,10 @@ inputs:
description: "The node version to use"
required: false
default: "20.18.0"
endpoint:
description: "The endpoint to use"
required: false
default: "https://api.devnet.solana.com"
outputs:
buffer:
description: "The buffer address"
Expand Down Expand Up @@ -65,7 +69,7 @@ runs:
timeout_minutes: 30
max_attempts: 10
shell: bash
command: solana program write-buffer --max-sign-attempts 50 --with-compute-unit-price 100000 --use-rpc --buffer ./keyp -k ./deploy-keypair.json ./target/deploy/$PROGRAM.so -u $NETWORK > ./buffer.out
command: solana program write-buffer ./target/deploy/$PROGRAM.so --buffer ./keyp -k ./deploy-keypair.json --url ${{ inputs.endpoint }} --with-compute-unit-price 100000 --max-sign-attempts 50 --use-rpc > ./buffer.out
env:
NETWORK: ${{ inputs.network }}
PROGRAM: ${{ inputs.program }}
Expand All @@ -78,7 +82,7 @@ runs:
max_attempts: 50
shell: bash
# this command doesn't work for 0.31.1, need to fix
command: anchor idl write-buffer $PROGRAM_ID --filepath ./target/idl/$PROGRAM.json --provider.cluster $NETWORK --provider.wallet ./deploy-keypair.json > idl-buffer.out
command: anchor idl write-buffer $PROGRAM_ID --filepath ./target/idl/$PROGRAM.json --provider.cluster ${{ inputs.network }} --provider.wallet ./deploy-keypair.json > idl-buffer.out
env:
PROGRAM_ID: ${{ inputs.program-id }}
PROGRAM: ${{ inputs.program }}
Expand All @@ -98,10 +102,10 @@ runs:
if: steps.cache-buffer.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 20
max_attempts: 10
shell: bash
# this might not work for 0.31.1, need to fix
command: anchor idl set-authority $IDL_BUFFER --provider.cluster $NETWORK --program-id $PROGRAM_ID --new-authority $AUTHORITY --provider.wallet ./deploy-keypair.json
command: anchor idl set-authority $IDL_BUFFER --provider.cluster ${{ inputs.network }} --program-id $PROGRAM_ID --new-authority $AUTHORITY --provider.wallet ./deploy-keypair.json
env:
IDL_BUFFER: ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }}
AUTHORITY: ${{ inputs.buffer-authority }}
Expand All @@ -112,10 +116,10 @@ runs:
if: steps.cache-buffer.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 20
max_attempts: 10
shell: bash
# this might not work for 0.31.1, need to fix
command: solana program set-buffer-authority $BUFFER -k ./deploy-keypair.json --new-buffer-authority $AUTHORITY -u $NETWORK
command: solana program set-buffer-authority $BUFFER --keypair ./deploy-keypair.json --new-buffer-authority $AUTHORITY --url ${{ inputs.network }}
env:
BUFFER: ${{ steps.buffer-deploy-store.outputs.BUFFER }}
AUTHORITY: ${{ inputs.buffer-authority }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ runs:
run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
shell: bash
- name: Install Anchor
run: npm i -g @coral-xyz/anchor-cli@${{ inputs.anchor-version }}
run: cargo install --git https://github.com/coral-xyz/anchor --tag v${{ inputs.anchor-version }} anchor-cli --locked
shell: bash
7 changes: 5 additions & 2 deletions .github/workflows/release-program.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ jobs:
anchor-version: ${{ inputs.anchor-version }}
solana-cli-version: ${{ inputs.solana-cli-version }}
node-version: ${{ inputs.node-version }}
- run: 'git pull --rebase'
- run: |
git pull --rebase
- run: mkdir -p verifiable-builds
- run: cp target/deploy/${{ inputs.program }}.so ./verifiable-builds/${{ inputs.program }}.so
- run: cp target/idl/${{ inputs.program }}.json ./verifiable-builds/${{ inputs.program }}.json
Expand All @@ -83,13 +84,15 @@ jobs:
id: deploy-verifiable-buffer
uses: ./.github/actions/deploy-verifiable-buffer
with:
network: ${{ inputs.network }}
# this will need to be manually assigned per env install unless we change one of the 10 inputs
network: 'devnet'
keypair: ${{ secrets.DEPLOY_KEYPAIR }}
program: ${{ inputs.program }}
program-id: ${{ inputs.program-id }}
buffer-authority: ${{ inputs.multisig-vault-address }}
anchor-version: ${{ inputs.anchor-version }}
node-version: '20.16.0'
endpoint: ${{ inputs.endpoint }}
- name: Log buffer and IDL addresses
run: |
echo "Buffer address: ${{ steps.deploy-verifiable-buffer.outputs.buffer }}"
Expand Down
Loading