Skip to content

Commit 29355c9

Browse files
committed
chore: use external sdk dep and drop client ci
1 parent 0cbf968 commit 29355c9

4 files changed

Lines changed: 10 additions & 115 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 2 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -26,117 +26,12 @@ jobs:
2626
- name: Install solana-zig
2727
run: ./install-solana-zig.sh solana-zig
2828

29-
- name: Check SDK format
30-
run: ./solana-zig/zig fmt --check sdk/src/
31-
3229
- name: Check Program SDK format
3330
run: ./solana-zig/zig fmt --check src/
3431

35-
- name: Check Client SDK format
36-
run: ./solana-zig/zig fmt --check client/src/
37-
3832
- name: Check Example Programs format
3933
run: ./solana-zig/zig fmt --check examples/programs/
4034

41-
# SDK tests - pure Zig, no syscalls
42-
sdk-test:
43-
name: SDK Tests
44-
needs: format
45-
strategy:
46-
matrix:
47-
os: [ubuntu-latest, macos-latest]
48-
fail-fast: false
49-
runs-on: ${{ matrix.os }}
50-
steps:
51-
- uses: actions/checkout@v4
52-
53-
- name: Cache solana-zig
54-
uses: actions/cache@v4
55-
with:
56-
path: solana-zig
57-
key: solana-zig-${{ env.SOLANA_ZIG_VERSION }}-${{ runner.os }}
58-
59-
- name: Install solana-zig
60-
shell: bash
61-
run: ./install-solana-zig.sh solana-zig
62-
63-
- name: Test SDK
64-
shell: bash
65-
working-directory: sdk
66-
run: ../solana-zig/zig build test --summary all
67-
68-
# Client SDK unit tests
69-
client-test:
70-
name: Client SDK Tests
71-
needs: format
72-
strategy:
73-
matrix:
74-
os: [ubuntu-latest, macos-latest]
75-
fail-fast: false
76-
runs-on: ${{ matrix.os }}
77-
steps:
78-
- uses: actions/checkout@v4
79-
80-
- name: Cache solana-zig
81-
uses: actions/cache@v4
82-
with:
83-
path: solana-zig
84-
key: solana-zig-${{ env.SOLANA_ZIG_VERSION }}-${{ runner.os }}
85-
86-
- name: Install solana-zig
87-
shell: bash
88-
run: ./install-solana-zig.sh solana-zig
89-
90-
- name: Test Client SDK
91-
shell: bash
92-
working-directory: client
93-
run: ../solana-zig/zig build test --summary all
94-
95-
# Client SDK RPC integration tests (requires local validator)
96-
client-integration-test:
97-
name: Client RPC Integration Tests
98-
needs: [sdk-test, client-test]
99-
runs-on: ubuntu-latest
100-
steps:
101-
- uses: actions/checkout@v4
102-
103-
- name: Cache solana-zig
104-
uses: actions/cache@v4
105-
with:
106-
path: solana-zig
107-
key: solana-zig-${{ env.SOLANA_ZIG_VERSION }}-linux
108-
109-
- name: Cache Surfpool
110-
uses: actions/cache@v4
111-
with:
112-
path: ~/.local/bin/surfpool
113-
key: surfpool-latest
114-
115-
- name: Install solana-zig
116-
run: ./install-solana-zig.sh solana-zig
117-
118-
- name: Install Surfpool
119-
run: |
120-
curl -sL https://run.surfpool.run/ | bash
121-
echo "$HOME/.local/bin" >> $GITHUB_PATH
122-
123-
- name: Start Surfpool
124-
run: |
125-
surfpool start --no-tui &
126-
# Wait for surfpool to be ready
127-
for i in {1..30}; do
128-
if curl -s http://127.0.0.1:8899/health > /dev/null 2>&1; then
129-
echo "Surfpool is ready"
130-
break
131-
fi
132-
echo "Waiting for Surfpool... ($i/30)"
133-
sleep 2
134-
done
135-
136-
- name: Run Client Integration Tests
137-
working-directory: client
138-
run: ../solana-zig/zig build integration-test --summary all
139-
14035
# Program SDK tests - includes syscall stubs
14136
program-test:
14237
name: Program SDK Tests
@@ -166,7 +61,7 @@ jobs:
16661
# Integration tests - build actual programs and test with Rust
16762
integration-test:
16863
name: Integration Tests
169-
needs: [sdk-test, program-test]
64+
needs: [program-test]
17065
strategy:
17166
matrix:
17267
os: [ubuntu-latest, macos-latest]
@@ -214,7 +109,7 @@ jobs:
214109
# Example programs integration tests
215110
example-programs-test:
216111
name: Example Programs Tests
217-
needs: [sdk-test, program-test]
112+
needs: [program-test]
218113
strategy:
219114
matrix:
220115
os: [ubuntu-latest, macos-latest]

‎README.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,16 +252,15 @@ pub fn main() !void {
252252
## Testing
253253

254254
```bash
255-
# Test Program SDK (285 tests)
255+
# Test Program SDK
256256
./solana-zig/zig build test --summary all
257257

258-
# Test SDK only (105 tests)
259-
cd sdk && ../solana-zig/zig build test --summary all
260-
261258
# Integration tests
262259
./program-test/test.sh
263260
```
264261

262+
Shared SDK types now live in the external repo [DaviRain-Su/solana-sdk-zig](https://github.com/DaviRain-Su/solana-sdk-zig); run its tests there if needed.
263+
265264
See [docs/TESTING.md](docs/TESTING.md) for the full test matrix.
266265

267266
### Testing with MCL (Optional)

‎build.zig.zon‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
.url = "https://github.com/joncinque/base58-zig/archive/refs/tags/v0.15.0.tar.gz",
1515
.hash = "base58-0.15.0-6-CZmwVpAAAxqof6REya9G_XyHL1fTqUsAcsZ-J1IHMF",
1616
},
17-
// Shared SDK types (local path dependency)
17+
// Shared SDK types (external dependency)
1818
.solana_sdk = .{
19-
.path = "sdk",
19+
.url = "https://github.com/DaviRain-Su/solana-sdk-zig/archive/refs/heads/main.tar.gz",
20+
.hash = "solana_sdk-0.1.0-J3orTwlVCABxLotFVjrcviI7x5qYwq6Y0IIskmMsmh8e",
2021
},
2122
},
2223
.paths = .{
2324
"anchor",
2425
"build.zig",
2526
"build.zig.zon",
2627
"src",
27-
"sdk",
2828
"LICENSE",
2929
"README.md",
3030
},

‎program-test/integration/build.zig.zon‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
.paths = .{""},
66
.dependencies = .{
77
.solana_sdk = .{
8-
.path = "../../sdk",
8+
.url = "https://github.com/DaviRain-Su/solana-sdk-zig/archive/refs/heads/main.tar.gz",
9+
.hash = "solana_sdk-0.1.0-J3orTwlVCABxLotFVjrcviI7x5qYwq6Y0IIskmMsmh8e",
910
},
1011
},
1112
}

0 commit comments

Comments
 (0)