Skip to content

Commit e7aad59

Browse files
chore: reduce ci times for non-js workflows (#1822)
* chore: backport breaking api changes to v1 js SDKs (#1661) * stateless.js add treeinfos * wip * add getTokenPoolInfos * wip * wip * wip - storageoptions * wip * wip * wip * wip - known bug in rpc-interop.test.ts if using random trees * debugged test-rpc in ctoken * all ctoken tests working * rm logs * clean * ctxs to infos, removed redundant getMintProgramId calls * rm deadcode, storageoptions * fix cli getMindProgramId use * fix tokenpool * fix test stateless.js add treeinfos wip add getTokenPoolInfos wip wip wip - storageoptions wip wip wip wip - known bug in rpc-interop.test.ts if using random trees debugged test-rpc in ctoken all ctoken tests working rm logs clean ctxs to infos, removed redundant getMintProgramId calls rm deadcode, storageoptions fix cli getMindProgramId use fix tokenpool fix test update CHANGELOG.md files update changelog update CHANGELOG.md export get-token-pool-infos.ts wip clean wip refactor merklecontext refactor StateTreeInfo wip wip debug test-rpc getCompressedTokenAccountsByOwner fix unit test wip wip wip debug .readUIntLE wip wip wip fix buffer conversion at test-rpc decode wip tests working compressedProof -> validityProof update changelog wip refactor: do not allow output trees for decompress, transfer fmt wip rename getCachedStateTreeInfos upd changelog use with getCachedStateTreeInfos getStateTreeInfos wip wip delegate test wip added transfer-delegated.test.ts added transfer-delegated test cases. all green add tests for decompress-delegated fix rm logs from program update changelog update err msg fix state-tree-luts wip getActiveStateTreeInfos -> getAllStateTreeInfos wip fix sigs for nullifyStateTree wip wip cleanup add getCachedActiveStateTreeInfos mock revert to compressedProof add tokenpools tests update comment update CHANGELOG.md update changelog 0.21.0 update changelog fix fix event parsing post rebase stateless js refactor dedupe types link to computebudgetprogram wip fix DX for instructions: add docstrings to call signatures wip dont break mergeTokenAccounts wip wip add v2 trees to test-rpc v1 mergeable test-rpc tests working rpc-interop tests working with v2 all stateless.js tests working with v2 compressed-token tests working rebase to main fixup cargo lock wip wip (#1794) wip (#1781) chore: backport breaking api changes to v1 js SDKs (#1661) * stateless.js add treeinfos * wip * add getTokenPoolInfos * wip * wip * wip - storageoptions * wip * wip * wip * wip - known bug in rpc-interop.test.ts if using random trees * debugged test-rpc in ctoken * all ctoken tests working * rm logs * clean * ctxs to infos, removed redundant getMintProgramId calls * rm deadcode, storageoptions * fix cli getMindProgramId use * fix tokenpool * fix test stateless.js add treeinfos wip add getTokenPoolInfos wip wip wip - storageoptions wip wip wip wip - known bug in rpc-interop.test.ts if using random trees debugged test-rpc in ctoken all ctoken tests working rm logs clean ctxs to infos, removed redundant getMintProgramId calls rm deadcode, storageoptions fix cli getMindProgramId use fix tokenpool fix test update CHANGELOG.md files update changelog update CHANGELOG.md export get-token-pool-infos.ts wip clean wip refactor merklecontext refactor StateTreeInfo wip wip debug test-rpc getCompressedTokenAccountsByOwner fix unit test wip wip wip debug .readUIntLE wip wip wip fix buffer conversion at test-rpc decode wip tests working compressedProof -> validityProof update changelog wip refactor: do not allow output trees for decompress, transfer fmt wip rename getCachedStateTreeInfos upd changelog use with getCachedStateTreeInfos getStateTreeInfos wip wip delegate test wip added transfer-delegated.test.ts added transfer-delegated test cases. all green add tests for decompress-delegated fix rm logs from program update changelog update err msg fix state-tree-luts wip getActiveStateTreeInfos -> getAllStateTreeInfos wip fix sigs for nullifyStateTree wip wip cleanup add getCachedActiveStateTreeInfos mock revert to compressedProof add tokenpools tests update comment update CHANGELOG.md update changelog 0.21.0 update changelog fix fix event parsing post rebase stateless js refactor dedupe types link to computebudgetprogram wip fix DX for instructions: add docstrings to call signatures wip dont break mergeTokenAccounts wip wip add v2 trees to test-rpc v1 mergeable test-rpc tests working rpc-interop tests working with v2 all stateless.js tests working with v2 compressed-token tests working rebase to main fixup cargo lock wip chore: backport breaking api changes to v1 js SDKs (#1661) * stateless.js add treeinfos * wip * add getTokenPoolInfos * wip * wip * wip - storageoptions * wip * wip * wip * wip - known bug in rpc-interop.test.ts if using random trees * debugged test-rpc in ctoken * all ctoken tests working * rm logs * clean * ctxs to infos, removed redundant getMintProgramId calls * rm deadcode, storageoptions * fix cli getMindProgramId use * fix tokenpool * fix test stateless.js add treeinfos wip add getTokenPoolInfos wip wip wip - storageoptions wip wip wip wip - known bug in rpc-interop.test.ts if using random trees debugged test-rpc in ctoken all ctoken tests working rm logs clean ctxs to infos, removed redundant getMintProgramId calls rm deadcode, storageoptions fix cli getMindProgramId use fix tokenpool fix test update CHANGELOG.md files update changelog update CHANGELOG.md export get-token-pool-infos.ts wip clean wip refactor merklecontext refactor StateTreeInfo wip wip debug test-rpc getCompressedTokenAccountsByOwner fix unit test wip wip wip debug .readUIntLE wip wip wip fix buffer conversion at test-rpc decode wip tests working compressedProof -> validityProof update changelog wip refactor: do not allow output trees for decompress, transfer fmt wip rename getCachedStateTreeInfos upd changelog use with getCachedStateTreeInfos getStateTreeInfos wip wip delegate test wip added transfer-delegated.test.ts added transfer-delegated test cases. all green add tests for decompress-delegated fix rm logs from program update changelog update err msg fix state-tree-luts wip getActiveStateTreeInfos -> getAllStateTreeInfos wip fix sigs for nullifyStateTree wip wip cleanup add getCachedActiveStateTreeInfos mock revert to compressedProof add tokenpools tests update comment update CHANGELOG.md update changelog 0.21.0 update changelog fix fix event parsing post rebase stateless js refactor dedupe types link to computebudgetprogram wip fix DX for instructions: add docstrings to call signatures wip dont break mergeTokenAccounts wip wip add v2 trees to test-rpc v1 mergeable test-rpc tests working rpc-interop tests working with v2 all stateless.js tests working with v2 compressed-token tests working rebase to main fixup cargo lock wip wip rename statetreeinfo -> treeinfo wip wip wip cli test works wip wip wip wip wip wip wip wip wip wip wip wip rm logs fix lint clean upd comment chore: backport breaking api changes to v1 js SDKs (#1661) (#1790) * stateless.js add treeinfos * wip * add getTokenPoolInfos * wip * wip * wip - storageoptions * wip * wip * wip * wip - known bug in rpc-interop.test.ts if using random trees * debugged test-rpc in ctoken * all ctoken tests working * rm logs * clean * ctxs to infos, removed redundant getMintProgramId calls * rm deadcode, storageoptions * fix cli getMindProgramId use * fix tokenpool * fix test stateless.js add treeinfos wip add getTokenPoolInfos wip wip wip - storageoptions wip wip wip wip - known bug in rpc-interop.test.ts if using random trees debugged test-rpc in ctoken all ctoken tests working rm logs clean ctxs to infos, removed redundant getMintProgramId calls rm deadcode, storageoptions fix cli getMindProgramId use fix tokenpool fix test update CHANGELOG.md files update changelog update CHANGELOG.md export get-token-pool-infos.ts wip clean wip refactor merklecontext refactor StateTreeInfo wip wip debug test-rpc getCompressedTokenAccountsByOwner fix unit test wip wip wip debug .readUIntLE wip wip wip fix buffer conversion at test-rpc decode wip tests working compressedProof -> validityProof update changelog wip refactor: do not allow output trees for decompress, transfer fmt wip rename getCachedStateTreeInfos upd changelog use with getCachedStateTreeInfos getStateTreeInfos wip wip delegate test wip added transfer-delegated.test.ts added transfer-delegated test cases. all green add tests for decompress-delegated fix rm logs from program update changelog update err msg fix state-tree-luts wip getActiveStateTreeInfos -> getAllStateTreeInfos wip fix sigs for nullifyStateTree wip wip cleanup add getCachedActiveStateTreeInfos mock revert to compressedProof add tokenpools tests update comment update CHANGELOG.md update changelog 0.21.0 update changelog fix fix event parsing post rebase stateless js refactor dedupe types link to computebudgetprogram wip fix DX for instructions: add docstrings to call signatures wip dont break mergeTokenAccounts wip wip add v2 trees to test-rpc v1 mergeable test-rpc tests working rpc-interop tests working with v2 all stateless.js tests working with v2 compressed-token tests working rebase to main fixup cargo lock wip chore: backport breaking api changes to v1 js SDKs (#1661) * stateless.js add treeinfos * wip * add getTokenPoolInfos * wip * wip * wip - storageoptions * wip * wip * wip * wip - known bug in rpc-interop.test.ts if using random trees * debugged test-rpc in ctoken * all ctoken tests working * rm logs * clean * ctxs to infos, removed redundant getMintProgramId calls * rm deadcode, storageoptions * fix cli getMindProgramId use * fix tokenpool * fix test stateless.js add treeinfos wip add getTokenPoolInfos wip wip wip - storageoptions wip wip wip wip - known bug in rpc-interop.test.ts if using random trees debugged test-rpc in ctoken all ctoken tests working rm logs clean ctxs to infos, removed redundant getMintProgramId calls rm deadcode, storageoptions fix cli getMindProgramId use fix tokenpool fix test update CHANGELOG.md files update changelog update CHANGELOG.md export get-token-pool-infos.ts wip clean wip refactor merklecontext refactor StateTreeInfo wip wip debug test-rpc getCompressedTokenAccountsByOwner fix unit test wip wip wip debug .readUIntLE wip wip wip fix buffer conversion at test-rpc decode wip tests working compressedProof -> validityProof update changelog wip refactor: do not allow output trees for decompress, transfer fmt wip rename getCachedStateTreeInfos upd changelog use with getCachedStateTreeInfos getStateTreeInfos wip wip delegate test wip added transfer-delegated.test.ts added transfer-delegated test cases. all green add tests for decompress-delegated fix rm logs from program update changelog update err msg fix state-tree-luts wip getActiveStateTreeInfos -> getAllStateTreeInfos wip fix sigs for nullifyStateTree wip wip cleanup add getCachedActiveStateTreeInfos mock revert to compressedProof add tokenpools tests update comment update CHANGELOG.md update changelog 0.21.0 update changelog fix fix event parsing post rebase stateless js refactor dedupe types link to computebudgetprogram wip fix DX for instructions: add docstrings to call signatures wip dont break mergeTokenAccounts wip wip add v2 trees to test-rpc v1 mergeable test-rpc tests working rpc-interop tests working with v2 all stateless.js tests working with v2 compressed-token tests working rebase to main fixup cargo lock wip wip rename statetreeinfo -> treeinfo wip wip wip cli test works wip wip wip wip wip wip wip wip wip wip wip wip rm logs fix lint clean upd comment wip stateless.js tests working ctoken tests working lint address comments selective installs fmt v1 and v2 builds and tests working ctoken v1,v2 working rm logs ci * rm conflict in lockfile * fix lint * wip * wip * simplify build for ci * wip * wip * wip * rm nx cache again * improve logging if prover exists with code 1 * fix cli yml * wip * check if conditional installs should stay * wip * wip * add INSTALL.md * fix keys * update INSTALL.md * fix cache * wip * wip * wip * double-checking CI caching * reduce ci times for remaining long running workflows * lint.yml all deps
1 parent 5ef0aec commit e7aad59

32 files changed

+1016
-94
lines changed

.github/actions/setup-and-build-nocheck/action.yml

Lines changed: 74 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,57 +20,120 @@ runs:
2020
path: |
2121
.local
2222
prover/server/proving-keys
23-
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh') }}
23+
key: ${{ runner.os }}-local-v3-${{ hashFiles('scripts/install.sh', 'prover/server/scripts/download_keys.sh') }}
24+
restore-keys: |
25+
${{ runner.os }}-local-v3-
26+
${{ runner.os }}-local-v2-
2427
2528
- name: Install dependencies
2629
if: steps.restore-local-cache.outputs.cache-hit != 'true'
2730
shell: bash
2831
run: |
2932
./scripts/install.sh
3033
34+
- name: Verify and repair installation
35+
shell: bash
36+
run: |
37+
# Even if cache was restored, run install script to check and install missing components
38+
# The install script now checks for actual file existence, so it will only install what's missing
39+
echo "=== Verifying installation integrity ==="
40+
./scripts/install.sh --no-reset
41+
42+
- name: Validate environment setup
43+
shell: bash
44+
run: |
45+
echo "=== Validating environment setup ==="
46+
source ./scripts/devenv.sh
47+
48+
# Quick validation of critical components
49+
[ -f "$GOROOT/bin/go" ] || { echo "✗ Go not found"; exit 1; }
50+
[ -f "$CARGO_HOME/bin/cargo" ] || { echo "✗ Cargo not found"; exit 1; }
51+
[ -d "prover/server/proving-keys" ] || { echo "✗ Proving keys not found"; exit 1; }
52+
53+
echo "✓ All critical components found"
54+
3155
- name: Set local environment
3256
shell: bash
3357
run: |
3458
source ./scripts/devenv.sh
59+
# Export critical environment variables for subsequent steps
60+
echo "GOROOT=$GOROOT" >> $GITHUB_ENV
61+
echo "CARGO_HOME=$CARGO_HOME" >> $GITHUB_ENV
62+
echo "RUSTUP_HOME=$RUSTUP_HOME" >> $GITHUB_ENV
63+
echo "PATH=$PATH" >> $GITHUB_ENV
64+
echo "CARGO_FEATURES=$CARGO_FEATURES" >> $GITHUB_ENV
65+
echo "REDIS_URL=$REDIS_URL" >> $GITHUB_ENV
3566
3667
- name: Rust cache
3768
uses: swatinem/rust-cache@v2
69+
with:
70+
cache-all-crates: true
71+
cache-on-failure: true
72+
# Add workspace target directory
73+
workspaces: |
74+
. -> target
75+
cli -> cli/target
76+
examples -> examples/target
3877
3978
- name: Setup pnpm
4079
uses: pnpm/action-setup@v4
4180
with:
4281
run_install: false
4382

4483
- name: Get pnpm store directory
84+
id: pnpm-store
4585
shell: bash
4686
run: |
47-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
87+
# Get the store path before any pnpm operations
88+
STORE_PATH=$(pnpm store path --silent)
89+
echo "STORE_PATH=${STORE_PATH}" >> $GITHUB_ENV
90+
echo "path=${STORE_PATH}" >> $GITHUB_OUTPUT
4891
49-
- uses: actions/cache@v4
50-
name: Setup pnpm cache
92+
- name: Setup pnpm cache
93+
id: pnpm-cache
94+
uses: actions/cache@v4
5195
with:
52-
path: ${{ env.STORE_PATH }}
53-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
96+
path: ${{ steps.pnpm-store.outputs.path }}
97+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
5498
restore-keys: |
5599
${{ runner.os }}-pnpm-store-
56100
57101
- name: Install dependencies
58102
shell: bash
59-
run: pnpm install
103+
run: |
104+
# Install dependencies
105+
pnpm install --frozen-lockfile
106+
107+
# Validate node_modules was created
108+
if [ ! -d "node_modules" ] || [ -z "$(ls -A node_modules 2>/dev/null)" ]; then
109+
echo "Error: node_modules not created after pnpm install"
110+
exit 1
111+
fi
112+
113+
- name: Save pnpm cache
114+
# Save cache even on failure to speed up retries
115+
if: steps.pnpm-cache.outputs.cache-hit != 'true'
116+
uses: actions/cache/save@v4
117+
with:
118+
path: ${{ steps.pnpm-store.outputs.path }}
119+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
60120

61121
- name: Build and prepare for tests
62122
shell: bash
63123
run: |
64124
source ./scripts/devenv.sh
65125
mkdir -p /home/runner/.config/solana/
66-
solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json
126+
if [ ! -f /home/runner/.config/solana/id.json ]; then
127+
solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json
128+
fi
67129
npx nx build @lightprotocol/programs
68130
npx nx build @lightprotocol/zk-compression-cli
69131
70-
- name: Cache .local directory
71-
uses: actions/cache@v4
132+
- name: Save .local directory cache
133+
if: steps.restore-local-cache.outputs.cache-hit != 'true'
134+
uses: actions/cache/save@v4
72135
with:
73136
path: |
74137
.local
75138
prover/server/proving-keys
76-
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh') }}
139+
key: ${{ runner.os }}-local-v3-${{ hashFiles('scripts/install.sh', 'prover/server/scripts/download_keys.sh') }}

.github/actions/setup-and-build/action.yml

Lines changed: 139 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Setup and build
22
description: Checkout sources, install dependencies, build and prepare for tests
33

4+
inputs:
5+
skip-components:
6+
description: 'Comma-separated list of components to skip (e.g., "redis,go"). If not specified, all components are installed.'
7+
required: false
8+
default: ""
9+
410
runs:
511
using: "composite"
612
steps:
@@ -22,67 +28,186 @@ runs:
2228
path: |
2329
.local
2430
prover/server/proving-keys
25-
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh', 'prover/server/scripts/download_keys.sh') }}
31+
key: ${{ runner.os }}-local-v3-${{ hashFiles('scripts/install.sh', 'prover/server/scripts/download_keys.sh') }}
32+
restore-keys: |
33+
${{ runner.os }}-local-v3-
34+
${{ runner.os }}-local-v2-
2635
27-
- name: Install dependencies
36+
- name: Install system dependencies
2837
shell: bash
2938
run: |
3039
sudo apt-get update
31-
sudo apt-get install -y libudev-dev pkg-config
40+
sudo apt-get install -y libudev-dev pkg-config build-essential
3241
3342
- name: Install dependencies
3443
if: steps.restore-local-cache.outputs.cache-hit != 'true'
3544
shell: bash
3645
run: |
37-
./scripts/install.sh
46+
if [ -n "${{ inputs.skip-components }}" ]; then
47+
./scripts/install.sh --skip-components "${{ inputs.skip-components }}"
48+
else
49+
./scripts/install.sh
50+
fi
51+
52+
- name: Verify and repair installation
53+
shell: bash
54+
run: |
55+
# Even if cache was restored, run install script to check and install missing components
56+
# The install script now checks for actual file existence, so it will only install what's missing
57+
echo "=== Verifying installation integrity ==="
58+
if [ -n "${{ inputs.skip-components }}" ]; then
59+
./scripts/install.sh --no-reset --skip-components "${{ inputs.skip-components }}"
60+
else
61+
./scripts/install.sh --no-reset
62+
fi
63+
64+
- name: Validate environment setup
65+
shell: bash
66+
run: |
67+
echo "=== Validating environment setup ==="
68+
source ./scripts/devenv.sh
69+
70+
# Check critical binaries exist
71+
echo "Checking Go installation..."
72+
if [ -f "$GOROOT/bin/go" ]; then
73+
echo "✓ Go found at: $GOROOT/bin/go"
74+
$GOROOT/bin/go version || echo "⚠ Go binary exists but failed to run"
75+
else
76+
echo "✗ Go not found at expected location: $GOROOT/bin/go"
77+
exit 1
78+
fi
79+
80+
echo "Checking Rust installation..."
81+
if [ -f "$CARGO_HOME/bin/cargo" ]; then
82+
echo "✓ Cargo found at: $CARGO_HOME/bin/cargo"
83+
$CARGO_HOME/bin/cargo --version || echo "⚠ Cargo binary exists but failed to run"
84+
else
85+
echo "✗ Cargo not found at expected location: $CARGO_HOME/bin/cargo"
86+
exit 1
87+
fi
88+
89+
echo "Checking Node installation..."
90+
which node && node --version || echo "⚠ Node not in PATH"
91+
92+
echo "Checking pnpm installation..."
93+
which pnpm && pnpm --version || echo "⚠ pnpm not in PATH"
94+
95+
echo "Checking Solana installation..."
96+
which solana && solana --version || echo "⚠ Solana not in PATH"
97+
98+
echo "Checking Anchor installation..."
99+
which anchor && anchor --version || echo "⚠ Anchor not in PATH"
100+
101+
# Check proving keys
102+
if [ -d "prover/server/proving-keys" ] && [ -n "$(ls -A prover/server/proving-keys 2>/dev/null)" ]; then
103+
echo "✓ Proving keys found: $(ls prover/server/proving-keys | wc -l) files"
104+
else
105+
echo "✗ Proving keys directory missing or empty"
106+
exit 1
107+
fi
108+
109+
echo "=== Environment validation complete ==="
38110
39111
- name: Set local environment
40112
shell: bash
41113
run: |
42114
source ./scripts/devenv.sh
115+
# Export critical environment variables for subsequent steps
116+
echo "GOROOT=$GOROOT" >> $GITHUB_ENV
117+
echo "CARGO_HOME=$CARGO_HOME" >> $GITHUB_ENV
118+
echo "RUSTUP_HOME=$RUSTUP_HOME" >> $GITHUB_ENV
119+
echo "PATH=$PATH" >> $GITHUB_ENV
120+
echo "CARGO_FEATURES=$CARGO_FEATURES" >> $GITHUB_ENV
121+
echo "REDIS_URL=$REDIS_URL" >> $GITHUB_ENV
43122
44123
- name: Rust cache
45124
uses: swatinem/rust-cache@v2
125+
with:
126+
cache-all-crates: true
127+
cache-on-failure: true
128+
# Add workspace target directory
129+
workspaces: |
130+
. -> target
131+
cli -> cli/target
132+
examples -> examples/target
46133
47134
- name: Setup pnpm
48135
uses: pnpm/action-setup@v4
49136
with:
50-
run_install: true
137+
run_install: false
51138

52139
- name: Get pnpm store directory
140+
id: pnpm-store
53141
shell: bash
54142
run: |
55-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
143+
# Get the store path before any pnpm operations
144+
STORE_PATH=$(pnpm store path --silent)
145+
echo "STORE_PATH=${STORE_PATH}" >> $GITHUB_ENV
146+
echo "path=${STORE_PATH}" >> $GITHUB_OUTPUT
56147
57-
- uses: actions/cache@v4
58-
name: Setup pnpm cache
148+
- name: Setup pnpm cache
149+
id: pnpm-cache
150+
uses: actions/cache@v4
59151
with:
60-
path: ${{ env.STORE_PATH }}
61-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
152+
path: ${{ steps.pnpm-store.outputs.path }}
153+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
62154
restore-keys: |
63155
${{ runner.os }}-pnpm-store-
64156
157+
- name: Install dependencies
158+
shell: bash
159+
run: |
160+
# Install dependencies with frozen lockfile for consistency
161+
pnpm install --frozen-lockfile
162+
163+
# Validate node_modules was created
164+
if [ ! -d "node_modules" ] || [ -z "$(ls -A node_modules 2>/dev/null)" ]; then
165+
echo "Error: node_modules not created after pnpm install"
166+
exit 1
167+
fi
168+
169+
- name: Save pnpm cache
170+
# Save cache even on failure to speed up retries
171+
if: steps.pnpm-cache.outputs.cache-hit != 'true'
172+
uses: actions/cache/save@v4
173+
with:
174+
path: ${{ steps.pnpm-store.outputs.path }}
175+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
176+
65177
- name: Generate Solana keypair
66178
shell: bash
67179
run: |
68180
source ./scripts/devenv.sh
69181
mkdir -p /home/runner/.config/solana/
70-
solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json
182+
if [ ! -f /home/runner/.config/solana/id.json ]; then
183+
solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json
184+
fi
71185
72186
- name: Copy spl_noop.so to target/deploy
73187
shell: bash
74188
run: |
75189
mkdir -p ./target/deploy
76190
cp ./third-party/solana-program-library/spl_noop.so ./target/deploy/spl_noop.so
77191
78-
- name: Cache .local directory
192+
- name: Build Rust programs
193+
shell: bash
194+
run: |
195+
source ./scripts/devenv.sh
196+
echo "Building Rust programs..."
197+
npx nx build @lightprotocol/programs || {
198+
echo "Failed to build programs, retrying with verbose output..."
199+
npx nx build @lightprotocol/programs --verbose
200+
exit 1
201+
}
202+
203+
- name: Save .local directory cache
79204
if: steps.restore-local-cache.outputs.cache-hit != 'true'
80-
uses: actions/cache@v4
205+
uses: actions/cache/save@v4
81206
with:
82207
path: |
83208
.local
84209
prover/server/proving-keys
85-
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh', 'prover/server/scripts/download_keys.sh') }}
210+
key: ${{ runner.os }}-local-v3-${{ hashFiles('scripts/install.sh', 'prover/server/scripts/download_keys.sh') }}
86211

87212
- name: Check for git changes
88213
shell: bash

0 commit comments

Comments
 (0)