diff options
| author | Matous Hybl <[email protected]> | 2021-12-08 12:33:41 +0100 |
|---|---|---|
| committer | Matous Hybl <[email protected]> | 2021-12-09 12:37:44 +0100 |
| commit | bdde4dc966ca865e48c5e00e5bb3445118fa30d6 (patch) | |
| tree | 537f51c43185da136b5041dc169a0fbef61a888b | |
| parent | 8ad8e3b718d0f66e2d6e52c4beb112977c6a73b4 (diff) | |
Enable running ci.sh locally multiple-times.
| -rw-r--r-- | .gitignore | 4 | ||||
| -rwxr-xr-x | ci.sh | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index 7faa2c32d..92f9a32b2 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -4,3 +4,7 @@ Cargo.lock | |||
| 4 | third_party | 4 | third_party |
| 5 | /Cargo.toml | 5 | /Cargo.toml |
| 6 | stm32-metapac-gen/out/ | 6 | stm32-metapac-gen/out/ |
| 7 | stm32-metapac-backup | ||
| 8 | stm32-metapac/src/chips | ||
| 9 | stm32-metapac/src/peripherals | ||
| 10 | out/ | ||
| @@ -6,9 +6,17 @@ export CARGO_TARGET_DIR=$PWD/target_ci | |||
| 6 | export RUSTFLAGS=-Dwarnings | 6 | export RUSTFLAGS=-Dwarnings |
| 7 | export DEFMT_LOG=trace | 7 | export DEFMT_LOG=trace |
| 8 | 8 | ||
| 9 | find . -name '*.rs' -not -path '*target*' -not -path '*stm32-metapac-gen/out/*' | xargs rustfmt --check --skip-children --unstable-features --edition 2018 | 9 | 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 |
| 10 | 10 | ||
| 11 | # Generate stm32-metapac | 11 | # Generate stm32-metapac |
| 12 | if [ ! -d "stm32-metapac-backup" ] | ||
| 13 | then | ||
| 14 | cp -r stm32-metapac stm32-metapac-backup | ||
| 15 | fi | ||
| 16 | |||
| 17 | rm -rf stm32-metapac | ||
| 18 | cp -r stm32-metapac-backup stm32-metapac | ||
| 19 | |||
| 12 | # for some reason Cargo stomps the cache if we don't specify --target. | 20 | # for some reason Cargo stomps the cache if we don't specify --target. |
| 13 | # This happens with vanilla Cargo, not just cargo-batch. Bug? | 21 | # This happens with vanilla Cargo, not just cargo-batch. Bug? |
| 14 | (cd stm32-metapac-gen; cargo run --release --target x86_64-unknown-linux-gnu) | 22 | (cd stm32-metapac-gen; cargo run --release --target x86_64-unknown-linux-gnu) |
