Add missing features to Travis CI PR build (#3255)

This commit is contained in:
galjonsfigur 2020-08-30 21:04:00 +02:00 committed by GitHub
parent d72ea91ed0
commit b4c148eff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 10 deletions

View File

@ -437,7 +437,7 @@ void wifi_pmSleep_suspend_CB(void)
{
lua_State* L = lua_getstate(); // Get main Lua thread pointer
lua_rawgeti(L, LUA_REGISTRYINDEX, wifi_suspend_cb_ref); // Push suspend callback onto stack
luaL_unref(L, wifi_suspend_cb_ref); // remove suspend callback from LUA_REGISTRY
luaL_unref(L, LUA_REGISTRYINDEX, wifi_suspend_cb_ref); // remove suspend callback from LUA_REGISTRY
wifi_suspend_cb_ref = LUA_NOREF; // Update variable since reference is no longer valid
luaL_pcallx(L, 0, 0); // Execute suspend callback
}

View File

@ -160,7 +160,7 @@ void pmSleep_execute_lua_cb(int* cb_ref){
if (*cb_ref != LUA_NOREF){
lua_State* L = lua_getstate(); // Get Lua main thread pointer
lua_rawgeti(L, LUA_REGISTRYINDEX, *cb_ref); // Push resume callback onto the stack
lua_unref(L, *cb_ref); // Remove resume callback from registry
luaL_unref(L, LUA_REGISTRYINDEX, *cb_ref); // Remove resume callback from registry
*cb_ref = LUA_NOREF; // Update variable since reference is no longer valid
luaL_pcallx(L, 0, 0); // Execute resume callback
}

View File

@ -2,21 +2,32 @@
set -e
echo "Running PR build (all modules, SSL enabled, debug enabled)"
echo "Running PR build: all modules plus SSL, debug, FATFS, new I2C driver, pmSleep and SmartConfig all enabled"
(
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
sed -i -r 's@(//.*)(#define *LUA_USE_MODULES_.*)@\2@g' user_modules.h
cat user_modules.h
# enable SSL
sed -i.bak 's@//#define CLIENT_SSL_ENABLE@#define CLIENT_SSL_ENABLE@' user_config.h
sed -i 's@//#define CLIENT_SSL_ENABLE@#define CLIENT_SSL_ENABLE@' user_config.h
# enable debug
sed -E -i.bak 's@// ?#define DEVELOP_VERSION@#define DEVELOP_VERSION@' user_config.h
sed -i 's@// ?#define DEVELOP_VERSION@#define DEVELOP_VERSION@' user_config.h
# enable FATFS
sed -i 's@//#define BUILD_FATFS@#define BUILD_FATFS@' user_config.h
# 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
cat user_config.h
cd "$TRAVIS_BUILD_DIR"/ld || exit