30 Commits

Author SHA1 Message Date
rzadp 0c51346d98 comment out for now 2024-08-08 18:35:19 +02:00
rzadp 10de7b33cb dumb 2024-08-08 18:35:15 +02:00
rzadp a62d6d31eb Give me a test for producing blocks 2024-08-08 18:12:40 +02:00
Przemek Rzad 3f74c0485e Update ci.yml 2024-08-08 17:13:10 +02:00
Przemek Rzad 2d91027ab6 Merge branch 'master' into rzadp/ci-package 2024-08-08 15:15:41 +02:00
Przemek Rzad b6770d6a5f Add an automatic PR reminder (#14) 2024-08-08 15:06:14 +02:00
Przemek Rzad 419eb3efda Update ci.yml 2024-08-08 14:05:41 +02:00
rzadp d31ced7974 Add missing features 2024-08-08 13:59:21 +02:00
Javier Bullrich 331e79d33f added CI tests for macOS (#13)
Added a matrix to run the CI jobs, using both `ubuntu-latest` and
`macos-latest`.
2024-08-08 12:52:38 +01:00
Javier Bullrich 7f8d3d018c Revert "TEST - added df command"
This reverts commit 1f38756e28.
2024-08-08 13:26:07 +02:00
Javier Bullrich 1f38756e28 TEST - added df command 2024-08-08 12:42:02 +02:00
Javier Bullrich b56b85e852 removed docker mac building step
Based on this discussion, Docker daemon is not supported in macos images: https://github.com/orgs/community/discussions/69211#discussioncomment-7242133
2024-08-08 12:01:50 +02:00
Javier Bullrich 7b2ebf016f added more missing deps 2024-08-08 11:37:59 +02:00
Javier Bullrich 33067c2c1f added wasm32 toolchain 2024-08-08 11:11:46 +02:00
Javier Bullrich a5e12feede added missing installation 2024-08-08 10:56:22 +02:00
Javier Bullrich 4c84ccd239 added -y to cargo install 2024-08-08 10:25:47 +02:00
Przemek Rzad 106c604993 Update ci.yml 2024-08-08 09:13:29 +02:00
Przemek Rzad 670c29ab86 Update ci.yml 2024-08-08 09:10:39 +02:00
Javier Bullrich 4b900d3081 removed invalid workflow 2024-08-07 12:56:12 +02:00
Javier Bullrich 722657deda added some tests
more debug log

more test

another test

trying with brackets
2024-08-07 12:53:30 +02:00
Javier Bullrich 5718deb606 added docker to macos machine 2024-08-07 12:43:48 +02:00
Javier Bullrich 8ad0586c25 implemented contains 2024-08-07 12:41:40 +02:00
github-actions[bot] a150b7ee98 added installation of cargo for macos 2024-08-07 12:35:17 +02:00
github-actions[bot] 78fbe0b4c3 updated checkout image 2024-08-07 12:35:02 +02:00
github-actions[bot] 85e9f2d04b added CI tests for macOS 2024-08-07 11:35:51 +02:00
Template Bot 888d8eb81a Update to stable2407 triggered by workflow_dispatch 2024-08-01 09:48:49 +00:00
Przemek Rzad ce9fbe59b7 Skip WASM build for tests and docs (#10) 2024-07-23 14:51:49 +02:00
Template Bot 91e66fc7ea Update to 1.14.0 triggered by workflow_dispatch 2024-07-18 12:54:15 +00:00
Yuri Volkov 9b47a47b3a Merge pull request #7 from paritytech/yuri/release-ci
Building and binaries and docker images to release
2024-07-18 13:07:00 +02:00
cornholio 6b4829dd6c Building and binaries and docker images to release 2024-07-15 12:29:28 +02:00
11 changed files with 10802 additions and 103 deletions
+50 -38
View File
@@ -6,6 +6,7 @@ on:
branches:
- main
- master
- rzadp/test-produce-blocks
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -13,11 +14,15 @@ concurrency:
jobs:
ci:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Rust compilation prerequisites
- name: Rust compilation prerequisites (Ubuntu)
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y \
@@ -25,43 +30,17 @@ jobs:
rustup target add wasm32-unknown-unknown
rustup component add rustfmt clippy rust-src
# We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
with:
android: true # This alone is a 12 GB save.
# We disable the rest because it caused some problems. (they're enabled by default)
# The Android removal is enough.
dotnet: false
haskell: false
large-packages: false
swap-storage: false
- name: Build the template
run: cargo build
timeout-minutes: 90
- name: Run clippy
- name: Install Cargo (MacOS)
if: contains(matrix.os, 'macos')
run: |
SKIP_WASM_BUILD=1 cargo clippy --all-targets --locked --workspace --quiet
SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features --locked --workspace --quiet
timeout-minutes: 30
- name: Run the tests
run: cargo test
timeout-minutes: 15
- name: Build the docs
run: cargo doc --all-features --workspace --no-deps
timeout-minutes: 15
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
curl https://sh.rustup.rs -sSf -y | sh
brew install protobuf
rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-apple-darwin
rustup component add rust-src --toolchain stable-aarch64-apple-darwin
# We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
- name: Free Disk Space (Ubuntu)
if: contains(matrix.os, 'ubuntu')
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
with:
android: true # This alone is a 12 GB save.
@@ -72,6 +51,39 @@ jobs:
large-packages: false
swap-storage: false
- name: Build the Dockerfile
run: docker build . -t polkadot-sdk-minimal-template
# This is mentioned as example in the README:
- name: Build the node individually in release mode
run: |
# Save some space from debug builds
rm -rf ./target
cargo build --package minimal-template-node --release
timeout-minutes: 90
- name: Make sure the node is producing blocks
run: |
./target/release/minimal-template-node --dev 2>&1 | tee out.txt &
until curl -s '127.0.0.1:9944'; do sleep 5; done
until cat out.txt | grep -s "Imported #2"; do sleep 5; done
shell: bash
timeout-minutes: 5
# build-docker:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
# - name: Free Disk Space (Ubuntu)
# uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
# with:
# android: true # This alone is a 12 GB save.
# # We disable the rest because it caused some problems. (they're enabled by default)
# # The Android removal is enough.
# dotnet: false
# haskell: false
# large-packages: false
# swap-storage: false
# - name: Build the Dockerfile
# run: docker build . -t polkadot-sdk-minimal-template
# timeout-minutes: 90
+24
View File
@@ -0,0 +1,24 @@
name: PR Reminder
permissions:
pull-requests: write
on:
pull_request:
types:
- opened
jobs:
pr-reminder:
runs-on: ubuntu-latest
steps:
- name: Comment a reminder on a new PR
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Hello, this is an automatic reminder that any code changes should be made to [the source](https://github.com/paritytech/polkadot-sdk/tree/master/templates/minimal).'
})
+65
View File
@@ -0,0 +1,65 @@
name: Release
permissions:
contents: write
packages: write
on:
release:
types: [released]
jobs:
release-docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
with:
android: true # This alone is a 12 GB save.
# We disable the rest because it caused some problems. (they're enabled by default)
# The Android removal is enough.
dotnet: false
haskell: false
large-packages: false
swap-storage: false
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
release-binaries:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rust compilation prerequisites
run: |
sudo apt update
sudo apt install -y \
protobuf-compiler
rustup target add wasm32-unknown-unknown
rustup component add rust-src
- name: Build the template
run: cargo build --locked --release
timeout-minutes: 90
- name: Upload the binaries
uses: softprops/action-gh-release@v2
with:
files: |
target/release/minimal-template-node
target/release/wbuild/minimal-template-runtime/minimal_template_runtime.compact.compressed.wasm
Generated
+10557
View File
File diff suppressed because it is too large Load Diff
+35 -25
View File
@@ -1,7 +1,7 @@
[workspace.package]
license = "MIT-0"
authors = ["Parity Technologies <admin@parity.io>"]
homepage = "https://substrate.io"
homepage = "https://paritytech.github.io/polkadot-sdk/"
repository = "https://github.com/paritytech/polkadot-sdk-minimal-template.git"
edition = "2021"
@@ -14,33 +14,43 @@ members = [
resolver = "2"
[workspace.dependencies]
minimal-template-runtime = { path = "./runtime", default-features = false }
pallet-minimal-template = { path = "./pallets/template", default-features = false }
clap = { version = "4.5.3" }
docify = { version = "0.2.8" }
frame = { path = "substrate/frame", default-features = false, package = "polkadot-sdk-frame", version = "0.5.0" }
frame = { version = "0.6.0", default-features = false, package = "polkadot-sdk-frame" }
futures = { version = "0.3.30" }
futures-timer = { version = "3.0.2" }
jsonrpsee = { version = "0.23.2" }
minimal-template-runtime = { path = "templates/minimal/runtime", version = "0.1.0" }
sc-basic-authorship = { path = "substrate/client/basic-authorship", default-features = false, version = "0.42.0" }
sc-cli = { path = "substrate/client/cli", default-features = false, version = "0.44.0" }
sc-client-api = { path = "substrate/client/api", default-features = false, version = "35.1.0" }
sc-consensus = { path = "substrate/client/consensus/common", default-features = false, version = "0.41.0" }
sc-consensus-manual-seal = { path = "substrate/client/consensus/manual-seal", default-features = false, version = "0.43.0" }
sc-executor = { path = "substrate/client/executor", default-features = false, version = "0.39.0" }
sc-network = { path = "substrate/client/network", default-features = false, version = "0.42.0" }
sc-offchain = { path = "substrate/client/offchain", default-features = false, version = "37.0.0" }
sc-rpc-api = { path = "substrate/client/rpc-api", default-features = false, version = "0.41.0" }
sc-service = { path = "substrate/client/service", default-features = false, version = "0.43.0" }
sc-telemetry = { path = "substrate/client/telemetry", default-features = false, version = "22.0.0" }
sc-transaction-pool = { path = "substrate/client/transaction-pool", default-features = false, version = "35.0.0" }
sc-transaction-pool-api = { path = "substrate/client/transaction-pool/api", default-features = false, version = "35.0.0" }
sc-basic-authorship = { version = "0.44.0", default-features = false }
sc-cli = { version = "0.46.0", default-features = false }
sc-client-api = { version = "37.0.0", default-features = false }
sc-consensus = { version = "0.43.0", default-features = false }
sc-consensus-manual-seal = { version = "0.45.0", default-features = false }
sc-executor = { version = "0.40.0", default-features = false }
sc-network = { version = "0.44.0", default-features = false }
sc-offchain = { version = "39.0.0", default-features = false }
sc-rpc-api = { version = "0.43.0", default-features = false }
sc-service = { version = "0.45.0", default-features = false }
sc-telemetry = { version = "24.0.0", default-features = false }
sc-transaction-pool = { version = "37.0.0", default-features = false }
sc-transaction-pool-api = { version = "37.0.0", default-features = false }
serde_json = { version = "1.0.114", default-features = false }
sp-api = { path = "substrate/primitives/api", default-features = false, version = "33.0.0" }
sp-block-builder = { path = "substrate/primitives/block-builder", default-features = false, version = "33.0.0" }
sp-blockchain = { path = "substrate/primitives/blockchain", default-features = false, version = "35.1.0" }
sp-io = { path = "substrate/primitives/io", default-features = false, version = "37.0.0" }
sp-keyring = { path = "substrate/primitives/keyring", default-features = false, version = "38.0.0" }
sp-runtime = { path = "substrate/primitives/runtime", default-features = false, version = "38.0.0" }
sp-timestamp = { path = "substrate/primitives/timestamp", default-features = false, version = "33.0.0" }
substrate-frame-rpc-system = { path = "substrate/utils/frame/rpc/system", default-features = false, version = "36.0.0" }
substrate-build-script-utils = { path = "substrate/utils/build-script-utils", default-features = false, version = "11.0.0" }
sp-api = { version = "34.0.0", default-features = false }
sp-block-builder = { version = "34.0.0", default-features = false }
sp-blockchain = { version = "37.0.0", default-features = false }
sp-io = { version = "38.0.0", default-features = false }
sp-keyring = { version = "39.0.0", default-features = false }
sp-runtime = { version = "39.0.0", default-features = false }
sp-timestamp = { version = "34.0.0", default-features = false }
substrate-frame-rpc-system = { version = "38.0.0", default-features = false }
substrate-build-script-utils = { version = "11.0.0", default-features = false }
codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" }
pallet-balances = { version = "38.0.0", default-features = false }
pallet-sudo = { version = "37.0.0", default-features = false }
pallet-timestamp = { version = "36.0.0", default-features = false }
pallet-transaction-payment = { version = "37.0.0", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { version = "37.0.0", default-features = false }
scale-info = { version = "2.11.1", default-features = false }
sp-genesis-builder = { version = "0.15.0", default-features = false }
substrate-wasm-builder = { version = "24.0.0", default-features = false }
+4 -4
View File
@@ -14,7 +14,7 @@
* 🤏 This template is a minimal (in terms of complexity and the number of components)
template for building a blockchain node.
* 🔧 Its runtime is configured of a single custom pallet as a starting point, and a handful of ready-made pallets
* 🔧 Its runtime is configured with a single custom pallet as a starting point, and a handful of ready-made pallets
such as a [Balances pallet](https://paritytech.github.io/polkadot-sdk/master/pallet_balances/index.html).
* 👤 The template has no consensus configured - it is best for experimenting with a single node network.
@@ -42,7 +42,7 @@ packages required to compile this template - please take note of the Rust compil
🔨 Use the following command to build the node without launching it:
```sh
cargo build --release
cargo build --package minimal-template-node --release
```
🐳 Alternatively, build the docker image:
@@ -65,8 +65,8 @@ docker run --rm polkadot-sdk-minimal-template --dev
Development chains:
* 🧹 Do not persist the state.
* 💰 Are preconfigured with a genesis state that includes several prefunded development accounts.
* 🧑‍⚖️ Development accounts are used as `sudo` accounts.
* 💰 Are pre-configured with a genesis state that includes several pre-funded development accounts.
* 🧑‍⚖️ One development account (`ALICE`) is used as `sudo` accounts.
### Connect with the Polkadot-JS Apps Front-End
+50 -25
View File
@@ -1,6 +1,6 @@
[package]
name = "minimal-template-node"
description = "A minimal Substrate-based Substrate node, ready for hacking. (polkadot v1.14.0)"
description = "A minimal Substrate-based Substrate node, ready for hacking. (polkadot v1.15.0)"
version = "0.1.0"
license = "Unlicense"
authors.workspace = true
@@ -20,32 +20,57 @@ futures = { features = ["thread-pool"], workspace = true }
futures-timer = { workspace = true }
jsonrpsee = { features = ["server"], workspace = true }
serde_json = { workspace = true, default-features = true }
sc-cli = { version = "0.44.0", workspace = true, default-features = true }
sc-executor = { version = "0.39.0", workspace = true, default-features = true }
sc-network = { version = "0.42.0", workspace = true, default-features = true }
sc-service = { version = "0.43.0", workspace = true, default-features = true }
sc-telemetry = { version = "22.0.0", workspace = true, default-features = true }
sc-transaction-pool = { version = "35.0.0", workspace = true, default-features = true }
sc-transaction-pool-api = { version = "35.0.0", workspace = true, default-features = true }
sc-consensus = { version = "0.41.0", workspace = true, default-features = true }
sc-consensus-manual-seal = { version = "0.43.0", workspace = true, default-features = true }
sc-rpc-api = { version = "0.41.0", workspace = true, default-features = true }
sc-basic-authorship = { version = "0.42.0", workspace = true, default-features = true }
sc-offchain = { version = "37.0.0", workspace = true, default-features = true }
sc-client-api = { version = "35.1.0", workspace = true, default-features = true }
sp-timestamp = { version = "33.0.0", workspace = true, default-features = true }
sp-keyring = { version = "38.0.0", workspace = true, default-features = true }
sp-api = { version = "33.0.0", workspace = true, default-features = true }
sp-blockchain = { version = "35.1.0", workspace = true, default-features = true }
sp-block-builder = { version = "33.0.0", workspace = true, default-features = true }
sp-io = { version = "37.0.0", workspace = true, default-features = true }
sp-runtime = { version = "38.0.0", workspace = true, default-features = true }
substrate-frame-rpc-system = { version = "36.0.0", workspace = true, default-features = true }
sc-cli.workspace = true
sc-cli.default-features = true
sc-executor.workspace = true
sc-executor.default-features = true
sc-network.workspace = true
sc-network.default-features = true
sc-service.workspace = true
sc-service.default-features = true
sc-telemetry.workspace = true
sc-telemetry.default-features = true
sc-transaction-pool.workspace = true
sc-transaction-pool.default-features = true
sc-transaction-pool-api.workspace = true
sc-transaction-pool-api.default-features = true
sc-consensus.workspace = true
sc-consensus.default-features = true
sc-consensus-manual-seal.workspace = true
sc-consensus-manual-seal.default-features = true
sc-rpc-api.workspace = true
sc-rpc-api.default-features = true
sc-basic-authorship.workspace = true
sc-basic-authorship.default-features = true
sc-offchain.workspace = true
sc-offchain.default-features = true
sc-client-api.workspace = true
sc-client-api.default-features = true
sp-timestamp.workspace = true
sp-timestamp.default-features = true
sp-keyring.workspace = true
sp-keyring.default-features = true
sp-api.workspace = true
sp-api.default-features = true
sp-blockchain.workspace = true
sp-blockchain.default-features = true
sp-block-builder.workspace = true
sp-block-builder.default-features = true
sp-io.workspace = true
sp-io.default-features = true
sp-runtime.workspace = true
sp-runtime.default-features = true
substrate-frame-rpc-system.workspace = true
substrate-frame-rpc-system.default-features = true
frame = { features = ["experimental", "runtime"], workspace = true, default-features = true }
minimal-template-runtime = { version = "0.1.0", workspace = true }
minimal-template-runtime.workspace = true
[build-dependencies]
substrate-build-script-utils = { version = "11.0.0", workspace = true, default-features = true }
substrate-build-script-utils.workspace = true
substrate-build-script-utils.default-features = true
[features]
default = []
default = ["std"]
std = [
"minimal-template-runtime/std",
]
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "pallet-minimal-template"
description = "A minimal pallet built with FRAME, part of Polkadot Sdk. (polkadot v1.14.0)"
description = "A minimal pallet built with FRAME, part of Polkadot Sdk. (polkadot v1.15.0)"
version = "0.1.0"
license = "Unlicense"
authors.workspace = true
+3
View File
@@ -1,4 +1,7 @@
//! A shell pallet built with [`frame`].
//!
//! To get started with this pallet, try implementing the guide in
//! <https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/your_first_pallet/index.html>
#![cfg_attr(not(feature = "std"), no_std)]
+10 -10
View File
@@ -1,6 +1,6 @@
[package]
name = "minimal-template-runtime"
description = "A solochain runtime template built with Substrate, part of Polkadot Sdk. (polkadot v1.14.0)"
description = "A solochain runtime template built with Substrate, part of Polkadot Sdk. (polkadot v1.15.0)"
version = "0.1.0"
license = "Unlicense"
authors.workspace = true
@@ -13,17 +13,17 @@ publish = false
codec = { workspace = true }
scale-info = { workspace = true }
frame = { features = ["experimental", "runtime"], workspace = true }
pallet-balances = { version = "37.0.0", workspace = true }
pallet-sudo = { version = "36.0.0", workspace = true }
pallet-timestamp = { version = "35.0.0", workspace = true }
pallet-transaction-payment = { version = "36.0.0", workspace = true }
pallet-transaction-payment-rpc-runtime-api = { version = "36.0.0", workspace = true }
sp-genesis-builder = { version = "0.14.0", workspace = true }
sp-runtime = { version = "38.0.0", features = ["serde"], workspace = true }
pallet-minimal-template = { version = "0.1.0", workspace = true }
pallet-balances.workspace = true
pallet-sudo.workspace = true
pallet-timestamp.workspace = true
pallet-transaction-payment.workspace = true
pallet-transaction-payment-rpc-runtime-api.workspace = true
sp-genesis-builder.workspace = true
sp-runtime = { features = ["serde"], workspace = true }
pallet-minimal-template.workspace = true
[build-dependencies]
substrate-wasm-builder = { version = "23.0.0", optional = true, workspace = true, default-features = true }
substrate-wasm-builder = { optional = true, workspace = true, default-features = true }
[features]
default = ["std"]
+3
View File
@@ -23,6 +23,9 @@
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
extern crate alloc;
use alloc::{vec, vec::Vec};
use frame::{
deps::frame_support::{
genesis_builder_helper::{build_state, get_preset},