Skip to content

Commit

Permalink
Merge dev into release
Browse files Browse the repository at this point in the history
While we intend our release strategy to be that we just fast-forward our
`release` branch to `dev`, things have come a little off the wheels.
This is a "git merge -s recursive -X theirs" of `dev` into `release`
instead.
  • Loading branch information
nwf committed Feb 1, 2021
2 parents 4f67927 + c212b30 commit 136e097
Show file tree
Hide file tree
Showing 104 changed files with 6,683 additions and 2,662 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/AutoCreateRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Create Release

on:
push:
tags:
- '3.*-release_*'

jobs:

build_luac_cross_win:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build luac.cross.exe
run: |
set
"%programfiles%\git\usr\bin\xargs"
cd msvc
"%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Release /p:Platform=x64
mv luac-cross/x64/Release/luac.cross.exe ..
shell: cmd
- name: Upload luac.cross
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: luac.cross_51_float_win
path: luac.cross.exe


Create_Release:
name: Create Release
needs: build_luac_cross_win
runs-on: ubuntu-latest

steps:
- name: Set release name
run: |
echo "RELEASE_NAME=${GITHUB_REF/*\/}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{env.RELEASE_NAME }}
release_name: ${{env.RELEASE_NAME }}
body: |
Please note that as per #3164 this project switched the default branch from `master` to `release` with the previous release. For the time being both are kept in sync as to ease the transition for our community. However, expect `master` to disappear sooner or later.
## Breaking Changes
- Description - #<PR_Id>
## New Modules
- [wiegand](https://nodemcu.readthedocs.io/en/latest/modules/wiegand/) C module - #3203
## Bug Fixes
Please see [the release milestone](https://github.com/nodemcu/nodemcu-firmware/milestone/16?closed=1) for details.
## Deprecation
prerelease: false
draft: true
- name: Download luac.cross
uses: actions/download-artifact@v1
with:
name: luac.cross_51_float_win
path: ./
- name: upload luac.cross to release
id: upload-luac-cross
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./luac.cross.exe
asset_name: luac.cross_${{env.RELEASE_NAME }}_x64_float_Lua51.exe
asset_content_type: application/x-msdownload
272 changes: 272 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
name: CI

on:
push:
branches: [ release ]
pull_request:
branches: [ dev, release ]

jobs:


build:
strategy:
fail-fast: false
matrix:
lua_ver: [51, 53]
numbers: ['float']
include:
- lua_ver: 51
numbers: 'integral'
- lua_ver: 53
numbers: '64bit'
runs-on: ubuntu-16.04

env:
LUA: ${{ matrix.lua_ver }}

steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: pip install pyserial
shell: bash
- run: sudo apt install srecord
shell: bash
- name: Build firmware
if: matrix.numbers == 'float'
run: make
shell: bash
- name: Build integral firmware
if: ${{ matrix.numbers == 'integral' }}
run: |
make EXTRA_CCFLAGS="-DLUA_NUMBER_INTEGRAL"
mv luac.cross.int luac.cross
shell: bash
- name: Build 64bit firmware
if: ${{ matrix.numbers == '64bit' }}
run: |
make EXTRA_CCFLAGS="-DLUA_NUMBER_64BITS"
shell: bash
- name: Upload luac.cross
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}
path: luac.cross


build_luac_cross_win:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build luac.cross.exe
run: |
set
"%programfiles%\git\usr\bin\xargs"
cd msvc
"%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Release /p:Platform=x64
mv luac-cross/x64/Release/luac.cross.exe ..
shell: cmd
- name: Upload luac.cross
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: luac.cross_51_float_win
path: luac.cross.exe


compile_lua:

strategy:
fail-fast: false
matrix:
lua_ver: [51, 53]
numbers: ['float']
filter: [ 'cat' ]
include:
- lua_ver: 51
numbers: 'integral'
filter: 'grep -v "lua_modules/lm92/lm92.lua\|lua_modules/hdc1000/HDC1000.lua\|lua_examples/u8g2/graphics_test.lua"'
- lua_ver: 53
numbers: '64bit'
filter: 'cat'
needs: build
runs-on: ubuntu-16.04

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: false
- name: Download luac.cross
uses: actions/download-artifact@v1
with:
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}
path: ./
- name: Fix file permission
run: chmod +x luac.cross
- name: compile Lua
run: |
find lua_modules lua_examples tests/NTest* -iname "*.lua" | ${{ matrix.filter }} | xargs --delimiter="\n" echo
find lua_modules lua_examples tests/NTest* -iname "*.lua" | ${{ matrix.filter }} | xargs --delimiter="\n" ./luac.cross -p
shell: bash


compile_lua_win:

strategy:
fail-fast: false
matrix:
lua_ver: [51]
numbers: ['float']
filter: [ 'cat' ]
needs: build_luac_cross_win
runs-on: windows-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: false
- name: Download luac.cross
uses: actions/download-artifact@v1
with:
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}_win
path: ./
- name: compile Lua
run: |
PATH="/C/Program\ Files/Git/usr/bin:${PATH}"
find lua_modules lua_examples tests/NTest* -iname "*.lua" | ${{ matrix.filter }} | xargs --delimiter="\n" echo
find lua_modules lua_examples tests/NTest* -iname "*.lua" | ${{ matrix.filter }} | xargs --delimiter="\n" ./luac.cross -p
shell: bash


