If you enable Actions on your fork of MicroPython then it consistently
fails the Coverage Upload step (unless you set a codecov token in your
fork). This means you get a failure email each time you push to your own
repo.
This commit fixes that.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Avoids a vague error from the 'vcs' versioning scheme if recent tags
haven't been pushed to the fork.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
The VS 2017 and VS 2019 MSVC CI jobs have been failing intermittently for
months due to Chocolatey/Microsoft installer infrastructure issues when
downloading old Visual Studio build tools onto windows-latest runners.
These are not code failures - the build tools installation itself is
unreliable (CDN timeouts, corrupt downloads, installer self-update loops).
This removes VS 2017 from the matrix entirely and switches VS 2019 to use
the v142 toolset that's already pre-installed on windows-2022 runners as a
component of VS 2022. The PlatformToolset is now passed explicitly to
MSBuild for both VS 2019 (v142) and VS 2022 (v143), and the Chocolatey
installation step is removed.
VS 2017 reached end-of-life in 2022, and the v141 toolset is no longer
reliably installable on GitHub-hosted runners (actions/runner-images#9701,
actions/runner-images#12764). The windows-2019 runner image was removed in
June 2025. Docker containers are not supported on Windows runners, and the
repo's 10GB Actions cache is already full, so caching the installation
isn't feasible either. MSVC v143 is binary-compatible back to v141, so the
testing value of v141 was marginal.
The net effect is 16 MSVC jobs (down from 24) with zero installation steps
and hopefully no more flaky failures.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.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>
This reverts commit 046013a1ff.
Looks like since the latest round of GitHub Actions updates, the
Cache LRU algorithm is working as designed again.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
As of January 12 the default Python version changed from 3.9 to
3.12, and 3.12 has issues running the settrace tests.
3.13 seems to also have some issues, so setting 3.11 for now.
See https://github.com/actions/runner-images/issues/13468
Signed-off-by: Angus Gratton <angus@redyak.com.au>
"MicroPython" is sometimes misspelled as "Micropython". Add an explicit
check for that as part of CI (note that codespell doesn't consider case
when spelling, hence the need to do it this way).
Signed-off-by: Damien George <damien@micropython.org>
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>
Also make sure code_size runs when the esp32 port source changes, as per
the other ports that are built as part of code_size.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Signed-off-by: Damien George <damien@micropython.org>
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>
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>
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>
Zephyr CI is currently failing, because the runner is out of space.
Free up some more space using the existing plugin.
Fixes issue #18290.
Signed-off-by: Damien George <damien@micropython.org>
Currently it seems if master branch doesn't build for 1-2 days then the
cached ESP-IDF install (1.6GB) and Zephyr workspace (3.1GB) caches expire.
Then each PR branch has to create its own redundant cache instead of
falling back to the default branch cache, which is expensive and quickly
blows our 10GB cache limit.
Currently this is mitigated (and possibly happens more frequently) due to
GitHub's relatively soft enforcement of the limit (at time of writing we're
using 33GB of 10GB), but apparently they're going to start enforcing it
more aggressively in October.
(We may find we need to do this twice a day...)
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
The Windows 8.1 sdksetup.exe in particular seems seems to fail
intermittently pretty often, so retry each step up to four times before
failing outright.
Delete the Chocolatey temp directory between each run, as it seems like the
root cause is a corrupt download.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
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 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>
Because these ports run tests as part of CI, and need to be run if any of
the tests change, to check those changes.
Signed-off-by: Damien George <damien@micropython.org>
The unix port is needed to build the docs, due to the cpydiff tests which
run both CPython and MicroPython (unix port). That was previously not
failing the CI because the output from MicroPython was:
/bin/sh: 1: ../ports/unix/build-standard/micropython: not found
which doesn't match the CPython output for any of the cpydiff tests, and so
it was considered a "pass" in terms of the output differing.
Also, run the docs workflow when py/ or tests/cpydiff/ changes, because the
cpydiff results may change when the core code changes.
Signed-off-by: Damien George <damien@micropython.org>
This removes the need for an explicit `sys_settrace_features.py.exp` file.
This means that people testing locally will also need to install Python
3.11 in some way, such as with pyenv or uv, and use it during
`make VARIANT=coverage test`, or they will get failures.
When using Python from GitHub actions/setup-python, pip3 can't be wrapped
by sudo, because this invokes the operating system python instead.
Signed-off-by: Jeff Epler <jepler@gmail.com>