-
Notifications
You must be signed in to change notification settings - Fork 7
/
.auto-build.sh
executable file
·66 lines (51 loc) · 2.89 KB
/
.auto-build.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#/bin/bash
# Automatic build script
#
# To run locally, execute:
# sudo apt install doxygen graphviz texlive-latex-base texlive-latex-recommended texlive-pictures texlive-latex-extra
# Exit immediately if a command exits with a non-zero status.
set -e
echo "Starting auto-build script..."
function autobuild()
{
# Set environment variables
BOARDS_AVR="--board uno --board megaatmega2560 --board leonardo"
BOARDS_ARM="--board due"
BOARDS_ESP="--board d1_mini --board nodemcuv2 --board lolin_d32"
echo "Installing library dependencies"
platformio lib --global install https://github.com/Erriez/ErriezSerialTerminal
echo "Building examples..."
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231AgingOffset/ErriezDS3231AgingOffset.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231AlarmInterrupt/ErriezDS3231AlarmInterrupt.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231AlarmPolling/ErriezDS3231AlarmPolling.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231DumpRegisters/ErriezDS3231DumpRegisters.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231ReadTimeInterrupt/ErriezDS3231ReadTimeInterrupt.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231SetBuildDateTime/ErriezDS3231SetBuildDateTime.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231SetGetDateTime/ErriezDS3231SetGetDateTime.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231SetGetTime/ErriezDS3231SetGetTime.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231SQWInterrupt/ErriezDS3231SQWInterrupt.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231Temperature/ErriezDS3231Temperature.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231Terminal/ErriezDS3231Terminal.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231Test/ErriezDS3231Test.ino
platformio ci --lib="." ${BOARDS_AVR} ${BOARDS_ARM} ${BOARDS_ESP} examples/ErriezDS3231WriteRead/ErriezDS3231WriteRead.ino
}
function generate_doxygen()
{
echo "Generate Doxygen HTML..."
DOXYGEN_PDF="ErriezDS3231.pdf"
# Cleanup
rm -rf html latex
# Generate Doxygen HTML and Latex
doxygen Doxyfile
# Allow filenames starting with an underscore
echo "" > html/.nojekyll
# Generate PDF when script is not running on Travis-CI
if [[ -z ${TRAVIS_BUILD_DIR} ]]; then
# Generate Doxygen PDF
make -C latex
# Copy PDF to root directory
cp latex/refman.pdf ./${DOXYGEN_PDF}
fi
}
autobuild
generate_doxygen