Skip to content

Commit

Permalink
Move SVM examples to a new workspace (anza-xyz#3582)
Browse files Browse the repository at this point in the history
* Create new workspace
  • Loading branch information
LucasSte authored Nov 15, 2024
1 parent da4f55e commit 02b3948
Show file tree
Hide file tree
Showing 9 changed files with 9,166 additions and 96 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/svm-exampls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: SVM examples test

on:
push:
branches:
- master
- v[0-9]+.[0-9]+
pull_request:
branches:
- master
- v[0-9]+.[0-9]+
paths:
- "**.rs"
- "Cargo.toml"
- "Cargo.lock"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
SHELL: /bin/bash
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- shell: bash
run: |
.github/scripts/purge-ubuntu-runner.sh
- uses: mozilla-actions/[email protected]
with:
version: "v0.8.1"

- shell: bash
run: |
source .github/scripts/downstream-project-spl-install-deps.sh
- name: Run build
run: |
cd svm/examples
cargo build --tests
- name: Run tests
run: |
cd svm/examples
cargo test
51 changes: 0 additions & 51 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ members = [
"svm-conformance",
"svm-rent-collector",
"svm-transaction",
"svm/examples/paytube",
"test-validator",
"thin-client",
"timings",
Expand Down Expand Up @@ -202,7 +201,7 @@ members = [
"zk-token-sdk",
]

exclude = ["programs/sbf", "svm/tests/example-programs"]
exclude = ["programs/sbf", "svm/examples", "svm/tests/example-programs"]

resolver = "2"

Expand Down Expand Up @@ -540,7 +539,6 @@ solana-storage-proto = { path = "storage-proto", version = "=2.2.0" }
solana-streamer = { path = "streamer", version = "=2.2.0" }
solana-svm = { path = "svm", version = "=2.2.0" }
solana-svm-conformance = { path = "svm-conformance", version = "=2.2.0" }
solana-svm-example-paytube = { path = "svm/examples/paytube", version = "=2.2.0" }
solana-svm-rent-collector = { path = "svm-rent-collector", version = "=2.2.0" }
solana-svm-transaction = { path = "svm-transaction", version = "=2.2.0" }
solana-system-program = { path = "programs/system", version = "=2.2.0" }
Expand Down
41 changes: 0 additions & 41 deletions svm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,46 +46,20 @@ name = "solana_svm"

[dev-dependencies]
assert_matches = { workspace = true }
base64 = { workspace = true }
bincode = { workspace = true }
borsh = { version = "1.5.3", features = ["derive"] }
bs58 = { workspace = true }
clap = { workspace = true }
crossbeam-channel = { workspace = true }
env_logger = { workspace = true }
home = "0.5"
jsonrpc-core = { workspace = true }
jsonrpc-core-client = { workspace = true }
jsonrpc-derive = { workspace = true }
jsonrpc-http-server = { workspace = true }
lazy_static = { workspace = true }
libsecp256k1 = { workspace = true }
prost = { workspace = true }
rand = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
shuttle = { workspace = true }
solana-account-decoder = { workspace = true }
solana-bpf-loader-program = { workspace = true }
solana-client = { workspace = true }
solana-compute-budget-program = { workspace = true }
solana-logger = { workspace = true }
solana-perf = { workspace = true }
solana-program = { workspace = true }
solana-rpc-client = { workspace = true }
solana-rpc-client-api = { workspace = true }
solana-sdk = { workspace = true, features = ["dev-context-only-utils"] }
# See order-crates-for-publishing.py for using this unusual `path = "."`
solana-svm = { path = ".", features = ["dev-context-only-utils"] }
solana-svm-conformance = { workspace = true }
solana-transaction-status = { workspace = true }
solana-version = { workspace = true }
solana_rbpf = { workspace = true }
spl-token-2022 = { workspace = true, features = ["no-entrypoint"] }
test-case = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tokio-util = { workspace = true, features = ["codec", "compat"] }
yaml-rust = "0.4"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -106,20 +80,5 @@ shuttle-test = [
"solana-loader-v4-program/shuttle-test",
]

[[example]]
name = "json-rpc-server"
path = "examples/json-rpc/server/src/main.rs"
crate-type = ["bin"]

[[example]]
name = "json-rpc-client"
path = "examples/json-rpc/client/src/main.rs"
crate-type = ["bin"]

[[example]]
name = "json-rpc-example-program"
path = "examples/json-rpc/program/src/lib.rs"
crate-type = ["cdylib", "lib"]

[lints]
workspace = true
Loading

0 comments on commit 02b3948

Please sign in to comment.