-
Notifications
You must be signed in to change notification settings - Fork 2
Implement the Node trait for kitchensink #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| name: Test | ||
| name: Test workflow | ||
|
|
||
| on: | ||
| push: | ||
|
|
@@ -7,9 +7,7 @@ on: | |
| pull_request: | ||
| branches: | ||
| - main | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| types: [opened, synchronize] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
|
|
@@ -19,38 +17,97 @@ env: | |
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| cache-polkadot: | ||
| name: Build and cache Polkadot binaries on ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-24.04, macos-14] | ||
|
|
||
| steps: | ||
| - name: Checkout repo and submodules | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Install dependencies (Linux) | ||
| if: matrix.os == 'ubuntu-24.04' | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y protobuf-compiler clang libclang-dev | ||
| rustup target add wasm32-unknown-unknown | ||
| rustup component add rust-src | ||
|
|
||
| - name: Install dependencies (macOS) | ||
| if: matrix.os == 'macos-14' | ||
| run: | | ||
| brew install protobuf | ||
| rustup target add wasm32-unknown-unknown | ||
| rustup component add rust-src | ||
|
|
||
| - name: Cache binaries | ||
| id: cache | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.cargo/bin/substrate-node | ||
| ~/.cargo/bin/eth-rpc | ||
| key: polkadot-binaries-${{ matrix.os }}-${{ hashFiles('polkadot-sdk/.git') }} | ||
|
|
||
| - name: Build substrate-node | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| cd polkadot-sdk | ||
| cargo install --locked --force --profile=production --path substrate/bin/node/cli --bin substrate-node --features cli | ||
|
|
||
| - name: Build eth-rpc | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| cd polkadot-sdk | ||
| cargo install --path substrate/frame/revive/rpc --bin eth-rpc | ||
|
|
||
| ci: | ||
| name: CI on ${{ matrix.os }} | ||
| needs: cache-polkadot | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: | ||
| - ubuntu-24.04 | ||
| - macos-14 | ||
| os: [ubuntu-24.04, macos-14] | ||
|
|
||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Restore binaries from cache | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.cargo/bin/substrate-node | ||
| ~/.cargo/bin/eth-rpc | ||
| key: polkadot-binaries-${{ matrix.os }}-${{ hashFiles('polkadot-sdk/.git') }} | ||
|
|
||
| - name: Setup Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| rustflags: "" | ||
|
|
||
| # ────────────── Install geth ────────────── | ||
| - name: Add wasm32 target | ||
| run: | | ||
| rustup target add wasm32-unknown-unknown | ||
| rustup component add rust-src | ||
|
|
||
| - name: Install Geth on Ubuntu | ||
| if: matrix.os == 'ubuntu-24.04' | ||
| run: | | ||
| sudo add-apt-repository -y ppa:ethereum/ethereum | ||
| sudo apt-get update | ||
| sudo apt-get install -y ethereum | ||
| sudo apt-get install -y ethereum protobuf-compiler | ||
|
|
||
| - name: Install Geth on macOS | ||
| if: matrix.os == 'macos-14' | ||
| run: | | ||
| brew tap ethereum/ethereum | ||
| brew install ethereum | ||
| brew install ethereum protobuf | ||
|
|
||
| - name: Machete | ||
| uses: bnjbvr/[email protected] | ||
|
|
@@ -61,5 +118,11 @@ jobs: | |
| - name: Clippy | ||
| run: make clippy | ||
|
|
||
| - name: Check substrate-node version | ||
| run: substrate-node --version | ||
|
|
||
| - name: Check eth-rpc version | ||
| run: eth-rpc --version | ||
|
|
||
| - name: Test cargo workspace | ||
| run: make test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [submodule "polkadot-sdk"] | ||
| path = polkadot-sdk | ||
| url = https://github.com/paritytech/polkadot-sdk.git |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.