Skip to content

Commit 136e097

Browse files
committed
Merge dev into release
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.
2 parents 4f67927 + c212b30 commit 136e097

File tree

104 files changed

+6683
-2662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+6683
-2662
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '3.*-release_*'
7+
8+
jobs:
9+
10+
build_luac_cross_win:
11+
12+
runs-on: windows-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
submodules: true
18+
- name: Build luac.cross.exe
19+
run: |
20+
set
21+
"%programfiles%\git\usr\bin\xargs"
22+
cd msvc
23+
"%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Release /p:Platform=x64
24+
mv luac-cross/x64/Release/luac.cross.exe ..
25+
shell: cmd
26+
- name: Upload luac.cross
27+
if: ${{ success() }}
28+
uses: actions/upload-artifact@v2
29+
with:
30+
name: luac.cross_51_float_win
31+
path: luac.cross.exe
32+
33+
34+
Create_Release:
35+
name: Create Release
36+
needs: build_luac_cross_win
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- name: Set release name
41+
run: |
42+
echo "RELEASE_NAME=${GITHUB_REF/*\/}" >> $GITHUB_ENV
43+
- name: Create Release
44+
id: create_release
45+
uses: actions/create-release@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
48+
with:
49+
tag_name: ${{env.RELEASE_NAME }}
50+
release_name: ${{env.RELEASE_NAME }}
51+
body: |
52+
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.
53+
54+
## Breaking Changes
55+
- Description - #<PR_Id>
56+
57+
## New Modules
58+
- [wiegand](https://nodemcu.readthedocs.io/en/latest/modules/wiegand/) C module - #3203
59+
60+
## Bug Fixes
61+
Please see [the release milestone](https://github.com/nodemcu/nodemcu-firmware/milestone/16?closed=1) for details.
62+
63+
## Deprecation
64+
65+
prerelease: false
66+
draft: true
67+
- name: Download luac.cross
68+
uses: actions/download-artifact@v1
69+
with:
70+
name: luac.cross_51_float_win
71+
path: ./
72+
- name: upload luac.cross to release
73+
id: upload-luac-cross
74+
uses: actions/upload-release-asset@v1
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
with:
78+
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
79+
asset_path: ./luac.cross.exe
80+
asset_name: luac.cross_${{env.RELEASE_NAME }}_x64_float_Lua51.exe
81+
asset_content_type: application/x-msdownload

.github/workflows/build.yml

Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ release ]
6+
pull_request:
7+
branches: [ dev, release ]
8+
9+
jobs:
10+
11+
12+
build:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
lua_ver: [51, 53]
17+
numbers: ['float']
18+
include:
19+
- lua_ver: 51
20+
numbers: 'integral'
21+
- lua_ver: 53
22+
numbers: '64bit'
23+
runs-on: ubuntu-16.04
24+
25+
env:
26+
LUA: ${{ matrix.lua_ver }}
27+
28+
steps:
29+
- uses: actions/checkout@v2
30+
with:
31+
submodules: true
32+
- run: pip install pyserial
33+
shell: bash
34+
- run: sudo apt install srecord
35+
shell: bash
36+
- name: Build firmware
37+
if: matrix.numbers == 'float'
38+
run: make
39+
shell: bash
40+
- name: Build integral firmware
41+
if: ${{ matrix.numbers == 'integral' }}
42+
run: |
43+
make EXTRA_CCFLAGS="-DLUA_NUMBER_INTEGRAL"
44+
mv luac.cross.int luac.cross
45+
shell: bash
46+
- name: Build 64bit firmware
47+
if: ${{ matrix.numbers == '64bit' }}
48+
run: |
49+
make EXTRA_CCFLAGS="-DLUA_NUMBER_64BITS"
50+
shell: bash
51+
- name: Upload luac.cross
52+
if: ${{ success() }}
53+
uses: actions/upload-artifact@v2
54+
with:
55+
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}
56+
path: luac.cross
57+
58+
59+
build_luac_cross_win:
60+
61+
runs-on: windows-latest
62+
63+
steps:
64+
- uses: actions/checkout@v2
65+
with:
66+
submodules: true
67+
- name: Build luac.cross.exe
68+
run: |
69+
set
70+
"%programfiles%\git\usr\bin\xargs"
71+
cd msvc
72+
"%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=Release /p:Platform=x64
73+
mv luac-cross/x64/Release/luac.cross.exe ..
74+
shell: cmd
75+
- name: Upload luac.cross
76+
if: ${{ success() }}
77+
uses: actions/upload-artifact@v2
78+
with:
79+
name: luac.cross_51_float_win
80+
path: luac.cross.exe
81+
82+
83+
compile_lua:
84+
85+
strategy:
86+
fail-fast: false
87+
matrix:
88+
lua_ver: [51, 53]
89+
numbers: ['float']
90+
filter: [ 'cat' ]
91+
include:
92+
- lua_ver: 51
93+
numbers: 'integral'
94+
filter: 'grep -v "lua_modules/lm92/lm92.lua\|lua_modules/hdc1000/HDC1000.lua\|lua_examples/u8g2/graphics_test.lua"'
95+
- lua_ver: 53
96+
numbers: '64bit'
97+
filter: 'cat'
98+
needs: build
99+
runs-on: ubuntu-16.04
100+
101+
steps:
102+
- name: Checkout repo
103+
uses: actions/checkout@v2
104+
with:
105+
submodules: false
106+
- name: Download luac.cross
107+
uses: actions/download-artifact@v1
108+
with:
109+
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}
110+
path: ./
111+
- name: Fix file permission
112+
run: chmod +x luac.cross
113+
- name: compile Lua
114+
run: |
115+
find lua_modules lua_examples tests/NTest* -iname "*.lua" | ${{ matrix.filter }} | xargs --delimiter="\n" echo
116+
find lua_modules lua_examples tests/NTest* -iname "*.lua" | ${{ matrix.filter }} | xargs --delimiter="\n" ./luac.cross -p
117+
shell: bash
118+
119+
120+
compile_lua_win:
121+
122+
strategy:
123+
fail-fast: false
124+
matrix:
125+
lua_ver: [51]
126+
numbers: ['float']
127+
filter: [ 'cat' ]
128+
needs: build_luac_cross_win
129+
runs-on: windows-latest
130+
131+
steps:
132+
- name: Checkout repo
133+
uses: actions/checkout@v2
134+
with:
135+
submodules: false
136+
- name: Download luac.cross
137+
uses: actions/download-artifact@v1
138+
with:
139+
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}_win
140+
path: ./
141+
- name: compile Lua
142+
run: |
143+
PATH="/C/Program\ Files/Git/usr/bin:${PATH}"
144+
find lua_modules lua_examples tests/NTest* -iname "*.lua" | ${{ matrix.filter }} | xargs --delimiter="\n" echo
145+
find lua_modules lua_examples tests/NTest* -iname "*.lua" | ${{ matrix.filter }} | xargs --delimiter="\n" ./luac.cross -p
146+
shell: bash
147+
148+
149+
NTest:
150+
151+
strategy:
152+
fail-fast: false
153+
matrix:
154+
lua_ver: [51, 53]
155+
numbers: ['float']
156+
include:
157+
- lua_ver: 51
158+
numbers: 'integral'
159+
- lua_ver: 53
160+
numbers: '64bit'
161+
needs: build
162+
runs-on: ubuntu-16.04
163+
164+
steps:
165+
- name: Checkout repo
166+
uses: actions/checkout@v2
167+
with:
168+
submodules: false
169+
- name: Download luac.cross
170+
uses: actions/download-artifact@v1
171+
with:
172+
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}
173+
path: ./
174+
- name: Fix file permission
175+
run: chmod +x luac.cross
176+
- name: NTest selfcheck
177+
run: |
178+
cd tests/NTest
179+
../../luac.cross -e ../NTest/NTest_NTest.lua | tee log
180+
grep "failed. 0" log
181+
shell: bash
182+
- name: NTest hosttests
183+
run: |
184+
cd tests
185+
cp NTest/NTest.lua .
186+
../luac.cross -e NTest_lua.lua | tee log
187+
(if grep " ==> " log ; then exit 1 ; fi)
188+
shell: bash
189+
190+
191+
NTest_win:
192+
193+
strategy:
194+
fail-fast: false
195+
matrix:
196+
lua_ver: [51]
197+
numbers: ['float']
198+
needs: build_luac_cross_win
199+
runs-on: windows-latest
200+
201+
steps:
202+
- name: Checkout repo
203+
uses: actions/checkout@v2
204+
with:
205+
submodules: false
206+
- name: Download luac.cross
207+
uses: actions/download-artifact@v1
208+
with:
209+
name: luac.cross_${{ matrix.lua_ver }}_${{ matrix.numbers }}_win
210+
path: ./
211+
- name: NTest selfcheck
212+
run: |
213+
cd tests/NTest
214+
../../luac.cross.exe -e ../NTest/NTest_NTest.lua | tee log
215+
grep "failed. 0" log
216+
shell: bash
217+
- name: NTest hosttests
218+
run: |
219+
cd tests
220+
cp NTest/NTest.lua .
221+
../luac.cross.exe -e NTest_lua.lua | tee log
222+
(if grep " ==> " log ; then exit 1 ; fi)
223+
shell: bash
224+
225+
226+
luacheck:
227+
228+
strategy:
229+
fail-fast: false
230+
matrix:
231+
include:
232+
- os: 'linux'
233+
vm: 'ubuntu-16.04'
234+
- os: 'windows'
235+
vm: 'windows-latest'
236+
runs-on: ${{ matrix.vm }}
237+
238+
steps:
239+
- uses: actions/checkout@v2
240+
with:
241+
submodules: false
242+
- run: sudo apt install luarocks
243+
if : matrix.os == 'linux'
244+
shell: bash
245+
- name: get luacheck.exe # is also done in the travis script but in this action it does not run in bash
246+
if : matrix.os == 'windows'
247+
run: |
248+
mkdir cache
249+
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
250+
shell: cmd
251+
- name: luacheck
252+
run: |
253+
PATH="/C/Program\ Files/Git/usr/bin:${PATH}"
254+
./tools/travis/run-luacheck-${{ matrix.os }}.sh
255+
shell: bash
256+
257+
258+
259+
doc_check:
260+
261+
strategy:
262+
fail-fast: false
263+
runs-on: ubuntu-16.04
264+
265+
steps:
266+
- uses: actions/checkout@v2
267+
with:
268+
submodules: false
269+
- name: all_modules_linked
270+
run: ./tools/check_docs_module_linkage.sh
271+
shell: bash
272+

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ script:
3232
- if [ "$OS" = "linux" -a "$TRAVIS_PULL_REQUEST" != "false" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/pr-build.sh; fi
3333
- cd "$TRAVIS_BUILD_DIR"
3434
- echo "checking:"
35-
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 echo
36-
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 $LUACC -p
35+
- find lua_modules lua_examples tests/NTest* -iname "*.lua" -print0 | xargs -0 echo
36+
- find lua_modules lua_examples tests/NTest* -iname "*.lua" -print0 | xargs -0 $LUACC -p
37+
- cd tests/NTest
38+
- if [ "$OS" = "linux" ]; then ../../$LUACC -e ../NTest/NTest_NTest.lua; fi
39+
- cd "$TRAVIS_BUILD_DIR"
3740
- if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-linux.sh; fi
3841
- if [ "$OS" = "windows" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-windows.sh; fi

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ As a Windows or Mac user you could also resort to [GitHub Desktop](https://deskt
7878
You need to sync your fork with the NodeMCU upstream repository from time to time, latest before you rebase (see flow above).
7979

8080
1. `git fetch upstream`
81-
1. `git checkout dev` but you may do this for `master` as well
81+
1. `git checkout dev` but you may do this for `release` as well
8282
1. `git merge upstream/dev`
8383

8484
### Commit messages
@@ -114,8 +114,8 @@ Don't forget to [reference affected issues](https://help.github.com/articles/clo
114114
- Add notes to the description of the milestone in the course of the ~2 months it lives.
115115
- 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.
116116
- Cutting a release
117-
- Create a PR for the `master` branch for collaborators to approve.
117+
- Create a PR for the `release` branch for collaborators to approve.
118118
- Once approved merge it. :exclamation::boom::exclamation: Make sure you do NOT "squash and merge" but make a regular merge commit!
119-
- 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`
119+
- 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`
120120
- 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.
121121
- 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.

0 commit comments

Comments
 (0)