Skip to content

Commit 1236f31

Browse files
committed
checkpoint 2
1 parent 4cd323c commit 1236f31

File tree

41 files changed

+2162
-389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2162
-389
lines changed

.github/workflows/svm.yml

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
pull_request:
55

66
jobs:
7-
test:
7+
anchor-test:
88
name: Anchor Test
99
runs-on: ubuntu-latest
1010
defaults:
1111
run:
12-
working-directory: svm
12+
working-directory: svm/anchor
1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Get solana version
@@ -29,8 +29,47 @@ jobs:
2929
node-version: "22.16.0"
3030
anchor-version: "${{steps.anchor.outputs.version}}"
3131
solana-cli-version: "${{steps.solana.outputs.version}}"
32-
working-directory: "svm"
32+
working-directory: "svm/anchor"
3333

3434
- run: cargo fmt --check --all
3535
- run: cargo clippy
3636
- run: cargo test
37+
38+
pinocchio-test:
39+
name: Pinocchio Test
40+
runs-on: ubuntu-latest
41+
defaults:
42+
run:
43+
working-directory: svm/pinocchio
44+
steps:
45+
- uses: actions/checkout@v4
46+
- name: Install Rust
47+
uses: dtolnay/rust-toolchain@stable
48+
with:
49+
toolchain: nightly-2025-04-14
50+
components: rustfmt, clippy
51+
- name: Install Solana CLI
52+
run: |
53+
sh -c "$(curl -sSfL https://release.anza.xyz/v1.18.17/install)"
54+
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
55+
- name: Generate test keypair
56+
run: |
57+
mkdir -p ../test-keys
58+
solana-keygen new --no-bip39-passphrase -o ../test-keys/quoter-updater.json
59+
echo "QUOTER_UPDATER_PUBKEY=$(solana-keygen pubkey ../test-keys/quoter-updater.json)" >> $GITHUB_ENV
60+
echo "QUOTER_UPDATER_KEYPAIR_PATH=${{ github.workspace }}/svm/test-keys/quoter-updater.json" >> $GITHUB_ENV
61+
- name: Build pinocchio programs
62+
run: |
63+
cargo build-sbf --manifest-path programs/executor-quoter/Cargo.toml
64+
cargo build-sbf --manifest-path programs/executor-quoter-router/Cargo.toml
65+
- name: Build anchor executor program
66+
working-directory: svm/anchor
67+
run: |
68+
cargo build-sbf --manifest-path programs/executor/Cargo.toml
69+
cp target/deploy/executor.so ../pinocchio/target/deploy/
70+
- run: cargo fmt --check --all
71+
- run: cargo clippy --all-targets
72+
- name: Run tests
73+
env:
74+
SBF_OUT_DIR: ${{ github.workspace }}/svm/pinocchio/target/deploy
75+
run: cargo test -p executor-quoter -p executor-quoter-tests -p executor-quoter-router-tests

svm/Anchor.toml renamed to svm/anchor/Anchor.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ skip-lint = false
88

99
[programs.localnet]
1010
executor = "execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV"
11-
executor_quoter_anchor = "2sDgzrUykBRKVzL3H4dT5wx7oiVAJg22kRVL7mhY1AqM"
12-
executor_quoter = "6yfXVhNgRKRk7YHFT8nTkVpFn5zXktbJddPUWK7jFAGX"
1311

1412
[registry]
1513
url = "https://api.apr.dev"
@@ -23,7 +21,3 @@ test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
2321

2422
[test.validator]
2523
url = "http://127.0.0.1:8899"
26-
27-
[[test.validator.bpf_program]]
28-
program_id = "6yfXVhNgRKRk7YHFT8nTkVpFn5zXktbJddPUWK7jFAGX"
29-
file = "target/deploy/executor_quoter.so"

0 commit comments

Comments
 (0)