Skip to content

Commit 867f010

Browse files
committed
Update scripts
1 parent 40e76dd commit 867f010

File tree

4 files changed

+15
-123
lines changed

4 files changed

+15
-123
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ jobs:
143143
with:
144144
solana: true
145145

146+
- name: Restore Program Builds
147+
uses: actions/cache/restore@v4
148+
with:
149+
path: ./**/*.so
150+
key: ${{ runner.os }}-builds-${{ github.sha }}
151+
146152
- name: Test Client JS
147153
run: pnpm clients:js:test
148154

@@ -160,5 +166,11 @@ jobs:
160166
cargo-cache-key: cargo-rust-client
161167
solana: true
162168

169+
- name: Restore Program Builds
170+
uses: actions/cache/restore@v4
171+
with:
172+
path: ./**/*.so
173+
key: ${{ runner.os }}-builds-${{ github.sha }}
174+
163175
- name: Test Client Rust
164176
run: pnpm clients:rust:test

scripts/program/build.mjs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,8 @@ import {
66
workingDirectory,
77
} from '../utils.mjs';
88

9-
// Save external programs binaries to the output directory.
10-
import './dump.mjs';
11-
12-
// Configure arguments here.
13-
const buildArgs = [
14-
...cliArguments()
15-
];
16-
179
// Build the programs.
1810
for (const folder of getProgramFolders()) {
1911
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
20-
21-
await $`cargo-build-sbf --manifest-path ${manifestPath} ${buildArgs}`;
12+
await $`cargo-build-sbf --manifest-path ${manifestPath} ${cliArguments()}`;
2213
}

scripts/program/dump.mjs

Lines changed: 0 additions & 105 deletions
This file was deleted.

scripts/program/test.mjs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@ import {
66
workingDirectory,
77
} from '../utils.mjs';
88

9-
// Save external programs binaries to the output directory.
10-
import './dump.mjs';
11-
12-
// Configure arguments here.
13-
const testArgs = ['--features', 'bpf-entrypoint', ...cliArguments()];
14-
159
const hasSolfmt = await which('solfmt', { nothrow: true });
1610

1711
// Test the programs.
1812
for (const folder of getProgramFolders()) {
1913
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
2014

2115
if (hasSolfmt) {
22-
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs} 2>&1 | solfmt`;
16+
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${cliArguments()} 2>&1 | solfmt`;
2317
} else {
24-
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs}`;
18+
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${cliArguments()}`;
2519
}
2620
}

0 commit comments

Comments
 (0)