NTest:

strategy:
fail-fast: false
matrix:
lua_ver: [51, 53]
numbers: ['float']
include:
- lua_ver: 51
numbers: 'integral'
- lua_ver: 53
numbers: '64bit'
needs: build
runs-on: ubuntu-16.04

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: false
- name: Download luac.cross
uses: actions/download-artifact@v1
with:
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}
path: ./
- name: Fix file permission
run: chmod +x luac.cross
- name: NTest selfcheck
run: |
cd tests/NTest
../../luac.cross -e ../NTest/NTest_NTest.lua | tee log
grep "failed. 0" log
shell: bash
- name: NTest hosttests
run: |
cd tests
cp NTest/NTest.lua .
../luac.cross -e NTest_lua.lua | tee log
(if grep " ==> " log ; then exit 1 ; fi)
shell: bash


NTest_win:

strategy:
fail-fast: false
matrix:
lua_ver: [51]
numbers: ['float']
needs: build_luac_cross_win
runs-on: windows-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: false
- name: Download luac.cross
uses: actions/download-artifact@v1
with:
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}_win
path: ./
- name: NTest selfcheck
run: |
cd tests/NTest
../../luac.cross.exe -e ../NTest/NTest_NTest.lua | tee log
grep "failed. 0" log
shell: bash
- name: NTest hosttests
run: |
cd tests
cp NTest/NTest.lua .
../luac.cross.exe -e NTest_lua.lua | tee log
(if grep " ==> " log ; then exit 1 ; fi)
shell: bash


luacheck:

strategy:
fail-fast: false
matrix:
include:
- os: 'linux'
vm: 'ubuntu-16.04'
- os: 'windows'
vm: 'windows-latest'
runs-on: ${{ matrix.vm }}

steps:
- uses: actions/checkout@v2
with:
submodules: false
- run: sudo apt install luarocks
if : matrix.os == 'linux'
shell: bash
- name: get luacheck.exe # is also done in the travis script but in this action it does not run in bash
if : matrix.os == 'windows'
run: |
mkdir cache
C:msys64\usr\bin\wget.exe --tries=5 --timeout=10 --waitretry=10 --read-timeout=10 --retry-connrefused -O cache/luacheck.exe https://github.com/mpeterv/luacheck/releases/download/0.23.0/luacheck.exe
shell: cmd
- name: luacheck
run: |
PATH="/C/Program\ Files/Git/usr/bin:${PATH}"
./tools/travis/run-luacheck-${{ matrix.os }}.sh
shell: bash



doc_check:

strategy:
fail-fast: false
runs-on: ubuntu-16.04

steps:
- uses: actions/checkout@v2
with:
submodules: false
- name: all_modules_linked
run: ./tools/check_docs_module_linkage.sh
shell: bash

7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ script:
- 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
- find lua_modules lua_examples tests/NTest* -iname "*.lua" -print0 | xargs -0 echo
- find lua_modules lua_examples tests/NTest* -iname "*.lua" -print0 | xargs -0 $LUACC -p
- cd tests/NTest
- if [ "$OS" = "linux" ]; then ../../$LUACC -e ../NTest/NTest_NTest.lua; fi
- cd "$TRAVIS_BUILD_DIR"
- if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-linux.sh; fi
- if [ "$OS" = "windows" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-windows.sh; fi
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ As a Windows or Mac user you could also resort to [GitHub Desktop](https://deskt
You need to sync your fork with the NodeMCU upstream repository from time to time, latest before you rebase (see flow above).

1. `git fetch upstream`
1. `git checkout dev` but you may do this for `master` as well
1. `git checkout dev` but you may do this for `release` as well
1. `git merge upstream/dev`

### Commit messages
Expand Down Expand Up @@ -114,8 +114,8 @@ Don't forget to [reference affected issues](https://help.github.com/articles/clo
- Add notes to the description of the milestone in the course of the ~2 months it lives.
- Be careful and reluctant to merge PRs once we're past the 6-weeks mark of a milestone. Ideally, we don't merge anything in the last 2 weeks.
- Cutting a release
- Create a PR for the `master` branch for collaborators to approve.
- Create a PR for the `release` branch for collaborators to approve.
- Once approved merge it. :exclamation::boom::exclamation: Make sure you do NOT "squash and merge" but make a regular merge commit!
- Fetch the changes into your local clone and create an annotated tag like so: `git tag -a <SDK-version>-master_<yyyyMMdd> -m ""`, `git push --tags`
- Fetch the changes into your local clone and create an annotated tag like so: `git tag -a <SDK-version>-release_<yyyyMMdd> -m ""`, `git push --tags`
- Create a new [release](https://github.com/nodemcu/nodemcu-firmware/releases) based on the tag you just pushed. The version name is the same as the tag name.
- Write release notes. Mention breaking changes explicitly. Since every PR that went into this release is linked to from the milestone it should be fairly easy to include important changes in the release notes.
Loading

0 comments on commit 136e097

Please sign in to comment.