This commit renames the "tests/frozen" directory into "tests/assets" to
make it more explicit that it does contain files that are needed for
other tests to function.
Right now there's only a single pre-compiled module being used for
miscellaneous tests, but it will soon hold ROMFS test data as well.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
The compiler flags -ansi -std=c11 were both being passed to g++, causing
weirdness. Removed the -ansi flag entirely, it's superseded by explicitly
setting the standard.
Also adds build coverage for user C modules (including C++) in CI.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Adds build coverage of C++ compilation on the following ports:
mimxrt, renesas-ra, esp8266, windows (mingw32).
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Intended to catch problems where new features don't build
in old ESP-IDF.
Includes major refactor to the GitHub Actions Workflow for
esp32 port, including making a reusable workflow for both
Code Size and ESP32 build jobs.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Reclassify failures of tests listed in flaky_tests_to_ignore as "ignored"
instead of retrying them. Ignored tests still run and their output is
reported, but they don't affect the exit code. The ci.sh --exclude lists
for these tests are removed so they run normally.
Signed-off-by: Andrew Leech <andrew.leech@planet-innovation.com>
This commit updates the Unix/x86 target's environment to use the latest
available LTS version of Ubuntu Linux (24.04).
Since the new OS updated some key components used in the CI build
process, a few modifications have been made to the setup and build
procedure. The new OS introduces a CPython version that is known to not
be compatible with a subset of settrace tests, so even though the OS is
updated, an older version of CPython is installed as part of the image
provisioning process.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit forces the installation of CPython 3.11 instead of CPython
3.12 in the OS image for Unix/RV64 CI jobs.
CPython 3.12 is not compatible with settrace tests, but it is the
CPython version that is installed by default in "ubuntu-latest" (which
is Ubuntu 24.04 LTS right now). Updating the base image for the RV64
tests also disabled settrace tests to work around its incompatibility,
however turns out there is a way to force CI to set up a base OS image
with an arbitrary CPython version.
Now the RV64 CI jobs are now going to be executed using CPython 3.11,
and thus the settrace tests can be removed from the ignore list.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit updates the Unix/Arm target's environment to use the latest
available LTS version of Ubuntu Linux (24.04).
Since the new OS updated some key components used in the CI build
process, a few modifications have been made to the setup and build
procedure. Newer QEMU's sysroot location changed and the "static"
variant of the QEMU emulators has to be used to make binfmt work, and
updated autotools versions split some macros into an optional package
that has to be manually installed.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit updates the Unix/MIPS target's environment to use the latest
available LTS version of Ubuntu Linux (24.04).
Since the new OS updated some key components used in the CI build
process, a few modifications have been made to the setup and build
procedure. Newer QEMU's sysroot location changed and the "static"
variant of the QEMU emulators has to be used to make binfmt work, and
updated autotools versions split some macros into an optional package
that has to be manually installed.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Add an esp32 build (specifically ESP32_GENERIC) to the CI code-size check.
Multiple new steps must be done to prepare for building esp32, and caching
is used to speed up both the install of the IDF and the build process.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit updates the test procedure for the Unix port targeting the
RV64 platform to also run the battery of native modules test that is
part of the QEMU port.
Unfortunately this required a few changes to the CI setup since the Unix
port was still using an older version of Ubuntu LTS than the RISC-V
natmods build infrastructure expects. Updating the OS version just for
the RV64 Unix target brought a couple of issues when building the code
(an extra package is now needed to let FFI build) and running tests
(QEMU binfmt support requires a new setup).
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit lets the QEMU port's VIRT_RV64 board load and run native
modules, via the appropriate configuration changes in mpconfigport.h.
Now the CI test job for the QEMU/RV64 port can also run natmods and see
whether they actually work, so the CI tasks script has been updated to
bring RV64 to parity with RV32 as far as CI checks go.
Documentation was also updated, since now all supported boards in the
QEMU port should be able to run natmod tests.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit adds the ability to compile native modules for the RV64
platform, using "rv64imc" as its architecture name (eg.
"make ARCH=rv64imc" should build a RV64 natmod).
The rest of 64-bits relocations needed to build a native module are now
implemented, and all sample native modules build without errors or
warnings. The same Picolibc caveats on RV32 also apply on RV64, thus
the documentation was updated accordingly.
RV64 native modules are also built as part of the CI process, but not
yet executed as the QEMU port is not yet able to load and run them.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Includes a base variant with LAN, and C5_WIFI and C6_WIFI variants with
LAN, WiFi and BLE.
And builds this board in the esp32 CI, to cover the P4 support.
Signed-off-by: Vincent1-python <pywei201209@163.com>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Signed-off-by: Damien George <damien@micropython.org>
Currently the CI for stm32 only tests building about half of the available
MCU families. This commit adds the remaining families to the stm32 CI
jobs.
Signed-off-by: Damien George <damien@micropython.org>
This commit adds a new workflow step to the CI, to test the debug
emitter provided by mpy-cross. The checks being done are limited to
make sure that the debug emitter does not crash and emits opcodes for a
simple test file that is guaranteed to work for all configurations.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit adds custom command completion functions for both the zsh
and fish shell.
The behaviour for those new completions follow the existing completion
for the bash shell, including the way to generate the completion alias
(with appropriately named command line switches).
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit adapts the stm32 port to allow switching from STM USB stack to
TinyUSB stack.
Using TinyUSB improves consistancy with other MicroPython ports and brings
in the ability to use the runtime USB definition support recently added to
other TinyUSB based ports.
By default the existing STM USB stack is used. TinyUSB can be enabled in a
board configuration with:
#define MICROPY_HW_TINYUSB_STACK (1)
Or, it can be enabled from the command line with:
make -C ports/stm32 CFLAGS_EXTRA='-DMICROPY_HW_TINYUSB_STACK=1'
Signed-off-by: Andrew Leech <andrew@alelec.net>
Now the default reference commit is the first parent of the selected
commit, instead of the first parent of HEAD.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This will show a line for both the reference and comparison, e.g.,
Reference: zephyr/boards: Add PocketBeagle 2 rev A1… [00a926e99e]
Comparison: metrics: Tersely show the commi… [merge of c7ac411e22]
When the comparison is a merge commit (as it is during CI) the second
parent of that commit is shown instead.
This will be helpful when checking which revision of the code size report
comment on a PR corresponds to which revision of the code.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
The zephyr port doesn't have a Makefile so can't run `make submodules`.
Instead they must be explicitly initialized.
Signed-off-by: Damien George <damien@micropython.org>
For instance, to compare HEAD to origin/master on only the minimal x86
build, use
PORTS_TO_CHECK=m REFERENCE=origin/master tools/ci.sh code_size_build
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
With all the preceeding improvements to the test suite, it's now possible
to just run `make VARIANT=minimal test` -- which is equivalent to just
`./run-tests.py` -- on the unix minimal variant.
Signed-off-by: Damien George <damien@micropython.org>
With the recent improvements to the test suite, and fixes for `pow`, the
full test suite can now be run (and appropriate tests will be automatically
skipped).
Signed-off-by: Damien George <damien@micropython.org>
This adds a QEMU-based bare metal RISC-V 64 bits port. For the time being
only QEMU's "virt" 64 bits board is supported, using the lp64 ABI and the
RV64IMC architecture.
The port's README is also updated to keep track of these changes.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Python 2.7 has been EOL since January 2020.
Ubuntu oldoldlts (Focal Fossa, 20.04) has Python 3.8. Debian oldoldstable
(Buster, from 2019) has Python 3.7. RHEL 8 (from 2019) has Python 3.6.
It's easier than ever to install a modern Python using uv.
Given this, it seems like a fine idea to drop Python 2.7 support.
Even though the build is not tested on Python as old as 3.3, I left
comments stating that "3.3+" is the baseline Python version. However, it
might make sense to bump this to e.g., 3.10, the oldest Python 3 version
used during CI. Or, using uv or another method actually test on the oldest
Python interpreter that is desirable to support (uv goes back to Python 3.7
easily; in October 2025, the oldest supported Python interpreter version
will be 3.10)
Signed-off-by: Jeff Epler <jepler@gmail.com>
This is recommended by Espressif, and it's the only way to ensure
everyone builds the same set of component versions.
The awkward part is that updating the ESP-IDF version will churn a line
in each of these files (and possibly other changes).
Adds a build-time check for lock file changes, which is either a warning or
a hard error depending on the value of MICROPY_MAINTAINER_BUILD
flag (introduced in previous commit).
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
This allows us to have some things which are fatal errors in CI or nightly
builds, but warnings in normal developer builds.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
The `thread/thread_gc1.py` test is a constant source of spurious failures
in Github CI.
This commit adds it to the list of tests skipped when running on Github CI
using either macos, qemu_riscv64, qemu_mips, or qemu_arm, to help reduce
the overall false positive rate and improve the predictive value of the
test fail indication.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
This commit lets CI extend the testing scope of the QEMU Arm target, by
letting it perform the usual battery of tests (interpreter and natmods)
also on hardfp targets.
The default board for Arm testing lacks hardware floating point support,
so natmods weren't tested in that specific configuration. With the
introduction of the "MPS_AN500" QEMU target, now this is made possible
as said board emulates a Cortex-M7 machine with a single- and
double-precision floating point unit.
To reduce the impact on build times, the "ci_qemu_build_arm_thumb" CI
step was split in two: "ci_qemu_build_arm_thumb_softfp" and
"ci_qemu_build_arm_thumb_hardfp" - so hopefully those can run in
parallel whenever possible.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Clang and gcc>=14 can use __has_feature() to detect if a sanitizer
is enabled, but older GCC has no mechanism - need to set a macro
explicitly for this to be recognised.
Necessary for increasing some resource limits in sanitizer builds.
Important not to use to avoid real issues!
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Also rewrite the sanitizer argument variables to not assume a variant.
longlong variant currently fails in this config, due to a bug fixed
in follow-up commit.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Updates the Zephyr port build instructions and CI to use the latest
Zephyr release tag.
Tested on max32690fthr and frdm_k64f.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>