Integrate an extra build step for PRs to build a special firmware

Fixes #756
This commit is contained in:
Marcel Stör 2015-11-15 20:11:24 +01:00
parent 340edbbe2f
commit f9ff515de9
2 changed files with 22 additions and 0 deletions

View File

@ -20,6 +20,8 @@ script:
- cd bin/
- file_name_integer="nodemcu_integer_${TRAVIS_TAG}.bin"
- srec_cat -output ${file_name_integer} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
# http://docs.travis-ci.com/user/environment-variables/#Convenience-Variables
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash "$TRAVIS_BUILD_DIR"/tools/pr-build.sh; fi
deploy:
provider: releases
api_key:

20
tools/pr-build.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/sh
set -e
echo "Running PR build (all modules, SSL disabled)"
(
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
# disable SSL
sed -i.bak 's@#define CLIENT_SSL_ENABLE@//#define CLIENT_SSL_ENABLE@' user_config.h
cat user_config.h
# change to "root" directory no matter where the script was started from
cd "$TRAVIS_BUILD_DIR" || exit
make clean
make
)