Skip to content

Commit a0c87c7

Browse files
committed
add release iskrajs_2v22
2 parents efefb96 + edc64ce commit a0c87c7

File tree

1,961 files changed

+839755
-759181
lines changed

Some content is hidden

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

1,961 files changed

+839755
-759181
lines changed

.gitattributes

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Auto detect text files and perform LF normalization
2-
* text=lf
3-
4-
# Custom for Visual Studio
5-
*.cs diff=csharp
6-
7-
# Standard to msysgit
8-
*.doc diff=astextplain
9-
*.DOC diff=astextplain
10-
*.docx diff=astextplain
11-
*.DOCX diff=astextplain
12-
*.dot diff=astextplain
13-
*.DOT diff=astextplain
14-
*.pdf diff=astextplain
15-
*.PDF diff=astextplain
16-
*.rtf diff=astextplain
17-
*.RTF diff=astextplain
1+
# Auto detect text files and perform LF normalization
2+
* text=auto eol=lf
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/build.yml

+91-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,39 @@ name: Firmware build
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ '*' ]
66
pull_request:
7-
branches: [ master ]
7+
branches: [ '*' ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
inputs:
12+
enable_main:
13+
description: Build default boards (linux, ESP, Microbit)
14+
type: boolean
15+
default: true
16+
enable_dfu:
17+
description: Build boards with DFU (puckjs, pixljs, banglejs)
18+
type: boolean
19+
default: true
20+
enable_padded:
21+
description: Build boards with bootloader padding (espruinoboard, -wifi, pico)
22+
type: boolean
23+
default: true
24+
enable_emulator:
25+
description: Build emulator for banglejs
26+
type: boolean
27+
default: true
28+
29+
30+
permissions:
31+
contents: read
832

933
jobs:
1034

1135
# normal builds
1236
build_main:
37+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.enable_main }}
1338
runs-on: ubuntu-20.04
1439
strategy:
1540
# devices to build for
@@ -18,7 +43,7 @@ jobs:
1843
# try and build for all devices even if one fails
1944
fail-fast: false
2045
steps:
21-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v4
2247
with:
2348
fetch-depth: 0
2449
- name: make ${{ matrix.board }}
@@ -31,18 +56,29 @@ jobs:
3156
source ./scripts/provision.sh ${{ matrix.board }}
3257
make
3358
./scripts/ci_upload.sh
59+
- name: Upload ${{ matrix.board }} build artifact
60+
uses: actions/[email protected]
61+
with:
62+
name: ${{ matrix.board }}
63+
path: |
64+
bin/*.bin
65+
bin/*.hex
66+
bin/*.tgz
67+
bin/*.zip
68+
3469

3570
# Builds with DFU_UPDATE_BUILD=1
3671
build_dfu:
72+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.enable_dfu }}
3773
runs-on: ubuntu-20.04
3874
strategy:
3975
# devices to build for
4076
matrix:
41-
board: [PUCKJS, PIXLJS, MDBT42Q, BANGLEJS, BANGLEJS2]
77+
board: [PUCKJS, PIXLJS, MDBT42Q, BANGLEJS, BANGLEJS2, PUCKJS_MINIMAL]
4278
# try and build for all devices even if one fails
4379
fail-fast: false
4480
steps:
45-
- uses: actions/checkout@v2
81+
- uses: actions/checkout@v4
4682
with:
4783
fetch-depth: 0
4884
- name: make ${{ matrix.board }}
@@ -56,9 +92,19 @@ jobs:
5692
source ./scripts/provision.sh ${{ matrix.board }}
5793
make
5894
./scripts/ci_upload.sh
95+
- name: Upload ${{ matrix.board }} build artifact
96+
uses: actions/[email protected]
97+
with:
98+
name: ${{ matrix.board }}
99+
path: |
100+
bin/*.bin
101+
bin/*.hex
102+
bin/*.tgz
103+
bin/*.zip
59104
60105
# Builds with PAD_FOR_BOOTLOADER=1
61106
build_padded:
107+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.enable_padded }}
62108
runs-on: ubuntu-20.04
63109
strategy:
64110
# devices to build for
@@ -67,7 +113,7 @@ jobs:
67113
# try and build for all devices even if one fails
68114
fail-fast: false
69115
steps:
70-
- uses: actions/checkout@v2
116+
- uses: actions/checkout@v4
71117
with:
72118
fetch-depth: 0
73119
- name: make ${{ matrix.board }}
@@ -81,7 +127,46 @@ jobs:
81127
source ./scripts/provision.sh ${{ matrix.board }}
82128
make
83129
./scripts/ci_upload.sh
130+
- name: Upload ${{ matrix.board }} build artifact
131+
uses: actions/[email protected]
132+
with:
133+
name: ${{ matrix.board }}
134+
path: |
135+
bin/*.bin
136+
bin/*.hex
137+
bin/*.tgz
138+
bin/*.zip
84139
140+
# emulator builds
141+
build_emulator:
142+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.enable_emulator }}
143+
runs-on: ubuntu-20.04
144+
strategy:
145+
# devices to build for
146+
matrix: # banglejs, banglejs2
147+
board: [EMSCRIPTEN, EMSCRIPTEN2]
148+
# try and build for all devices even if one fails
149+
fail-fast: false
150+
steps:
151+
- uses: actions/checkout@v4
152+
with:
153+
fetch-depth: 0
154+
- name: make ${{ matrix.board }}
155+
env:
156+
TRAVIS: 1
157+
RELEASE: 1
158+
BOARD: ${{ matrix.board }}
159+
UPLOADTOKEN: ${{ secrets.UPLOADTOKEN }}
160+
run: |
161+
source ./scripts/provision.sh ${{ matrix.board }}
162+
make
163+
./scripts/ci_upload.sh
164+
- name: Upload ${{ matrix.board }} build artifact
165+
uses: actions/[email protected]
166+
with:
167+
name: ${{ matrix.board }}
168+
path: |
169+
bin/*.js
85170
86171
# Disable doc building for now
87172
# docs:
+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Test Factory Apps
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
inputs:
12+
git-ref:
13+
description: Git Ref (Optional)
14+
required: false
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
# This workflow contains a single job called "build"
21+
tests:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout Espruino
25+
uses: actions/checkout@v3
26+
with:
27+
submodules: recursive
28+
path: 'Espruino'
29+
ref: ${{ github.event.inputs.git-ref }}
30+
31+
- name: Checkout EspruinoWebIDE
32+
uses: actions/checkout@v3
33+
with:
34+
repository: espruino/EspruinoWebIDE
35+
submodules: recursive
36+
path: 'EspruinoWebIDE'
37+
38+
- name: Setup emsdk
39+
uses: mymindstorm/setup-emsdk@v11
40+
with:
41+
# Make sure to set a version number!
42+
version: 3.1.12
43+
# This is the name of the cache folder.
44+
# The cache folder will be placed in the build directory,
45+
# so make sure it doesn't conflict with anything!
46+
actions-cache-folder: 'emsdk'
47+
48+
- name: Use Node.js
49+
uses: actions/setup-node@v3
50+
51+
- name: Create Emulator
52+
run: |
53+
cd $GITHUB_WORKSPACE/Espruino
54+
make clean
55+
BOARD=EMSCRIPTEN make || exit 1
56+
make clean
57+
BOARD=EMSCRIPTEN2 make || exit 1
58+
cp $GITHUB_WORKSPACE/Espruino/bin/emulator_banglejs*.js $GITHUB_WORKSPACE/EspruinoWebIDE/emu/ -v
59+
60+
- name: Run Tests Bangle.js
61+
run: node $GITHUB_WORKSPACE/Espruino/scripts/factoryTests.js BANGLEJS
62+
id: TestBangle1
63+
continue-on-error: true
64+
65+
- name: Run Tests Bangle.js2
66+
run: node $GITHUB_WORKSPACE/Espruino/scripts/factoryTests.js BANGLEJS2
67+
id: TestBangle2
68+
continue-on-error: true
69+
70+
- name: Fail test
71+
if: (steps.TestBangle1.outcome != 'skipped' && steps.TestBangle1.outcome != 'success') || (steps.TestBangle2.outcome != 'skipped' && steps.TestBangle2.outcome != 'success')
72+
run: exit 1

.gitignore

+18-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
*.bin
1111
*.uf2
1212
*.pyc
13-
/*.bin.unpadded
14-
/*.zip
1513
/gen/*
14+
/bin/*
15+
/bin_*/*
16+
/obj/*
1617
/.vagrant/*
1718
/boards/*.html
1819
/boards/*.json
@@ -38,9 +39,11 @@ node_modules
3839
/esp-idf
3940
xtensa-esp32-elf
4041
gcc-arm-none-eabi*
42+
arm-gnu-toolchain*
4143
*.c#
4244
/function_keywords.js
4345
/functions.html
46+
/targetlibs/emscripten/emsdk
4447
/targetlibs/nrf5x_11
4548
/targetlibs/nrf5x_12/examples
4649
/targetlibs/nrf5x_12/documentation/
@@ -54,7 +57,17 @@ gcc-arm-none-eabi*
5457
/targetlibs/nrf5x_15/modules
5558
/targetlibs/nrf5x_15/config
5659
/targetlibs/nrf5x_15/license.txt
57-
/targetlibs/nrf5x_15_*
60+
/targetlibs/nrf5x_15_3/components
61+
/targetlibs/nrf5x_15_3/example_config
62+
/targetlibs/nrf5x_15_3/examples
63+
/targetlibs/nrf5x_15_3/external
64+
/targetlibs/nrf5x_15_3/external_tools
65+
/targetlibs/nrf5x_15_3/integration
66+
/targetlibs/nrf5x_15_3/modules
67+
/targetlibs/nrf5x_15_3/config
68+
/targetlibs/nrf5x_15_3/documentation
69+
/targetlibs/nrf5x_15_3/license.txt
70+
/targetlibs/nrf5x_15_3/nRF5x_*
5871
/targetlibs/nrf5x_15x
5972
/targetlibs/nrf5x_mesh
6073
/targetlibs/nrf5x_17/components
@@ -65,6 +78,7 @@ gcc-arm-none-eabi*
6578
/targetlibs/nrf5x_17/config
6679
/targetlibs/nrf5x_17/documentation
6780
/targetlibs/raspberrypi
81+
/js
6882
/.vscode
6983
/CURRENT_BOARD.make
7084
/topreadonly
@@ -73,3 +87,4 @@ gcc-arm-none-eabi*
7387
*.user
7488
*.jdebug
7589
*.code-workspace
90+
/espruino_embedded.*

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Improvements to Documentation are amazingly helpful, and are very rare so hugely
2727

2828
### Functions/Variables
2929

30-
If you want to change something in a [built-in function's documentation](http://www.espruino.com/Reference), look at the heading for the function on that page and there will be a right-arrow (⇒).
30+
If you want to change something in a [built-in function's documentation](http://www.espruino.com/Reference), look at the heading for the function on that page and there will be a right-arrow (⇒).
3131

3232
If you click on that it will bring you to the area of Espruino's source code where the function *and the documentation for it* are stored. You can then edit the documentation in that file (above the function) on GitHub and issue a pull request - it's in Markdown format.
3333

@@ -56,7 +56,7 @@ Please [see here](http://www.espruino.com/Writing+Modules)
5656
* Ensure that you are not contributing someone else's code, and that you are willing to add your code under Espruino's MPL Licence
5757
* Make sure that what you do doesn't break the Espruino board or the other boards we build for. We can't check all the boards for every commit, so if you break something you'll annoy a whole bunch of people.
5858
* Be aware that Espruino is designed for Microcontrollers - with very low amounts of flash and memory. Both are at a premium so don't statically allocate variables or do other stuff that will use up RAM.
59-
* Don't add a whole bunch of indirection/abstraction for the sake of it - it'll probably just use of more of our precious memory.
59+
* Don't add a whole bunch of indirection/abstraction for the sake of it - it'll probably just use more of our precious memory.
6060
* If you add a new API, try and make it familiar to Arduino/JavaScript users.
6161
* Please [RUN THE TESTS](tests/README.md) before and after your changes to check that there are no regressions
6262
* Finally, please issue us a pull request to [www.github.com/espruino](https://www.github.com/espruino/Espruino) via GitHub. It's way easier for us to incorporate, give credit, and track changes that way.

0 commit comments

Comments
 (0)