-
Notifications
You must be signed in to change notification settings - Fork 9
/
ci.sh
executable file
·38 lines (27 loc) · 947 Bytes
/
ci.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -euxo pipefail
# build cargo-embassy
cargo build --release
test_dir="/tmp/ci"
# create test directory
if [ -d $test_dir ]; then
rm -r $test_dir
fi
cwd=`pwd`
mkdir $test_dir
cd $test_dir
# generation
# stm
$cwd/target/release/cargo-embassy embassy init test-stm32g0 --chip stm32g031k8
$cwd/target/release/cargo-embassy embassy init test-stm32g4 --chip stm32g431rb --panic-handler reset
# nrf
$cwd/target/release/cargo-embassy embassy init test-nrf52840 --chip nrf52840
$cwd/target/release/cargo-embassy embassy init test-nrf52832 --chip nrf52832-xxab --softdevice s132
# compile
cd test-stm32g0; cargo build; cargo build --no-default-features --release
cd ../test-stm32g4; cargo build; cargo build --no-default-features --release
cd ../test-nrf52840; cargo build; cargo build --no-default-features --release
cd ../test-nrf52832; cargo build; cargo build --no-default-features --release
# clean up
cd ../..
# rm -r ci