javascript: Rename this port to 'webassembly'.
This commit is contained in:
parent
c616721b1a
commit
af54d2ce9f
@ -1,4 +1,4 @@
|
|||||||
name: javascript port
|
name: webassembly port
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -9,7 +9,7 @@ on:
|
|||||||
- 'py/**'
|
- 'py/**'
|
||||||
- 'extmod/**'
|
- 'extmod/**'
|
||||||
- 'lib/**'
|
- 'lib/**'
|
||||||
- 'ports/javascript/**'
|
- 'ports/webassembly/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -17,8 +17,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: source tools/ci.sh && ci_javascript_setup
|
run: source tools/ci.sh && ci_webassembly_setup
|
||||||
- name: Build
|
- name: Build
|
||||||
run: source tools/ci.sh && ci_javascript_build
|
run: source tools/ci.sh && ci_webassembly_build
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: source tools/ci.sh && ci_javascript_run_tests
|
run: source tools/ci.sh && ci_webassembly_run_tests
|
@ -51,6 +51,6 @@ min: $(BUILD)/micropython.js
|
|||||||
|
|
||||||
test: $(BUILD)/micropython.js $(TOP)/tests/run-tests.py
|
test: $(BUILD)/micropython.js $(TOP)/tests/run-tests.py
|
||||||
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
|
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
|
||||||
cd $(TOP)/tests && MICROPY_MICROPYTHON=../ports/javascript/node_run.sh ./run-tests.py -j1
|
cd $(TOP)/tests && MICROPY_MICROPYTHON=../ports/webassembly/node_run.sh ./run-tests.py -j1
|
||||||
|
|
||||||
include $(TOP)/py/mkrules.mk
|
include $(TOP)/py/mkrules.mk
|
@ -1,13 +1,18 @@
|
|||||||
MicroPython.js
|
MicroPython WebAssembly
|
||||||
==============
|
=======================
|
||||||
|
|
||||||
MicroPython transmuted into Javascript by Emscripten.
|
MicroPython for [WebAssembly](https://webassembly.org/).
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Building micropython.js bears the same requirements as the standard MicroPython
|
Building webassembly port bears the same requirements as the standard
|
||||||
ports with the addition of Emscripten (and uglify-js for the minified file).
|
MicroPython ports with the addition of Emscripten (and uglify-js for the
|
||||||
|
minified file).
|
||||||
|
|
||||||
|
The output includes `micropython.js` (a JavaScript wrapper for the
|
||||||
|
MicroPython runtime) and `firmware.wasm` (actual MicroPython compiled to
|
||||||
|
WASM).
|
||||||
|
|
||||||
Build instructions
|
Build instructions
|
||||||
------------------
|
------------------
|
@ -105,7 +105,7 @@
|
|||||||
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
|
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
|
||||||
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
|
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
|
||||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
||||||
#define MICROPY_PY_SYS_PLATFORM "javascript"
|
#define MICROPY_PY_SYS_PLATFORM "webassembly"
|
||||||
#define MICROPY_PY_UERRNO (1)
|
#define MICROPY_PY_UERRNO (1)
|
||||||
#define MICROPY_PY_UCTYPES (1)
|
#define MICROPY_PY_UCTYPES (1)
|
||||||
#define MICROPY_PY_UZLIB (1)
|
#define MICROPY_PY_UZLIB (1)
|
12
tools/ci.sh
12
tools/ci.sh
@ -172,21 +172,21 @@ function ci_esp8266_build {
|
|||||||
}
|
}
|
||||||
|
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# ports/javascript
|
# ports/webassembly
|
||||||
|
|
||||||
function ci_javascript_setup {
|
function ci_webassembly_setup {
|
||||||
git clone https://github.com/emscripten-core/emsdk.git
|
git clone https://github.com/emscripten-core/emsdk.git
|
||||||
(cd emsdk && ./emsdk install latest && ./emsdk activate latest)
|
(cd emsdk && ./emsdk install latest && ./emsdk activate latest)
|
||||||
}
|
}
|
||||||
|
|
||||||
function ci_javascript_build {
|
function ci_webassembly_build {
|
||||||
source emsdk/emsdk_env.sh
|
source emsdk/emsdk_env.sh
|
||||||
make ${MAKEOPTS} -C ports/javascript
|
make ${MAKEOPTS} -C ports/webassembly
|
||||||
}
|
}
|
||||||
|
|
||||||
function ci_javascript_run_tests {
|
function ci_webassembly_run_tests {
|
||||||
# This port is very slow at running, so only run a few of the tests.
|
# This port is very slow at running, so only run a few of the tests.
|
||||||
(cd tests && MICROPY_MICROPYTHON=../ports/javascript/node_run.sh ./run-tests.py -j1 basics/builtin_*.py)
|
(cd tests && MICROPY_MICROPYTHON=../ports/webassembly/node_run.sh ./run-tests.py -j1 basics/builtin_*.py)
|
||||||
}
|
}
|
||||||
|
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user