github/workflows: Add new workflow to test .mpy file format and tools.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
c0f2af4e86
commit
73a1927fce
|
@ -0,0 +1,18 @@
|
|||
name: .mpy file format and tools
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/*.yml'
|
||||
- 'tools/**'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install packages
|
||||
run: source tools/ci.sh && ci_mpy_format_setup
|
||||
- name: Test mpy-tool.py
|
||||
run: source tools/ci.sh && ci_mpy_format_test
|
17
tools/ci.sh
17
tools/ci.sh
|
@ -67,6 +67,23 @@ function ci_code_size_build {
|
|||
tools/metrics.py build bm | tee ~/size1
|
||||
}
|
||||
|
||||
########################################################################################
|
||||
# .mpy file format
|
||||
|
||||
function ci_mpy_format_setup {
|
||||
sudo pip3 install pyelftools
|
||||
}
|
||||
|
||||
function ci_mpy_format_test {
|
||||
# Test mpy-tool.py dump feature on bytecode
|
||||
python2 ./tools/mpy-tool.py -xd ports/minimal/frozentest.mpy
|
||||
python3 ./tools/mpy-tool.py -xd ports/minimal/frozentest.mpy
|
||||
|
||||
# Test mpy-tool.py dump feature on native code
|
||||
make -C examples/natmod/features1
|
||||
./tools/mpy-tool.py -xd examples/natmod/features1/features1.mpy
|
||||
}
|
||||
|
||||
########################################################################################
|
||||
# ports/cc3200
|
||||
|
||||
|
|
Loading…
Reference in New Issue