Merge #528
528: Enable running ci.sh locally multiple times. r=lulf a=matoushybl Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
This commit is contained in:
commit
08c8476145
2 changed files with 13 additions and 1 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -4,3 +4,7 @@ Cargo.lock
|
||||||
third_party
|
third_party
|
||||||
/Cargo.toml
|
/Cargo.toml
|
||||||
stm32-metapac-gen/out/
|
stm32-metapac-gen/out/
|
||||||
|
stm32-metapac-backup
|
||||||
|
stm32-metapac/src/chips
|
||||||
|
stm32-metapac/src/peripherals
|
||||||
|
out/
|
||||||
|
|
10
ci.sh
10
ci.sh
|
@ -6,9 +6,17 @@ export CARGO_TARGET_DIR=$PWD/target_ci
|
||||||
export RUSTFLAGS=-Dwarnings
|
export RUSTFLAGS=-Dwarnings
|
||||||
export DEFMT_LOG=trace
|
export DEFMT_LOG=trace
|
||||||
|
|
||||||
find . -name '*.rs' -not -path '*target*' -not -path '*stm32-metapac-gen/out/*' | xargs rustfmt --check --skip-children --unstable-features --edition 2018
|
find . -name '*.rs' -not -path '*target*' -not -path '*stm32-metapac-gen/out/*' -not -path '*stm32-metapac/src/*' | xargs rustfmt --check --skip-children --unstable-features --edition 2018
|
||||||
|
|
||||||
# Generate stm32-metapac
|
# Generate stm32-metapac
|
||||||
|
if [ ! -d "stm32-metapac-backup" ]
|
||||||
|
then
|
||||||
|
cp -r stm32-metapac stm32-metapac-backup
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf stm32-metapac
|
||||||
|
cp -r stm32-metapac-backup stm32-metapac
|
||||||
|
|
||||||
# for some reason Cargo stomps the cache if we don't specify --target.
|
# for some reason Cargo stomps the cache if we don't specify --target.
|
||||||
# This happens with vanilla Cargo, not just cargo-batch. Bug?
|
# This happens with vanilla Cargo, not just cargo-batch. Bug?
|
||||||
(cd stm32-metapac-gen; cargo run --release --target x86_64-unknown-linux-gnu)
|
(cd stm32-metapac-gen; cargo run --release --target x86_64-unknown-linux-gnu)
|
||||||
|
|
Loading…
Reference in a new issue