github/workflows: Build all example .py files as part of CI.

Signed-off-by: Damien George <damien@micropython.org>
pull/705/head
Damien George 2023-07-24 10:26:05 +10:00
rodzic 8fc9edabf3
commit 752ce66c24
2 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -17,6 +17,8 @@ jobs:
run: source tools/ci.sh && ci_build_packages_check_manifest
- name: Compile package index
run: source tools/ci.sh && ci_build_packages_compile_index
- name: Compile package examples
run: source tools/ci.sh && ci_build_packages_examples
- name: Publish packages for branch
if: vars.MICROPY_PUBLISH_MIP_INDEX && github.event_name == 'push' && ! github.event.deleted
run: source tools/ci.sh && ci_push_package_index

Wyświetl plik

@ -41,6 +41,12 @@ function ci_build_packages_compile_index {
python3 tools/build.py --micropython /tmp/micropython --output $PACKAGE_INDEX_PATH
}
function ci_build_packages_examples {
for example in $(find -path \*example\*.py); do
/tmp/micropython/mpy-cross/build/mpy-cross $example
done
}
function ci_push_package_index {
set -euo pipefail