2015-11-15 20:11:24 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-08-30 21:04:00 +02:00
|
|
|
echo "Running PR build: all modules plus SSL, debug, FATFS, new I2C driver, pmSleep and SmartConfig all enabled"
|
2015-11-15 20:11:24 +01:00
|
|
|
(
|
|
|
|
cd "$TRAVIS_BUILD_DIR"/app/include || exit
|
|
|
|
# uncomment disabled modules e.g. '//#define LUA_USE_MODULES_UCG' -> '#define LUA_USE_MODULES_UCG'
|
2020-08-30 21:04:00 +02:00
|
|
|
sed -i -r 's@(//.*)(#define *LUA_USE_MODULES_.*)@\2@g' user_modules.h
|
2015-11-15 20:11:24 +01:00
|
|
|
cat user_modules.h
|
|
|
|
|
2016-07-13 22:46:37 +02:00
|
|
|
# enable SSL
|
2020-08-30 21:04:00 +02:00
|
|
|
sed -i 's@//#define CLIENT_SSL_ENABLE@#define CLIENT_SSL_ENABLE@' user_config.h
|
2016-09-05 20:17:13 +02:00
|
|
|
|
2016-09-06 08:31:48 +02:00
|
|
|
# enable debug
|
2020-08-30 21:04:00 +02:00
|
|
|
sed -i 's@// ?#define DEVELOP_VERSION@#define DEVELOP_VERSION@' user_config.h
|
2016-09-06 08:31:48 +02:00
|
|
|
|
2016-09-05 20:17:13 +02:00
|
|
|
# enable FATFS
|
|
|
|
sed -i 's@//#define BUILD_FATFS@#define BUILD_FATFS@' user_config.h
|
2020-08-30 21:04:00 +02:00
|
|
|
|
|
|
|
# enable new I2C driver
|
|
|
|
sed -i 's@#define I2C_MASTER_OLD_VERSION@//#define I2C_MASTER_OLD_VERSION@' user_config.h
|
|
|
|
|
|
|
|
# enable pmSleep
|
|
|
|
sed -i 's@//#define TIMER_SUSPEND_ENABLE@#define TIMER_SUSPEND_ENABLE@' user_config.h
|
|
|
|
sed -i 's@//#define PMSLEEP_ENABLE@#define PMSLEEP_ENABLE@' user_config.h
|
|
|
|
|
|
|
|
# enable WiFi SmartConfig
|
|
|
|
sed -i 's@//#define WIFI_SMART_ENABLE@#define WIFI_SMART_ENABLE@' user_config.h
|
|
|
|
|
2015-11-15 20:11:24 +01:00
|
|
|
cat user_config.h
|
|
|
|
|
2018-01-10 22:04:19 +01:00
|
|
|
cd "$TRAVIS_BUILD_DIR"/ld || exit
|
2020-08-30 21:04:00 +02:00
|
|
|
# increase irom0_0_seg size for all modules build
|
|
|
|
sed -E -i.bak 's@(.*irom0_0_seg *:.*len *=) *[^,]*(.*)@\1 0x200000\2@' nodemcu.ld
|
|
|
|
sed -E -i.bak 's@(.*iram1_0_seg *:.*len *=) *[^,]*(.*)@\1 0x100000\2@' nodemcu.ld
|
|
|
|
cat nodemcu.ld
|
2018-01-10 22:04:19 +01:00
|
|
|
|
2015-11-15 20:11:24 +01:00
|
|
|
# change to "root" directory no matter where the script was started from
|
|
|
|
cd "$TRAVIS_BUILD_DIR" || exit
|
|
|
|
make clean
|
|
|
|
make
|
|
|
|
)
|