mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Add full debug builds for all tests (#5146)
* Add full debug builds for all tests In order to ensure the -DEBUG builds don't fail with checked-in code, add two jobs which build even/odd with full debug flags to Travis. Fixes #5143 * Add in dump of platform.txt to verify build options * Fix BASH comparison of strings * Fix debug-mode compile error in ESP8266AVRISP * Add -Wextra to CI (matches IDE "All" warnings)
This commit is contained in:
parent
cc284bb533
commit
0a04ebf76d
@ -13,6 +13,10 @@ matrix:
|
|||||||
- BUILD_TYPE=build_even
|
- BUILD_TYPE=build_even
|
||||||
- env:
|
- env:
|
||||||
- BUILD_TYPE=build_odd
|
- BUILD_TYPE=build_odd
|
||||||
|
- env:
|
||||||
|
- BUILD_TYPE=debug_even
|
||||||
|
- env:
|
||||||
|
- BUILD_TYPE=debug_odd
|
||||||
- env:
|
- env:
|
||||||
- BUILD_TYPE=platformio
|
- BUILD_TYPE=platformio
|
||||||
- env:
|
- env:
|
||||||
|
@ -23,7 +23,13 @@ extern "C" {
|
|||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef malloc
|
||||||
|
#undef malloc
|
||||||
|
#endif
|
||||||
#define malloc os_malloc
|
#define malloc os_malloc
|
||||||
|
#ifdef free
|
||||||
|
#undef free
|
||||||
|
#endif
|
||||||
#define free os_free
|
#define free os_free
|
||||||
|
|
||||||
// #define AVRISP_DEBUG(fmt, ...) os_printf("[AVRP] " fmt "\r\n", ##__VA_ARGS__ )
|
// #define AVRISP_DEBUG(fmt, ...) os_printf("[AVRP] " fmt "\r\n", ##__VA_ARGS__ )
|
||||||
|
@ -103,6 +103,7 @@ function install_ide()
|
|||||||
{
|
{
|
||||||
local ide_path=$1
|
local ide_path=$1
|
||||||
local core_path=$2
|
local core_path=$2
|
||||||
|
local debug=$3
|
||||||
wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
|
wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
|
||||||
tar xf arduino.tar.xz
|
tar xf arduino.tar.xz
|
||||||
mv arduino-nightly $ide_path
|
mv arduino-nightly $ide_path
|
||||||
@ -110,9 +111,16 @@ function install_ide()
|
|||||||
mkdir esp8266com
|
mkdir esp8266com
|
||||||
cd esp8266com
|
cd esp8266com
|
||||||
ln -s $core_path esp8266
|
ln -s $core_path esp8266
|
||||||
|
local debug_flags=""
|
||||||
|
if [ "$debug" = "debug" ]; then
|
||||||
|
debug_flags="-DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM"
|
||||||
|
fi
|
||||||
# Set custom warnings for all builds (i.e. could add -Wextra at some point)
|
# Set custom warnings for all builds (i.e. could add -Wextra at some point)
|
||||||
echo "compiler.c.extra_flags=-Wall -Werror" > esp8266/platform.local.txt
|
echo "compiler.c.extra_flags=-Wall -Wextra -Werror $debug_flags" > esp8266/platform.local.txt
|
||||||
echo "compiler.cpp.extra_flags=-Wall -Werror" >> esp8266/platform.local.txt
|
echo "compiler.cpp.extra_flags=-Wall -Wextra -Werror $debug_flags" >> esp8266/platform.local.txt
|
||||||
|
echo -e "\n----platform.local.txt----"
|
||||||
|
cat esp8266/platform.local.txt
|
||||||
|
echo -e "\n----\n"
|
||||||
cd esp8266/tools
|
cd esp8266/tools
|
||||||
python get.py
|
python get.py
|
||||||
export PATH="$ide_path:$core_path/tools/xtensa-lx106-elf/bin:$PATH"
|
export PATH="$ide_path:$core_path/tools/xtensa-lx106-elf/bin:$PATH"
|
||||||
@ -197,10 +205,11 @@ function build_sketches_with_platformio()
|
|||||||
|
|
||||||
function install_arduino()
|
function install_arduino()
|
||||||
{
|
{
|
||||||
|
local debug=$1
|
||||||
# Install Arduino IDE and required libraries
|
# Install Arduino IDE and required libraries
|
||||||
echo -e "travis_fold:start:sketch_test_env_prepare"
|
echo -e "travis_fold:start:sketch_test_env_prepare"
|
||||||
cd $TRAVIS_BUILD_DIR
|
cd $TRAVIS_BUILD_DIR
|
||||||
install_ide $HOME/arduino_ide $TRAVIS_BUILD_DIR
|
install_ide $HOME/arduino_ide $TRAVIS_BUILD_DIR $debug
|
||||||
which arduino
|
which arduino
|
||||||
cd $TRAVIS_BUILD_DIR
|
cd $TRAVIS_BUILD_DIR
|
||||||
install_libraries
|
install_libraries
|
||||||
@ -248,13 +257,19 @@ if [ -z "$TRAVIS_BUILD_DIR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" = "build" ]; then
|
if [ "$BUILD_TYPE" = "build" ]; then
|
||||||
install_arduino
|
install_arduino nodebug
|
||||||
build_sketches_with_arduino 1 0
|
build_sketches_with_arduino 1 0
|
||||||
elif [ "$BUILD_TYPE" = "build_even" ]; then
|
elif [ "$BUILD_TYPE" = "build_even" ]; then
|
||||||
install_arduino
|
install_arduino nodebug
|
||||||
build_sketches_with_arduino 2 0
|
build_sketches_with_arduino 2 0
|
||||||
elif [ "$BUILD_TYPE" = "build_odd" ]; then
|
elif [ "$BUILD_TYPE" = "build_odd" ]; then
|
||||||
install_arduino
|
install_arduino nodebug
|
||||||
|
build_sketches_with_arduino 2 1
|
||||||
|
elif [ "$BUILD_TYPE" = "debug_even" ]; then
|
||||||
|
install_arduino debug
|
||||||
|
build_sketches_with_arduino 2 0
|
||||||
|
elif [ "$BUILD_TYPE" = "debug_odd" ]; then
|
||||||
|
install_arduino debug
|
||||||
build_sketches_with_arduino 2 1
|
build_sketches_with_arduino 2 1
|
||||||
elif [ "$BUILD_TYPE" = "platformio" ]; then
|
elif [ "$BUILD_TYPE" = "platformio" ]; then
|
||||||
# PlatformIO
|
# PlatformIO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user