Skip to content

Commit

Permalink
Merge pull request #2886 from nodemcu/dev
Browse files Browse the repository at this point in the history
Next master drop
  • Loading branch information
TerryE authored Sep 7, 2019
2 parents 68c425c + a08e74d commit 310faf7
Show file tree
Hide file tree
Showing 368 changed files with 10,960 additions and 8,655 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ local/
user_config.h
server-ca.crt
luac.cross
luac.cross.int
uz_unzip
uz_zip
tools/toolchains/
Expand All @@ -14,3 +15,7 @@ tools/toolchains/
.cproject
.project
.settings/
.vscode

#ignore temp file for build infos
buildinfo.h
37 changes: 25 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#os:
# - windows
# - linux

language: cpp

matrix:
include:
- os: linux
env:
- OS="$TRAVIS_OS_NAME"
- LUACC=./luac.cross
- os: windows
env:
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
- OS="$TRAVIS_OS_NAME"
- LUACC=msvc/luac-cross/x64/Debug/luac.cross.exe
addons:
apt:
packages:
Expand All @@ -8,16 +24,13 @@ cache:
- directories:
- cache
script:
- export BUILD_DATE=$(date +%Y%m%d)
- make EXTRA_CCFLAGS="-DBUILD_DATE='\"'$BUILD_DATE'\"'" all
- cd bin/
- file_name_float="nodemcu_float_${TRAVIS_TAG}.bin"
- srec_cat -output ${file_name_float} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
- cd ../
- make clean
- make EXTRA_CCFLAGS="-DLUA_NUMBER_INTEGRAL -DBUILD_DATE='\"'$BUILD_DATE'\"'"
- 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
- echo OS is $OS $TRAVIS_OS_NAME
# 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
- if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/ci-build-linux.sh; fi
- if [ "$OS" = "windows" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/ci-build-windows-ms.sh; fi
- if [ "$OS" = "linux" -a "$TRAVIS_PULL_REQUEST" != "false" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/pr-build.sh; fi
- cd "$TRAVIS_BUILD_DIR"
- echo "checking:"
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 echo
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 $LUACC -p
# - if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck.sh || true ; fi
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ Use the platform and tools you feel most comfortable with. There are no constrai
- [Full-fledged Linux environment](http://www.esp8266.com/wiki/doku.php?id=toolchain#how_to_setup_a_vm_to_host_your_toolchain), either physical or virtual.
- [Docker image](https://hub.docker.com/r/marcelstoer/nodemcu-build/) which allows running the build inside the container as if you were running a build script on your local machine.

## Writing Lua Code
A great resource about writing Lua for NodeMCU can be found in [Lua Developer FAQ](https://nodemcu.readthedocs.io/en/latest/lua-developer-faq/) - make sure to read it! When you're writing your Lua code and it's not working as it should you can test it with `luacheck` tool that can help you find various types of bugs. To install it you have to install [luarocks](https://luarocks.org/) and use command `sudo luarocks install luacheck` to install the tool. Now you're ready to go! By using this command (assuming you're in `nodemcu-firmware` directory):

`luacheck --config tools/luacheck_config.lua <your file to check>`

you can look for bugs and problems within the code!

## Writing Documentation
The NodeMCU documentation is maintained within the same repository as the code. The primary reason is to keep the two in sync more easily. It's thus trivial for the NodeMCU team to verify that a PR includes the necessary documentation. Furthermore, the documentation is merged automatically with the code if it moves from branch X to Y.

Expand Down
Loading

0 comments on commit 310faf7

Please sign in to comment.