Skip to content

Commit 752ce66

Browse files
committed
github/workflows: Build all example .py files as part of CI.
Signed-off-by: Damien George <[email protected]>
1 parent 8fc9eda commit 752ce66

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/build_packages.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
run: source tools/ci.sh && ci_build_packages_check_manifest
1818
- name: Compile package index
1919
run: source tools/ci.sh && ci_build_packages_compile_index
20+
- name: Compile package examples
21+
run: source tools/ci.sh && ci_build_packages_examples
2022
- name: Publish packages for branch
2123
if: vars.MICROPY_PUBLISH_MIP_INDEX && github.event_name == 'push' && ! github.event.deleted
2224
run: source tools/ci.sh && ci_push_package_index

tools/ci.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ function ci_build_packages_compile_index {
4141
python3 tools/build.py --micropython /tmp/micropython --output $PACKAGE_INDEX_PATH
4242
}
4343

44+
function ci_build_packages_examples {
45+
for example in $(find -path \*example\*.py); do
46+
/tmp/micropython/mpy-cross/build/mpy-cross $example
47+
done
48+
}
49+
4450
function ci_push_package_index {
4551
set -euo pipefail
4652

0 commit comments

Comments
 (0)