Skip to content

Commit

Permalink
Create sen-wea.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jp112sdl authored Feb 11, 2021
1 parent 31ae553 commit 6b7b426
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/sen-wea.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR
SKETCHES=()

jp112sdl=(
HB-UNI-Sen-WEA
)
for S in "${jp112sdl[@]}"; do
SKETCHES+=(sketches/$S/$S.ino)
done


# Run tests
HAS_ERROR=false
for FILE in "${SKETCHES[@]}"; do
echo "Compiling $(basename $FILE)"
arduino-cli compile \
--clean \
--quiet \
-b arduino:avr:pro:cpu=8MHzatmega328 \
$FILE
[ $? -ne 0 ] && HAS_ERROR=true
done

# AES?
# --build-property "build.extra_flags=-DUSE_AES -DHM_DEF_KEY=0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10 -DHM_DEF_KEY_INDEX=0" \

if $HAS_ERROR; then
>&2 echo "Errors occurred!"
exit 1
fi

0 comments on commit 6b7b426

Please sign in to comment.