2015-11-15 20:11:24 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2016-09-06 08:31:48 +02:00
|
|
|
echo "Running PR build (all modules, SSL enabled, debug 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'
|
|
|
|
sed -E -i.bak 's@(//.*)(#define *LUA_USE_MODULES_.*)@\2@g' user_modules.h
|
|
|
|
cat user_modules.h
|
|
|
|
|
2016-07-13 22:46:37 +02:00
|
|
|
# enable SSL
|
|
|
|
sed -i.bak '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
|
|
|
|
sed -E -i.bak 's@// ?#define DEVELOP_VERSION@#define DEVELOP_VERSION@' user_config.h
|
|
|
|
|
2016-09-05 20:17:13 +02:00
|
|
|
# enable FATFS
|
|
|
|
sed -i 's@//#define BUILD_FATFS@#define BUILD_FATFS@' 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
|
|
|
|
# increase irom0_0_seg size for all modules build
|
|
|
|
sed -E -i.bak 's@(.*irom0_0_seg *:.*len *=) *[^,]*(.*)@\1 0x200000\2@' nodemcu.ld
|
2018-01-10 22:28:28 +01:00
|
|
|
sed -E -i.bak 's@(.*iram1_0_seg *:.*len *=) *[^,]*(.*)@\1 0x100000\2@' nodemcu.ld
|
2018-01-10 22:04:19 +01:00
|
|
|
cat nodemcu.ld
|
|
|
|
|
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
|
2018-07-16 07:48:47 +02:00
|
|
|
|
|
|
|
LUA_FILES=`find lua_modules lua_examples -iname "*.lua"`
|
|
|
|
echo checking $LUA_FILES
|
|
|
|
./luac.cross -p $LUA_FILES
|
2015-11-15 20:11:24 +01:00
|
|
|
)
|