-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun-tests.sh
More file actions
executable file
·31 lines (24 loc) · 828 Bytes
/
Copy pathrun-tests.sh
File metadata and controls
executable file
·31 lines (24 loc) · 828 Bytes
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
#!/usr/bin/env bash
set -e
# x86 x64 armv6m armv7m armv7emsp armv7emdp xtensa xtensawin rv32imc
: ${ARCH=x64}
export PATH=.:$PATH
for APP in assemblyscript cpp rust tinygo zig virgil wat coremark; do
echo "======================================"
echo " Building $APP.mpy ..."
echo "======================================"
echo
make clean all ARCH=$ARCH APP=$APP 2>&1 >/dev/null
if [[ $ARCH == @(x64|x86) ]]; then
micropython-$ARCH -c "import $APP as app; app.setup(); app.loop(); app.loop()"
else
mpremote cp $APP.mpy : 2>&1 >/dev/null
mpremote exec "import $APP as app; app.setup(); app.loop(); app.loop()" || true
fi
echo
done
GREEN="\033[0;32m"
NC="\033[0m"
echo "======================================"
echo -e "${GREEN} ALL OK ${NC}"
echo "======================================"