Skip to content

Commit

Permalink
2.5.0 Release (#932)
Browse files Browse the repository at this point in the history
* cleanup (#850)

* Fixed RPC definitions (#851)

* MESH-1304 Substrate benchmarks (#836)

* Substrate benchmarks added

* updated proof def (#853)

* Mesh 1463/Documentation build fails (#854)

* Substrate benchmarks added

* Add pallet_session benchmark

* Disable `runtime-benchmakrs` feature in default

* MESH-1288 committee benchmarks (#771)

* a couple benches

* set_expires_after bench

* todo

* wip on type inference for pallet instances

* fixed instance type error

* vote_or_propose draft

* set a committee member

* vote_or_propose with variable number of members

* generation of additional proposals

* corrected the expected events on approved proposal

* fixes

* vote draft

* vote bench fixed

* close bench draft

* close bench works

* WIP for propose

* merge fixes in User

* rewrote proposal making

* working on NoSuchProposal

* added committee weight file

* dedup comittee bench

* typing

* typo

* removed commented out code

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* Revert "Apply suggestions from code review"

This reverts commit 08ddcc3.

* review comments

* review comments

* fixed the max number of committee members to 1000

* split vote weight into aye and nay halves

* removed duplicate constant

* fixed typos

* worst-case aye vote

* fixed proposal padding and the member check

* sorted the member dids vec

* reduced the number of members and proposals

* updated the aye voter member index

* vote_aye triggers proposal execution; dev-only constants

* release constants and check of the opposite vote

* reverted committee threshold operator, updated weights

* special case of even number of committee members

* updated committee weights

* fmt

* Update pallets/committee/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

Co-authored-by: Adam Dossa <[email protected]>
Co-authored-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Initial `make_asset` refactoring (#828)

* Add benchs of exemption pallet

* Fix UT

* CodeReview: `make_asset` to common

* Remove exemption pallet

* CodeReview: Fix settlement bench error after merge

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <[email protected]>

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <[email protected]>

* CodeReview: `make_*` returns a result

* re-trigger pipeline

* re-trigger pipeline

Co-authored-by: Vladimir Komendantskiy <[email protected]>

* Mesh 1452/benchs failing (#859)

* Fix statistics benchs & new `running_ci` feature

* Fix identity benchs & add `running-ci` feature

* CodeReview: Fix `running-ci` constant

* Update pallets/identity/src/benchmarking.rs

CodeReview: style fix.

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* Update pallets/identity/src/benchmarking.rs

CodeReview: style.

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* Update pallets/pips/src/benchmarking.rs

CodeReview: Change complexity in PIP with `running-ci`

Co-authored-by: Vladimir Komendantskiy <[email protected]>

* CodeReview: use variable

* CodeReview: Fix the specific `add_transfer_manager`

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: Vladimir Komendantskiy <[email protected]>

* init helper cli (#860)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1468/Add sudo pallet (#861)

* add sudo pallet

* add test suite in circle ci

Co-authored-by: satyam <[email protected]>
Co-authored-by: Adam Dossa <[email protected]>

* fix initiate_corporate_action weight (#868)

* MESH-1461/Fix underflow/overflow bugs in Asset Identifier Validations (#867)

* WIP

* WIP

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1453/Pass legs count in portfolio based extrinsics (#855)

* pass legs count in portfolio based extrinsics

* add fix for add_and_affirm_inst

* fix test suite

* fix benchmark build

* improve test cases

* minor fixes

* fix benchmarks working

* re-trigger pipeline

* minor fixes

* centril's suggestion

* minor re arrangement

* fix integration tests

* bench fixes

Co-authored-by: satyam <[email protected]>

* burn remaining rewards (#865)

Co-authored-by: Adam Dossa <[email protected]>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1456, MESH-1464, MESH-1459: In committee, nix `close` + only use dynamic threshold (#857)

* mesh-1456: simplify Origin handling

* mesh-1456: add 'type VoteThresholdOrigin'

* mesh-1456: nix close extrinsic

* mesh-1456: Condoned -> Endorsed

* nix MotionDuration

* committee: add migration logic

* PolymeshVotes: nix IdentityId typaram

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Minor refactoring of settlement benchmarks and a bug fix (#856)

* minor refactoring

* wip

* wip

* fixed merge

* Updated instruction execution bench

* updated weights for settlement

* minor refactoring

* bench fix

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* MESH-1287/Sto Benchmarks (#838)

* WIP

* WIP

* WIP

* WIP

* dedupe

* formatting

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <[email protected]>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <[email protected]>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <[email protected]>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* comments

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* comments

Co-authored-by: Vladimir Komendantskiy <[email protected]>
Co-authored-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: Mudit Gupta <[email protected]>

* execute benchmarks in circleci (#875)

* Execute legs in order (#873)

* Added a test case

* execute tx in order

* Added an example edge case to comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fixed minor bugs in sto (#869)

* fixed minor bugs in sto

* updated logic

* Added test case for zero price sto

* Fixed zero balance bug

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* dedup invest call

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* `adjust_live_queue`: fix sort order bug (#880)

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* MESH-1489 (CP schedule ref counting) + MESH-1488 (CP schedule expiry-after-ticks) (#882)

* mesh-1489: ref count CP schedules

* mesh-1488: impl schedule expiry

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Wasm Builder as external crate (#876)

* Use external wasm builder

* Use builder revision

* Fix `syn::export::TokenStream2` error

* Update WASM_BINARY generated type

* CodeReview: Remove commented code

* CodeReview: Panic if wasm binary was not generated

* CodeReview: Dedup build

* MESH-1446/ Fix Genesis config ordering (#883)

* Fix Genesis ordering

* Fix Genesis ordering on testnet

* Mitigate overflow (#890)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Benchmark refactoring (#877)

* renaming of some benchmark vars

* fix wasm execution of ca bench

* dedup iu claim mocking

* Fixed node-bench compilation

* wip

* updated weights

* fixed auto generated weights

* Updated base fees

* Updated weight files to use our constants

* imporved crypto-cli

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Allow receipt signers to invalidate receipts (#878)

* Allow receipt signers to invalidate receipts

* dedup

* Addressed review comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Audit 8: Mitigate overflow (#887)

* Mitigate overflow

* New `TooMuchSigners` error

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Updated docs pipeline (#892)

* Updaed docs pipeline

* enabled docs building on patch branch to test

* build dummy wasm binaries

* removed test job

* MESH-1251/ Expose controller transfer as an extrinsic (#879)

* expose controller transfer as an extrinsic

* trigger concourse

* apply suggested changes

* remove controller redemption event

Co-authored-by: satyam <[email protected]>

* Audit 7: Mitigate Overflow (#889)

* Mitigate overflow

* CodeReview: Error when total price tiers overflows

* Remove some warnings

* CodeReview: Use try_fold

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* CodeReview: Inferrable param

* re-trigger pipeline

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* MESH-1397 live queue pips benches + MESH-1395 + MESH-1507 (#822)

* draft snapshot and enact benches

* assert -> ensure

* fixed snapshot setup in enact_snapshot_results

* added pips weights with live queue feature

* minor fix for vector allocation capacity

* added differentiation between Skip, Reject and Approve results

* added 2 comments from older review

* typing fixes

* refactored using User methods

* WIP fails to prune historical pips

* debugging expire_scheduled_pip with set_prune_historical_pips=true

* returned T::Proposal since runtime::Call doesn't unify with it

* expire_scheduled_pip UT works

* fixed pips benchmark panic

* attempt to define dependent ranges

* using plain, independent ranges

* shuffled approve/reject/skip

* added constant for max skipped pip count

* review comment + some debugging

* debug info

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* removed debug prints and added a test for execute_scheduled_pip

* updated pips weights

* removed debug code

* moved make_remark_proposal centrally

* capped weight of enact_snapshot_results at MaximumBlockWeight

* introduced new constant for the max weight of enact_snapshot_results

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* Merge pull request #874 from PolymathNetwork/MESH-1467/Script-to-give-USDP-to-existing-DIDs-on-Alcyone

Mesh 1467/script to give ALCY to existing DIDs on Alcyone

* Upgrade substrate and rust + add code coverage (#886)

* upgraded references to substrate

* patch for syn's api breaking change

* Upgraded cryptography dependency

* Upgraded rust version

* coverage script

* wip

* wip

* Added code coverage to ci

* updated script

* Updated coverage script

* source-coverage

Remove trailing newline from rust-toolchain file

* Updated script

* attempt #358

* re-trigger pipeline

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* updated coverage script

* use unsigned for balances

* Updated path ignores in coverage

* updated scripts

* formating

* fixed new benchmarks

Co-authored-by: Claus Strommer <[email protected]>

* MESH-1490: Checkpoint benchmarks (#891)

* cleanup asset benchs

* mesh-1490: {checkpoint -> checkpoint/mod}.rs

* benchs: cleanup cfgs

* mesh-1490: benchmark checkpoints

* mesh-1490: address review comments

* mesh-1490: use schedule_max_complexity

* fix rebase fallout

* Added codecov config (#896)

* Added codecov config

* caching fixes

* Override some default polkadot types (#895)

* override some default polkadot types

* updated cli dependencies

* Trigger ci

* Mesh 1301 / Fix staking benches (#881)

* initial commit

* add benches for newly added functions

* fix staking benches

* minor improvements

* fix payout stakers

* fix linting

* minor fix in benchmarks compliation

* add weight file

* update weight definitions of extrinsics

* add bench for some remaining extrinsics

* remove weight mod reference

* minor fixes

* bench build fix

* fix bench build

* final-fix

* remove default implementation

Co-authored-by: satyam <[email protected]>
Co-authored-by: Mudit Gupta <[email protected]>

* Moved asset types to polymesh-primitives (#898)

* moved asset types to polymesh-primitives

* added asset in primitives

* benchmarking fixes

* Update primitives/src/asset.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* removed unused defs and added doc comments

* fmt

* comments on terminology

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: Adam Dossa <[email protected]>

* CircleCI changes (#901)

* CircleCI go brrr

* minor optimizations

* updated caching

* fixed bench

* final run

* MESH-1531: Fix Checkpoint.timestamps into double map keyed by `Ticker` (#899)

* mesh-1531: add repro test

* mesh-1531: repro -> regression test

* mesh-1531: add storage migration

* cargo fmt

* mesh-1531: twox -> blake2

* mesh-1531: everybody gets double maps

Co-authored-by: Adam Dossa <[email protected]>

* MESH-1518/Upgrade to Substrate's Polymath fork (#893)

* Upgrade to Substrate's Polymath fork

* Recover benchmark compilation

* Impl Simple FIFO with Priority = tip

* SignedExtension for FIFO by priority

* TX priority = tip, Unit Tests

* `CheckWeight` re-implemented on polymesh

* Fmt fix

* Remove parity substrate deps

* Temporary CI update

* Revert temporary CI update

* CodeReview: More comments

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <[email protected]>

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <[email protected]>

Co-authored-by: Vladimir Komendantskiy <[email protected]>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Storage migration tests (#900)

* wip

* wip

* wip

* cleanup

* more cleanup

* wip

* restructure

* moving things around

* assert

* minor cleanup

* feature gate migrations

* fixed warnings

* Update migration-tests/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* Added checkpoints migration tests

* fixed merge conflict

* Added support for different substrate versions

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* Removed unnecessary constraints (#905)

* removed unnecessary constraints

* fixed settlement benchmarks

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1473/Create a list of transactions that require Asset/Portfolio permissions (#894)

* WIP

* WIP

* Update utils/permissions/Cargo.toml

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* WIP

* WIP

* Update utils/permissions/src/doc_parser/enums.rs

Co-authored-by: Francisco Miguel García <[email protected]>

* crate docs

Co-authored-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: Francisco Miguel García <[email protected]>

* Add modify window event and stop event to STO (#903)

* add modify window event and stop event

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <[email protected]>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <[email protected]>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <[email protected]>

* fix build

* add CloseEarly status

* updated schema

* fixed benchmarks

Co-authored-by: Mudit Gupta <[email protected]>
Co-authored-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added support for H2 tag perms (#907)

* Added support for H2 tag perms

* closure

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Updated version

* MESH-1533/Require minimum 1 POLYX bond (#910)

* WIP

* minor changes

Co-authored-by: Mudit Gupta <[email protected]>

* bond 1 polyx in integration tests (#911)

* fixed ValidatorPrefsWithBlocked hack (#913)

Co-authored-by: Francisco Miguel García <[email protected]>
Co-authored-by: Vladimir Komendantskiy <[email protected]>
Co-authored-by: Adam Dossa <[email protected]>
Co-authored-by: Mazdak Farrokhzad <[email protected]>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Satyam Agrawal <[email protected]>
Co-authored-by: satyam <[email protected]>
Co-authored-by: CJP10 <[email protected]>
Co-authored-by: Joel Moore <[email protected]>
Co-authored-by: Claus Strommer <[email protected]>
  • Loading branch information
11 people authored Feb 25, 2021
2 parents af9b89c + be6d6d7 commit d656274
Show file tree
Hide file tree
Showing 219 changed files with 15,102 additions and 8,709 deletions.
155 changes: 105 additions & 50 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,44 @@ version: 2
jobs:
lint:
docker:
- image: polymathnet/rust:debian-nightly-2020-09-28
- image: polymathnet/rust:debian-nightly-2021-01-25
resource_class: medium
environment:
VERBOSE: "1"
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "a1:99:47:ca:fa:32:4c:9d:4b:b8:50:99:c7:64:e3:80"
- run:
name: Check formatting
command: ./scripts/rustfmt.sh
build:
docker:
- image: polymathnet/rust:debian-nightly-2020-09-28
- image: polymathnet/rust:debian-nightly-2021-01-25
resource_class: xlarge
environment:
- VERBOSE: "1"
- RUSTFLAGS: -D warnings
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "b3:bb:01:c5:90:77:ef:5c:e6:5b:f2:db:16:2f:e8:61"
- "a1:99:47:ca:fa:32:4c:9d:4b:b8:50:99:c7:64:e3:80"
- run:
name: Store rust version in an environment var for cache key
command: rustc --version > rust.version
- restore_cache:
keys:
- v4-release-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
- v4-release-cache-{{ checksum "./rust.version" }}
- run:
name: Build release
command: cargo build --release || cargo build -j 1 --release
no_output_timeout: 4h
command: cargo build --release
no_output_timeout: 1h
- save_cache:
key: v4-release-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
paths:
- "/usr/local/cargo"
- "~/.cargo"
- "./target"
benchmark-build:
docker:
- image: polymathnet/rust:debian-nightly-2020-09-28
- image: polymathnet/rust:debian-nightly-2021-01-25
resource_class: xlarge
environment:
- VERBOSE: "1"
- RUSTFLAGS: -D warnings
Expand All @@ -54,28 +50,69 @@ jobs:
command: rustc --version > rust.version
- restore_cache:
keys:
- v1-bb-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
- v2-bench-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
- run:
name: Build binary with runtime-benchmarks
command: cargo build --release --features=runtime-benchmarks || cargo build --release -j 1 --features=runtime-benchmarks
no_output_timeout: 30m
command: cargo build --release --features=runtime-benchmarks,running-ci
no_output_timeout: 1h
- persist_to_workspace:
root: ./target/release
paths:
- polymesh
- save_cache:
key: v1-bb-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
key: v2-bench-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
paths:
- "/usr/local/cargo"
- "~/.cargo"
- "./target"
benchmark:
docker:
- image: debian:stable
resource_class: medium
environment:
- VERBOSE: "1"
steps:
- attach_workspace:
at: .
- run:
name: Run benchmarks
command: ./polymesh benchmark -p=* -e=* -r 1 -s 1 --execution native --db-cache 512 --heap-pages=2048
no_output_timeout: 1h
migration-tests:
docker:
- image: polymathnet/rust:debian-nightly-2021-01-25
resource_class: large
environment:
- VERBOSE: "1"
- RUSTFLAGS: -D warnings
- BUILD_DUMMY_WASM_BINARY: "1"
steps:
- checkout
- run:
name: Store rust version in an environment var for cache key
command: rustc --version > rust.version
- restore_cache:
keys:
- v1-migration-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
- run:
name: Run migration tests
command: cargo test -p migration-tests --lib -- --nocapture
no_output_timeout: 1h
- save_cache:
key: v1-migration-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
paths:
- "/usr/local/cargo"
- "~/.cargo"
- "./target"
test:
docker:
- image: polymathnet/rust:debian-nightly-2020-09-28
- image: polymathnet/rust:debian-nightly-2021-01-25
resource_class: large
environment:
- VERBOSE: "1"
- RUSTFLAGS: -D warnings
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "b3:bb:01:c5:90:77:ef:5c:e6:5b:f2:db:16:2f:e8:61"
- "a1:99:47:ca:fa:32:4c:9d:4b:b8:50:99:c7:64:e3:80"
- run:
name: Store rust version in a file for cache key
command: rustc --version > rust.version
Expand All @@ -94,34 +131,50 @@ jobs:
--package node-rpc-runtime-api
--package pallet-transaction-payment
--package polymesh-runtime-tests
--features default_identity ||
cargo test -j 1
--package polymesh-runtime-tests
--package pallet-staking
--package pallet-group
--package pallet-sudo
--package polymesh-primitives
--package node-rpc-runtime-api
--package pallet-transaction-payment
--package polymesh-runtime-tests
--features default_identity
no_output_timeout: 30m
no_output_timeout: 1h
- save_cache:
key: v11-test-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
paths:
- "/usr/local/cargo"
- "~/.cargo"
- "./target"
coverage:
docker:
- image: polymathnet/rust:debian-nightly-2021-01-25
resource_class: large
environment:
- VERBOSE: "1"
- RUSTFLAGS: -D warnings
steps:
- checkout
- run:
name: Store rust version in a file for cache key
command: rustc --version > rust.version
- restore_cache:
keys:
- v4-coverage-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
- run:
name: Install dependencies
command: rustup component add llvm-tools-preview && cargo install rustfilt cargo-binutils
- run:
name: Coverage
command: bash ./scripts/coverage.sh
no_output_timeout: 1h
- save_cache:
key: v4-coverage-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
paths:
- "/usr/local/cargo"
- "~/.cargo"
- "./target"
cli:
docker:
- image: polymathnet/rust:debian-nightly-2020-09-28
- image: polymathnet/rust:debian-nightly-2021-01-25
resource_class: xlarge
environment:
VERBOSE: "1"
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "b3:bb:01:c5:90:77:ef:5c:e6:5b:f2:db:16:2f:e8:61"
- "a1:99:47:ca:fa:32:4c:9d:4b:b8:50:99:c7:64:e3:80"
- run:
name: Store rust version in a file for cache key
command: rustc --version > rust.version
Expand All @@ -130,7 +183,7 @@ jobs:
- v6-cli-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
- run:
name: Build release
command: cargo build --release || cargo build -j 1 --release
command: cargo build --release
no_output_timeout: 4h
- run:
name: cli node instance
Expand All @@ -140,7 +193,7 @@ jobs:
name: cli scripts install
command: npm install
working_directory: ./scripts/cli
no_output_timeout: 30m
no_output_timeout: 1h
- run:
name: cli scripts test
command: npm test
Expand All @@ -149,40 +202,42 @@ jobs:
- save_cache:
key: v6-cli-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
paths:
- "/usr/local/cargo"
- "~/.cargo"
- "./target"
- "./scripts/cli/node_modules"
clippy:
docker:
- image: polymathnet/rust:debian-nightly-2020-09-28
- image: polymathnet/rust:debian-nightly-2021-01-25
resource_class: large
environment:
VERBOSE: "1"
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "b3:bb:01:c5:90:77:ef:5c:e6:5b:f2:db:16:2f:e8:61"
- "a1:99:47:ca:fa:32:4c:9d:4b:b8:50:99:c7:64:e3:80"
- run:
name: Store rust version in a file for cache key
command: rustc --version > rust.version
- restore_cache:
keys:
- v4-clippy-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
- v4-clippy-cache-{{ checksum "./rust.version" }}
- run:
name: run clippy
command: cargo clippy -j 1
no_output_timeout: 60m
command: cargo clippy
no_output_timeout: 1h
- save_cache:
key: v4-clippy-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
paths:
- "/usr/local/cargo"
- "~/.cargo"
- "./target"
workflows:
version: 2
commit:
jobs:
- lint
- test
- benchmark-build
- lint
- coverage
- migration-tests
- benchmark:
requires:
- benchmark-build
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ jobs:
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2020-09-28
target: wasm32-unknown-unknown
override: true
default: true
- name: Build docs
run: cargo doc --no-deps --workspace --release --verbose --exclude node-bench --exclude node-testing
run: BUILD_DUMMY_WASM_BINARY=1 cargo doc --no-deps --workspace --release --exclude node-bench --exclude node-testing
- name: Add index file
run: echo "<html lang='en'><head><meta http-equiv='refresh' content='0; URL=./polymesh/index.html'></head></html>" > ./target/doc/index.html
- name: Publish to Cloudflare workers
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ tmp/

# vim swap files
**/*.swp

# profiling data for code coverage
**/*.profraw
*.profdata
coverage.txt

**/test_cache
**/CACHE
Loading

0 comments on commit d656274

Please sign in to comment.