Skip to content

Commit efcea92

Browse files
committed
ci: add Photon indexer caching and installation
1 parent 6f9511d commit efcea92

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ inputs:
1717
description: "Light CLI version"
1818
required: false
1919
default: "0.27.1-alpha.11"
20+
photon-version:
21+
description: "Photon indexer version"
22+
required: false
23+
default: "0.51.2"
24+
photon-commit:
25+
description: "Photon indexer commit hash"
26+
required: false
27+
default: "ac7df6c388db847b7693a7a1cb766a7c9d7809b5"
2028

2129
runs:
2230
using: composite
@@ -52,6 +60,21 @@ runs:
5260
sh -c "$(curl -sSfL https://release.anza.xyz/v${{ inputs.solana-cli-version }}/install)"
5361
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
5462
63+
- name: Cache Photon indexer
64+
id: cache-photon
65+
uses: actions/cache@v4
66+
with:
67+
path: ~/.cargo/bin/photon
68+
key: photon-${{ runner.os }}-${{ inputs.photon-version }}-${{ inputs.photon-commit }}
69+
70+
- name: Install Photon indexer
71+
if: steps.cache-photon.outputs.cache-hit != 'true'
72+
shell: bash
73+
run: |
74+
echo "Installing Photon indexer ${{ inputs.photon-version }} (commit ${{ inputs.photon-commit }})..."
75+
RUSTFLAGS="-A dead-code" cargo install --git https://github.com/helius-labs/photon.git --rev ${{ inputs.photon-commit }} --locked --force
76+
echo "Photon installed successfully"
77+
5578
- name: Install Light CLI
5679
shell: bash
5780
run: npm install -g @lightprotocol/zk-compression-cli@${{ inputs.light-cli-version }}

0 commit comments

Comments
 (0)