diff options
| author | chemicstry <[email protected]> | 2022-07-11 02:32:30 +0300 |
|---|---|---|
| committer | chemicstry <[email protected]> | 2022-07-11 02:32:30 +0300 |
| commit | 5bd2324275f8caed7db0106e9fdaf65f9454185b (patch) | |
| tree | 67c34ed3001602a00272db07be79c0a55bf595f7 | |
| parent | c6a11db39ef829adfb8b4903065446c4bb7a2ef4 (diff) | |
Fix ci for windows (msys, git bash)
| -rwxr-xr-x | ci.sh | 12 |
1 files changed, 10 insertions, 2 deletions
| @@ -6,6 +6,14 @@ 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 | TARGET=$(rustc -vV | sed -n 's|host: ||p') | ||
| 10 | |||
| 11 | if [ $TARGET = "x86_64-unknown-linux-gnu" ]; then | ||
| 12 | BUILD_EXTRA="--- build --release --manifest-path examples/std/Cargo.toml --target $TARGET --out-dir out/examples/std" | ||
| 13 | else | ||
| 14 | BUILD_EXTRA="" | ||
| 15 | fi | ||
| 16 | |||
| 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 | 17 | 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 | 18 | ||
| 11 | # Generate stm32-metapac | 19 | # Generate stm32-metapac |
| @@ -19,7 +27,7 @@ cp -r stm32-metapac-backup stm32-metapac | |||
| 19 | 27 | ||
| 20 | # for some reason Cargo stomps the cache if we don't specify --target. | 28 | # for some reason Cargo stomps the cache if we don't specify --target. |
| 21 | # This happens with vanilla Cargo, not just cargo-batch. Bug? | 29 | # This happens with vanilla Cargo, not just cargo-batch. Bug? |
| 22 | (cd stm32-metapac-gen; cargo run --release --target x86_64-unknown-linux-gnu) | 30 | (cd stm32-metapac-gen; cargo run --release --target $TARGET) |
| 23 | rm -rf stm32-metapac | 31 | rm -rf stm32-metapac |
| 24 | mv stm32-metapac-gen/out stm32-metapac | 32 | mv stm32-metapac-gen/out stm32-metapac |
| 25 | 33 | ||
| @@ -68,7 +76,6 @@ cargo batch \ | |||
| 68 | --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-hal/Cargo.toml --target thumbv7em-none-eabi \ | 76 | --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-hal/Cargo.toml --target thumbv7em-none-eabi \ |
| 69 | --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-irq/Cargo.toml --target thumbv7em-none-eabi \ | 77 | --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-irq/Cargo.toml --target thumbv7em-none-eabi \ |
| 70 | --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml --target thumbv7em-none-eabi \ | 78 | --- build --release --manifest-path docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml --target thumbv7em-none-eabi \ |
| 71 | --- build --release --manifest-path examples/std/Cargo.toml --target x86_64-unknown-linux-gnu --out-dir out/examples/std \ | ||
| 72 | --- build --release --manifest-path examples/nrf/Cargo.toml --target thumbv7em-none-eabi --out-dir out/examples/nrf \ | 79 | --- build --release --manifest-path examples/nrf/Cargo.toml --target thumbv7em-none-eabi --out-dir out/examples/nrf \ |
| 73 | --- build --release --manifest-path examples/rp/Cargo.toml --target thumbv6m-none-eabi --out-dir out/examples/rp \ | 80 | --- build --release --manifest-path examples/rp/Cargo.toml --target thumbv6m-none-eabi --out-dir out/examples/rp \ |
| 74 | --- build --release --manifest-path examples/stm32f0/Cargo.toml --target thumbv6m-none-eabi --out-dir out/examples/stm32f0 \ | 81 | --- build --release --manifest-path examples/stm32f0/Cargo.toml --target thumbv6m-none-eabi --out-dir out/examples/stm32f0 \ |
| @@ -105,6 +112,7 @@ cargo batch \ | |||
| 105 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55rg --out-dir out/tests/nucleo-stm32wb55rg \ | 112 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55rg --out-dir out/tests/nucleo-stm32wb55rg \ |
| 106 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32u585ai --out-dir out/tests/iot-stm32u585ai \ | 113 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32u585ai --out-dir out/tests/iot-stm32u585ai \ |
| 107 | --- build --release --manifest-path tests/rp/Cargo.toml --target thumbv6m-none-eabi --out-dir out/tests/rpi-pico \ | 114 | --- build --release --manifest-path tests/rp/Cargo.toml --target thumbv6m-none-eabi --out-dir out/tests/rpi-pico \ |
| 115 | $BUILD_EXTRA | ||
| 108 | 116 | ||
| 109 | 117 | ||
| 110 | function run_elf { | 118 | function run_elf { |
