Skip to content

Commit

Permalink
Example: How to connect to parachain (#1043)
Browse files Browse the repository at this point in the history
* parachain rpc lists

* guide almost done

* add the 3rd config

* subscribe to block with configs

* delete table file

* spaces instead of tabs

* remove original ajuna example

* zombienet setup

* nft minting example

* include port, use different names

* link the example from the book

* format book

* add config creation to book, simplify example structure

* fix the nft creation script

* fix doc ref

* fixing links to foreign crates

* fix table formatting

* include nits

* move more docs to book, and simplify parachain-example

* another pass over docs and link to exampels from guide

* nit: adjust comment to numbers

* teeny README fix for parachain-example

* fix command in readme

* add CI for examples and fix parachain-example bug I left in

* add target arch

* cargo fmt

* make CI not fail

* remove index from docs

---------

Co-authored-by: James Wilson <[email protected]>
  • Loading branch information
tadeohepperle and jsdw authored Jul 21, 2023
1 parent fd8f60c commit 8b23b2b
Show file tree
Hide file tree
Showing 19 changed files with 6,130 additions and 84 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
WASM_BINDGEN_TEST_TIMEOUT: 60

jobs:
build:
check:
name: Cargo check
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -83,6 +83,34 @@ jobs:
- name: Cargo hack; check each feature/crate on its own
run: cargo hack --exclude subxt --exclude subxt-signer --exclude subxt-lightclient --exclude-all-features --each-feature check --workspace

# Check examples, which aren't a part of the workspace and so are otherwise missed:
- name: Cargo check examples
run: |
cargo check --manifest-path examples/parachain-example/Cargo.toml
wasm_check:
name: Cargo check (WASM)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1

# Check WASM examples, which aren't a part of the workspace and so are otherwise missed:
- name: Cargo check WASM examples
run: |
cargo check --manifest-path examples/wasm-example/Cargo.toml --target wasm32-unknown-unknown
fmt:
name: Cargo fmt
runs-on: ubuntu-latest
Expand Down Expand Up @@ -141,7 +169,7 @@ jobs:
command: test
args: --doc

nonwasm_tests:
tests:
name: "Test non-wasm"
runs-on: ubuntu-latest-16-cores
steps:
Expand Down Expand Up @@ -175,7 +203,7 @@ jobs:
command: nextest
args: run --workspace

nonwasm_light_client_tests:
light_client_tests:
name: "Test Light Client"
runs-on: ubuntu-latest-16-cores
timeout-minutes: 25
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
cargo-timing*
/examples/wasm-example/dist
/examples/wasm-example/target
/examples/parachain-example/target
/examples/parachain-example/metadata/target
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ exclude = [
"testing/wasm-rpc-tests",
"testing/wasm-lightclient-tests",
"signer/wasm-tests",
"examples/wasm-example"
"examples/wasm-example",
"examples/parachain-example"
]
resolver = "2"

Expand Down
Loading

0 comments on commit 8b23b2b

Please sign in to comment.