@@ -15,14 +15,6 @@ executors:
15
15
resource_class : small
16
16
17
17
commands :
18
- rust_setup :
19
- description : Set rustc version
20
- steps :
21
- - run :
22
- name : Set rustc version
23
- command : |
24
- rustup default stable
25
- rustup update stable
26
18
print_versions :
27
19
description : Version Info
28
20
steps :
@@ -32,6 +24,10 @@ commands:
32
24
env_setup :
33
25
description : Environment Setup
34
26
steps :
27
+ - run :
28
+ name : Set RUST_NIGHTLY
29
+ command : |
30
+ echo 'export RUST_NIGHTLY=nightly-2020-03-18' >> $BASH_ENV
35
31
- run :
36
32
name : Setup Env
37
33
command : |
@@ -40,6 +36,7 @@ commands:
40
36
echo 'export LIBRA_DUMP_LOGS=1' >> $BASH_ENV
41
37
echo 'export CARGO_INCREMENTAL=0' >> $BASH_ENV
42
38
echo 'export CI_TIMEOUT="timeout 40m"' >> $BASH_ENV
39
+ echo 'export CARGO="$(rustup which --toolchain $RUST_NIGHTLY cargo) -Z features=all"' >> $BASH_ENV
43
40
install_deps :
44
41
steps :
45
42
- run :
@@ -48,14 +45,15 @@ commands:
48
45
sudo apt-get update
49
46
sudo apt-get install -y cmake curl clang llvm
50
47
rustup component add clippy rustfmt
48
+ rustup toolchain install nightly
51
49
install_code_coverage_deps :
52
50
steps :
53
51
- run :
54
52
name : Install grcov and lcov
55
53
command : |
56
54
sudo apt-get update
57
55
sudo apt-get install lcov
58
- cargo install --force grcov
56
+ $(CARGO) install --force grcov
59
57
install_docker_linter :
60
58
steps :
61
59
- run :
@@ -64,11 +62,6 @@ commands:
64
62
export HADOLINT=${HOME}/hadolint
65
63
export HADOLINT_VER=v1.17.4
66
64
curl -sL -o ${HADOLINT} "https://github.com/hadolint/hadolint/releases/download/${HADOLINT_VER}/hadolint-$(uname -s)-$(uname -m)" && chmod 700 ${HADOLINT}
67
- install_rust_nightly_toolchain :
68
- steps :
69
- - run :
70
- name : Install nightly toolchain for features not in beta/stable
71
- command : rustup install nightly
72
65
find_dockerfile_changes :
73
66
steps :
74
67
- run :
@@ -82,7 +75,6 @@ commands:
82
75
build_setup :
83
76
steps :
84
77
- checkout
85
- - rust_setup
86
78
- print_versions
87
79
- env_setup
88
80
- install_deps
@@ -104,37 +96,37 @@ jobs:
104
96
- run :
105
97
name : Linting
106
98
command : |
107
- [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || cargo x lint
108
- [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || cargo xclippy --workspace --all-targets
109
- [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || cargo xfmt --check
110
- [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || cargo install cargo-guppy --git http://github.com/calibra/cargo-guppy --rev 8b2bc45c0cd6323a7a2b8170ddad6d2a5b79047b
111
- [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || [[ -z $(cargo guppy dups --target x86_64-unknown-linux-gnu --kind directthirdparty) ]]
99
+ [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || $CARGO x lint
100
+ [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || $CARGO xclippy --workspace --all-targets
101
+ [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || $CARGO xfmt --check
102
+ [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || $CARGO install cargo-guppy --git http://github.com/calibra/cargo-guppy --rev 8b2bc45c0cd6323a7a2b8170ddad6d2a5b79047b
103
+ [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || [[ -z $($CARGO guppy dups --target x86_64-unknown-linux-gnu --kind directthirdparty) ]]
112
104
- run :
113
105
name : Build Release
114
106
command : |
115
- [[ $CIRCLE_NODE_INDEX =~ [0234] ]] || RUST_BACKTRACE=1 cargo build -j 16 --release
107
+ [[ $CIRCLE_NODE_INDEX =~ [0234] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 --release
116
108
- run :
117
109
name : Build Dev
118
110
command : |
119
- [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16
120
- [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p libra-swarm
121
- [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p cluster-test
122
- [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p libra-fuzzer
123
- [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p language_benchmarks
124
- [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p cost-synthesis
125
- [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p test-generation
111
+ [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16
112
+ [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p libra-swarm
113
+ [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p cluster-test
114
+ [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p libra-fuzzer
115
+ [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p language_benchmarks
116
+ [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p cost-synthesis
117
+ [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p test-generation
126
118
- run :
127
119
name : Run All Non Flaky Unit Tests
128
120
command : |
129
- [[ $CIRCLE_NODE_INDEX =~ [0134] ]] || RUST_BACKTRACE=1 $CI_TIMEOUT cargo test --all-features --workspace --exclude libra-node --exclude libra-crypto --exclude testsuite --exclude consensus
121
+ [[ $CIRCLE_NODE_INDEX =~ [0134] ]] || RUST_BACKTRACE=1 $CI_TIMEOUT $CARGO test --all-features --workspace --exclude libra-node --exclude libra-crypto --exclude testsuite --exclude consensus
130
122
- run :
131
123
name : Run Cryptography Unit Tests with the formally verified backend
132
124
command : |
133
- [[ $CIRCLE_NODE_INDEX =~ [0134] ]] || ( RUST_BACKTRACE=1 cd crypto/crypto && $CI_TIMEOUT cargo test --features='std fiat_u64_backend fuzzing' --no-default-features )
125
+ [[ $CIRCLE_NODE_INDEX =~ [0134] ]] || ( RUST_BACKTRACE=1 cd crypto/crypto && $CI_TIMEOUT $CARGO test --features='std fiat_u64_backend fuzzing' --no-default-features )
134
126
- run :
135
127
name : Run All End to End Tests
136
128
command : |
137
- [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CI_TIMEOUT cargo x test --package testsuite -- --test-threads 1
129
+ [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CI_TIMEOUT $CARGO x test --package testsuite -- --test-threads 1
138
130
- run :
139
131
name : Run Quarantined Unit Tests 3 (consensus) times
140
132
command : |
@@ -155,16 +147,16 @@ jobs:
155
147
steps :
156
148
- build_setup
157
149
- run :
158
- name : Install Cargo Audit
150
+ name : Install cargo-audit
159
151
command : |
160
- cargo install --force cargo-audit
152
+ $CARGO install --force cargo-audit
161
153
- run :
162
154
# NOTE ignored advisory rules
163
155
# RUSTSEC-2018-0015 - term
164
156
# RUSTSEC-2019-0031 - spin
165
157
name : Audit crates
166
158
command : |
167
- cargo audit --deny-warnings \
159
+ $CARGO audit --deny-warnings \
168
160
--ignore RUSTSEC-2018-0015 \
169
161
--ignore RUSTSEC-2019-0031
170
162
- build_teardown
@@ -174,7 +166,6 @@ jobs:
174
166
steps :
175
167
- build_setup
176
168
- install_code_coverage_deps
177
- - install_rust_nightly_toolchain
178
169
- run :
179
170
name : Setup code coverage output
180
171
command : echo "export CODECOV_OUTPUT=codecov" >> $BASH_ENV
0 commit comments