From 34725462ced8f428a75ab83ed00293e1da05dbc7 Mon Sep 17 00:00:00 2001 From: hammeWang Date: Mon, 8 Jul 2019 16:07:55 +0800 Subject: [PATCH 1/8] update kton --- srml/token/kton/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srml/token/kton/src/lib.rs b/srml/token/kton/src/lib.rs index d7010e00d..4722a5d17 100644 --- a/srml/token/kton/src/lib.rs +++ b/srml/token/kton/src/lib.rs @@ -242,7 +242,7 @@ decl_module! { let value_can_withdraw = Self::reward_can_withdraw(&transactor); if !value_can_withdraw.is_zero() { Self::update_reward_paid_out(&transactor, value_can_withdraw, false); - T::Currency::transfer(&Self::sys_acc(), &transactor, value_can_withdraw); + T::Currency::transfer(&Self::sys_acc(), &transactor, value_can_withdraw)?; Self::deposit_event(RawEvent::RewardClaim(transactor, value_can_withdraw)); } } From 84168a7fc60e17e638da73e13deec97559fdfb86 Mon Sep 17 00:00:00 2001 From: HackFisher Date: Mon, 8 Jul 2019 19:13:33 +0800 Subject: [PATCH 2/8] Try fix travis Signed-off-by: HackFisher --- .travis.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 253f1aa23..1491fc3c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,10 @@ sudo: true language: minimal -cache: cargo +cache: + cargo: true + directories: + $HOME/build/darwinia-network/darwinia/node/runtime/wasm/target branches: only: @@ -12,16 +15,18 @@ branches: env: global: - RUST_BACKTRACE=1 - matrix: - - RUST_TOOLCHAIN=nightly TARGET=wasm - - RUST_TOOLCHAIN=stable TARGET=native before_install: # Check how much space we've got on this machine. - df -h -script: - - ./ci/script.sh + +jobs: + include: + - stage: Install + script: ./ci/script.sh nightly wasm + - stage: Test + script: ./ci/script.sh stable native after_script: # Check how much free disk space left after the build From 453df8e71af6ea667a91985a28af4fb38e8e082a Mon Sep 17 00:00:00 2001 From: HackFisher Date: Mon, 8 Jul 2019 19:20:49 +0800 Subject: [PATCH 3/8] Try fix travis --- .travis.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1491fc3c0..6eda3bee1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,23 +10,21 @@ cache: branches: only: - - master + - master env: global: - RUST_BACKTRACE=1 + matrix: + - RUST_TOOLCHAIN=nightly TARGET=wasm + - RUST_TOOLCHAIN=stable TARGET=native before_install: # Check how much space we've got on this machine. - df -h - -jobs: - include: - - stage: Install - script: ./ci/script.sh nightly wasm - - stage: Test - script: ./ci/script.sh stable native +script: + - ./ci/script.sh after_script: # Check how much free disk space left after the build From 5b6562d09423eac6ea9c65e77efefd1b97ce6b0c Mon Sep 17 00:00:00 2001 From: HackFisher Date: Mon, 8 Jul 2019 19:22:35 +0800 Subject: [PATCH 4/8] Try fix travis third time --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6eda3bee1..439ef7dfa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ language: minimal cache: cargo: true directories: - $HOME/build/darwinia-network/darwinia/node/runtime/wasm/target + - $HOME/build/darwinia-network/darwinia/node/runtime/wasm/target branches: only: From d558b1e8f4536f8246072ff700019421f4f015b0 Mon Sep 17 00:00:00 2001 From: HackFisher Date: Mon, 8 Jul 2019 19:53:51 +0800 Subject: [PATCH 5/8] Using job stages for independency cache --- .travis.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 439ef7dfa..7b475876b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ language: minimal cache: cargo: true directories: - - $HOME/build/darwinia-network/darwinia/node/runtime/wasm/target + - $HOME/build/darwinia-network/darwinia/node/runtime/wasm/target/wasm32-unknown-unknown/release branches: only: @@ -15,16 +15,18 @@ branches: env: global: - RUST_BACKTRACE=1 - matrix: - - RUST_TOOLCHAIN=nightly TARGET=wasm - - RUST_TOOLCHAIN=stable TARGET=native before_install: # Check how much space we've got on this machine. - df -h + - ls $HOME/build/darwinia-network/darwinia/node/runtime/wasm/target/wasm32-unknown-unknown/release -script: - - ./ci/script.sh +jobs: + include: + - stage: Install + script: ./ci/script.sh nightly wasm + - stage: Test + script: ./ci/script.sh stable native after_script: # Check how much free disk space left after the build From b3377f19f156e6fa4c993a8cde2a04a65fc13b30 Mon Sep 17 00:00:00 2001 From: HackFisher Date: Mon, 8 Jul 2019 19:57:43 +0800 Subject: [PATCH 6/8] test travis again --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7b475876b..f1dce9348 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,9 +24,12 @@ before_install: jobs: include: - stage: Install - script: ./ci/script.sh nightly wasm + script: RUST_TOOLCHAIN=nightly TARGET=wasm - stage: Test - script: ./ci/script.sh stable native + script: RUST_TOOLCHAIN=stable TARGET=native + +script: + - ./ci/script.sh after_script: # Check how much free disk space left after the build From 4a48121497e6de5b5fc806874bb074093181acab Mon Sep 17 00:00:00 2001 From: HackFisher Date: Mon, 8 Jul 2019 20:07:58 +0800 Subject: [PATCH 7/8] script required to be updated if travis change to jobs like this --- .travis.yml | 7 ++----- ci/script.sh | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index f1dce9348..7b475876b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,12 +24,9 @@ before_install: jobs: include: - stage: Install - script: RUST_TOOLCHAIN=nightly TARGET=wasm + script: ./ci/script.sh nightly wasm - stage: Test - script: RUST_TOOLCHAIN=stable TARGET=native - -script: - - ./ci/script.sh + script: ./ci/script.sh stable native after_script: # Check how much free disk space left after the build diff --git a/ci/script.sh b/ci/script.sh index e3f86d316..5d5f1d2c6 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -17,12 +17,12 @@ case $TARGET in sudo apt-get -y update sudo apt-get install -y cmake pkg-config libssl-dev - cargo test --all --locked "$@" + cargo test --all --locked ;; "wasm") # Install prerequisites and build all wasm projects ./init.sh - ./build.sh --locked "$@" + ./build.sh --locked ;; esac \ No newline at end of file From 4ec2fbe6818c791ddf44cbd87810417bd2e7a93c Mon Sep 17 00:00:00 2001 From: HackFisher Date: Mon, 8 Jul 2019 20:13:17 +0800 Subject: [PATCH 8/8] update script.sh --- ci/script.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/script.sh b/ci/script.sh index 5d5f1d2c6..67dcd4e89 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -3,7 +3,7 @@ set -eux # Install rustup and the specified rust toolchain. -curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$RUST_TOOLCHAIN -y +curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$1 -y # Load cargo environment. Specifically, put cargo into PATH. source ~/.cargo/env @@ -12,7 +12,7 @@ rustc --version rustup --version cargo --version -case $TARGET in +case $2 in "native") sudo apt-get -y update sudo apt-get install -y cmake pkg-config libssl-dev