6060 else
6161 echo "The Rust nightly version has changed. Clearing the cache";
6262 rm -rf $CARGO_TARGET_DIR/*;
63- fi
63+ fi;
64+ rustc +nightly --version > $CARGO_TARGET_DIR/check_nightly_rust;
6465 shell : bash
65- - name : Add rustfmt
66- run : rustup component add rustfmt --toolchain ${{ matrix.toolchain }}
67- - name : Style check
68- uses : actions-rs/cargo@master
69- with :
70- command : fmt
71- toolchain : ${{ matrix.toolchain }}
72- args : --all -- --check
7366 - name : Checking rust-${{ matrix.toolchain }}
7467 uses : actions-rs/cargo@master
7568 with :
8780 toolchain : ${{ matrix.toolchain }}
8881 args : --all --verbose
8982 - name : Stats sccache
90- if : always()
9183 run : sccache --show-stats
9284# # Build stage
9385 - name : Building rust-${{ matrix.toolchain }}
9890 toolchain : ${{ matrix.toolchain }}
9991 args : --all --release --verbose
10092 - name : Stats sccache
101- if : always()
93+ if : github.ref == 'refs/heads/master'
10294 run : sccache --show-stats
10395 - name : Prepare artifacts
10496 if : github.ref == 'refs/heads/master'
@@ -108,12 +100,6 @@ jobs:
108100 mv -v $CARGO_TARGET_DIR/release/ethereum-poa-relay ./artifacts/;
109101 mv -v $CARGO_TARGET_DIR/release/substrate-bridge ./artifacts/;
110102 shell : bash
111- - name : Rust nightly version
112- run : |
113- echo "Cached Rust nightly version:";
114- rustc +nightly --version;
115- rustc +nightly --version > $CARGO_TARGET_DIR/check_nightly_rust;
116- shell : bash
117103 - name : Upload artifacts
118104 if : github.ref == 'refs/heads/master'
119105 uses : actions/upload-artifact@v1
0 commit comments