@@ -65,23 +65,58 @@ jobs:
6565 steps :
6666 - configure_environment_variables
6767 - checkout
68+ - attach_workspace :
69+ at : " ."
70+ - restore_cache :
71+ keys :
72+ - cargo-v0-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
6873 - run :
6974 name : Install jq
7075 command : apt-get install jq -yqq
7176 - run :
7277 name : Build the Rust release
73- command : ./rust/ scripts/build-release.sh filecoin $(cat ./rust /rust-toolchain) --verbose --frozen --all
78+ command : cd rust; ./ scripts/build-release.sh filecoin $(cat ./rust-toolchain) --verbose --frozen --all
7479 - run :
7580 name : Publish release to GitHub
76- command : bash ./rust/scripts/publish-release.sh
81+ command : cd rust; bash ./scripts/publish-release.sh
82+ cargo_fetch :
83+ docker :
84+ - image : filecoin/rust:latest
85+ working_directory : /mnt/crate
86+ resource_class : xlarge
87+ steps :
88+ - configure_environment_variables
89+ - checkout
90+ - restore_cache :
91+ keys :
92+ - cargo-v0-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
93+ - run : rustup install $(cat rust-toolchain)
94+ - run : rustup default $(cat rust-toolchain)
95+ - run : rustup component add rustfmt-preview
96+ - run : rustup component add clippy-preview
97+ - run : cargo fetch
98+ - run : rustc +stable --version
99+ - run : rustc +$(cat rust-toolchain) --version
100+ - persist_to_workspace :
101+ root : " ."
102+ paths :
103+ - Cargo.lock
104+ - save_cache :
105+ key : cargo-v0-{{ checksum "rust-toolchain" }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}-{{ arch }}
106+ paths :
107+ - /root/.cargo
108+ - /root/.rustup
77109
78110workflows :
79111 version : 2
80112 test_all :
81113 jobs :
114+ - cargo_fetch
82115 - build_and_test_linux
83116 # - build_and_test_darwin
84- - build_linux_release
117+ - build_linux_release :
118+ requires :
119+ - cargo_fetch
85120
86121commands :
87122 configure_environment_variables :
0 commit comments