Skip to content

Commit 12b34c8

Browse files
committed
fix: ci
1 parent a799909 commit 12b34c8

File tree

3 files changed

+51
-38
lines changed

3 files changed

+51
-38
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,5 @@ jobs:
3939
${{ runner.os }}-cargo-lint-
4040
${{ runner.os }}-cargo-
4141
42-
- name: Check formatting
43-
run: cargo fmt --all --check
44-
45-
- name: Run clippy
46-
run: cargo clippy --all-targets --all-features -- -D warnings
47-
48-
- name: Run clippy (create-and-update)
49-
run: cargo clippy --manifest-path create-and-update/Cargo.toml --all-targets --all-features -- -D warnings
50-
51-
- name: Run clippy (counter/anchor)
52-
run: cargo clippy --manifest-path counter/anchor/Cargo.toml --all-targets --all-features -- -D warnings
53-
54-
- name: Run clippy (counter/native)
55-
run: cargo clippy --manifest-path counter/native/Cargo.toml --all-targets --all-features -- -D warnings
56-
57-
- name: Run clippy (counter/pinocchio)
58-
run: cargo clippy --manifest-path counter/pinocchio/Cargo.toml --all-targets --all-features -- -D warnings
59-
60-
- name: Run clippy (account-comparison)
61-
run: cargo clippy --manifest-path account-comparison/Cargo.toml --all-targets --all-features -- -D warnings
42+
- name: Run lint script
43+
run: ./scripts/lint.sh

.github/workflows/program-tests.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ concurrency:
1010

1111
env:
1212
RUSTFLAGS: "-D warnings"
13+
PATH: "/home/runner/.local/share/solana/install/active_release/bin:$PATH"
1314

1415
jobs:
1516
program-tests:
@@ -54,7 +55,6 @@ jobs:
5455
uses: actions/setup-node@v4
5556
with:
5657
node-version: "23.5.0"
57-
cache: "npm"
5858

5959
- name: Cache Rust dependencies
6060
uses: actions/cache@v4
@@ -69,34 +69,24 @@ jobs:
6969
restore-keys: |
7070
${{ runner.os }}-cargo-
7171
72-
- name: Install system dependencies
73-
run: |
74-
sudo apt-get update
75-
sudo apt-get install -y libudev-dev pkg-config
76-
7772
- name: Install Solana CLI
7873
run: |
79-
sh -c "$(curl -sSfL https://release.solana.com/v2.2.15/install)"
80-
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
81-
82-
- name: Install Anchor CLI
83-
run: |
84-
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
85-
avm install latest
86-
avm use latest
74+
curl --proto '=https' --tlsv1.2 -sSfL https://solana-install.solana.workers.dev | bash
75+
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
76+
solana-keygen new --no-bip39-passphrase
8777
8878
- name: Install Light CLI
8979
run: |
9080
npm install -g @lightprotocol/zk-compression-cli
9181
92-
- name: Generate Solana keypair
82+
- name: Install Photon Indexer
9383
run: |
94-
solana-keygen new --no-bip39-passphrase
84+
cargo install --git https://github.com/lightprotocol/photon.git --rev 129fe6518021ad3c2e90fc7de1e1abc7dcb32250 --locked
9585
9686
- name: Start Light test validator
9787
run: |
98-
light test-validator &
99-
sleep 30
88+
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
89+
light test-validator
10090
10191
- name: Run tests
10292
run: |

scripts/lint.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo "Checking formatting..."
6+
7+
# Check formatting for each crate
8+
echo "Checking create-and-update..."
9+
cd create-and-update && cargo fmt --check && cd ..
10+
11+
echo "Checking counter/anchor..."
12+
cd counter/anchor && cargo fmt --check && cd ../..
13+
14+
echo "Checking counter/native..."
15+
cd counter/native && cargo fmt --check && cd ../..
16+
17+
echo "Checking counter/pinocchio..."
18+
cd counter/pinocchio && cargo fmt --check && cd ../..
19+
20+
echo "Checking account-comparison..."
21+
cd account-comparison && cargo fmt --check && cd ..
22+
23+
echo "Running clippy..."
24+
25+
# Run clippy for each crate
26+
echo "Running clippy on create-and-update..."
27+
cargo clippy --manifest-path create-and-update/Cargo.toml --all-targets --all-features -- -D warnings
28+
29+
echo "Running clippy on counter/anchor..."
30+
cargo clippy --manifest-path counter/anchor/Cargo.toml --all-targets --all-features -- -D warnings
31+
32+
echo "Running clippy on counter/native..."
33+
cargo clippy --manifest-path counter/native/Cargo.toml --all-targets --all-features -- -D warnings
34+
35+
echo "Running clippy on counter/pinocchio..."
36+
cargo clippy --manifest-path counter/pinocchio/Cargo.toml --all-targets --all-features -- -D warnings
37+
38+
echo "Running clippy on account-comparison..."
39+
cargo clippy --manifest-path account-comparison/Cargo.toml --all-targets --all-features -- -D warnings
40+
41+
echo "Lint checks completed successfully!"

0 commit comments

Comments
 (0)