Skip to content

Latest commit

 

History

History
127 lines (88 loc) · 2.03 KB

CONTRIBUTING.md

File metadata and controls

127 lines (88 loc) · 2.03 KB

Contributing

Requirements

rustup default set nightly
rustup target add wasm32-unknown-unknown --toolchain nightly

Steps to take before opening a PR

Unless all the steps are executed, CI will fail the build

  • Format the code cargo fmt
  • Fix all warnings RUSTFLAGS="-Dwarnings" cargo check
  • Execute tests RUSTFLAGS="-Dwarnings" cargo test

Build

Docker Image

make docker-build-image

or

docker build -t soraneo-develop-nix .

Binary release

make cargo-build-release

or

cargo build --release

Test

Cargo

make cargo-test-release

or

cargo test --release

Docker

make docker-test-release

or

./scripts/docker_compose_up.sh --with-last-commit --run "cargo test --release"

Run

Docker Compose

make docker-build-release

or

./scripts/docker_compose_up.sh --with-last-commit --run "cargo build --release"

Manual run of collator

./target/release/parachain-collator \
    --tmp --validator --alice --ws-port 9944 --port 30333 \
    --parachain-id 200 -- --chain ./misc/rococo-custom.json

Manual run of parachain fullnode

./target/release/parachain-collator \
    --tmp --alice --ws-port 9944 --port 30333 \
    --parachain-id 200 -- --chain ./misc/rococo-custom.json

Automatic run of local testnet by script for a given commit

make a397f7451d80205abf5e535ecee95073ad49e369

Debug version

make a397f7451d80205abf5e535ecee95073ad49e369-debug

Automatic run of local testnet by script for last commit

make docker-localtestnet

Debug version

make docker-localtestnet-debug

Docker build and run

docker build -f housekeeping/docker/develop/Dockerfile -t soraneo-develop .
docker run -ti -v $(pwd):/app -w /app --rm soraneo-develop cargo build --release