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:
|
||||
push:
|
||||
|
@ -9,7 +9,7 @@ on:
|
|||
- 'py/**'
|
||||
- 'extmod/**'
|
||||
- 'lib/**'
|
||||
- 'ports/javascript/**'
|
||||
- 'ports/webassembly/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -17,8 +17,8 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install packages
|
||||
run: source tools/ci.sh && ci_javascript_setup
|
||||
run: source tools/ci.sh && ci_webassembly_setup
|
||||
- name: Build
|
||||
run: source tools/ci.sh && ci_javascript_build
|
||||
run: source tools/ci.sh && ci_webassembly_build
|
||||
- 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
|
||||
$(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
|
|
@ -1,13 +1,18 @@
|
|||
MicroPython.js
|
||||
==============
|
||||
MicroPython WebAssembly
|
||||
=======================
|
||||
|
||||
MicroPython transmuted into Javascript by Emscripten.
|
||||
MicroPython for [WebAssembly](https://webassembly.org/).
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
Building micropython.js bears the same requirements as the standard MicroPython
|
||||
ports with the addition of Emscripten (and uglify-js for the minified file).
|
||||
Building webassembly port bears the same requirements as the standard
|
||||
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
|
||||
------------------
|
|
@ -105,7 +105,7 @@
|
|||
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
|
||||
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (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_UCTYPES (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
|
||||
(cd emsdk && ./emsdk install latest && ./emsdk activate latest)
|
||||
}
|
||||
|
||||
function ci_javascript_build {
|
||||
function ci_webassembly_build {
|
||||
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.
|
||||
(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…
Reference in New Issue