2018-06-27 09:01:06 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-08-21 00:56:05 +02:00
|
|
|
if [ ! -z "$TRAVIS_TAG" ]; then
|
|
|
|
echo "Skipping Test: Tagged build"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
CHUNK_INDEX=$1
|
|
|
|
CHUNKS_CNT=$2
|
|
|
|
BUILD_PIO=0
|
|
|
|
if [ "$#" -lt 2 ]; then
|
|
|
|
echo "Building all sketches"
|
|
|
|
CHUNK_INDEX=0
|
|
|
|
CHUNKS_CNT=1
|
|
|
|
BUILD_PIO=1
|
|
|
|
fi
|
|
|
|
if [ "$CHUNKS_CNT" -le 0 ]; then
|
|
|
|
CHUNK_INDEX=0
|
|
|
|
CHUNKS_CNT=1
|
|
|
|
BUILD_PIO=1
|
|
|
|
fi
|
|
|
|
if [ "$CHUNK_INDEX" -gt "$CHUNKS_CNT" ]; then
|
|
|
|
CHUNK_INDEX=$CHUNKS_CNT
|
|
|
|
fi
|
|
|
|
if [ "$CHUNK_INDEX" -eq "$CHUNKS_CNT" ]; then
|
|
|
|
BUILD_PIO=1
|
|
|
|
fi
|
2018-06-27 09:01:06 +02:00
|
|
|
|
2019-08-21 00:56:05 +02:00
|
|
|
# CMake Test
|
|
|
|
if [ "$CHUNK_INDEX" -eq 0 ]; then
|
|
|
|
echo -e "travis_fold:start:check_cmakelists"
|
2019-08-28 00:28:11 +02:00
|
|
|
tools/ci/check-cmakelists.sh
|
2019-08-21 00:56:05 +02:00
|
|
|
if [ $? -ne 0 ]; then exit 1; fi
|
|
|
|
echo -e "travis_fold:end:check_cmakelists"
|
|
|
|
fi
|
2018-06-27 09:01:06 +02:00
|
|
|
|
2019-08-21 00:56:05 +02:00
|
|
|
if [ "$BUILD_PIO" -eq 0 ]; then
|
|
|
|
# ArduinoIDE Test
|
|
|
|
echo -e "travis_fold:start:prep_arduino_ide"
|
2019-08-28 00:28:11 +02:00
|
|
|
tools/ci/prep-arduino-ide.sh
|
2019-08-21 00:56:05 +02:00
|
|
|
if [ $? -ne 0 ]; then exit 1; fi
|
|
|
|
echo -e "travis_fold:end:prep_arduino_ide"
|
2018-06-27 09:01:06 +02:00
|
|
|
|
2019-08-21 00:56:05 +02:00
|
|
|
echo -e "travis_fold:start:test_arduino_ide"
|
2019-08-28 00:28:11 +02:00
|
|
|
tools/ci/test-arduino-ide.sh $CHUNK_INDEX $CHUNKS_CNT
|
2019-08-21 00:56:05 +02:00
|
|
|
if [ $? -ne 0 ]; then exit 1; fi
|
|
|
|
echo -e "travis_fold:end:test_arduino_ide"
|
2018-06-27 09:01:06 +02:00
|
|
|
|
2019-08-21 00:56:05 +02:00
|
|
|
echo -e "travis_fold:start:size_report"
|
|
|
|
cat size.log
|
|
|
|
echo -e "travis_fold:end:size_report"
|
|
|
|
else
|
|
|
|
# PlatformIO Test
|
|
|
|
echo -e "travis_fold:start:prep_platformio"
|
|
|
|
cd tools && python get.py && cd ..
|
2019-08-28 00:28:11 +02:00
|
|
|
tools/ci/prep-platformio.sh
|
2019-08-21 00:56:05 +02:00
|
|
|
if [ $? -ne 0 ]; then exit 1; fi
|
|
|
|
echo -e "travis_fold:end:prep_platformio"
|
2018-06-27 09:01:06 +02:00
|
|
|
|
2019-08-21 00:56:05 +02:00
|
|
|
echo -e "travis_fold:start:test_platformio"
|
2019-08-28 00:28:11 +02:00
|
|
|
tools/ci/test-platformio.sh
|
2019-08-21 00:56:05 +02:00
|
|
|
if [ $? -ne 0 ]; then exit 1; fi
|
|
|
|
echo -e "travis_fold:end:test_platformio"
|
|
|
|
fi
|