Support building .cpp files and linking them into the micropython
executable in a way similar to how it is done for .c files. The main
incentive here is to enable user C modules to use C++ files (which are put
in SRC_MOD_CXX by py.mk) since the core itself does not utilize C++.
However, to verify build functionality a unix overage test is added. The
esp32 port already has CXXFLAGS so just add the user modules' flags to it.
For the unix port use a copy of the CFLAGS but strip the ones which are not
usable for C++.
Adds a job to build the zephyr port in CI using the same docker container
that the zephyr project uses for its own CI.
Always make clean zephyr builds to ensure we don't just rebuild C code, but
we also rebuild Kconfig and dts. This is required when switching between
boards, which have different Kconfigs and device trees.
Uses the tagged zephyr 2.3.0 release.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
It might compile fine with S132 as SoftDevice for nRF52840.
However, there might be different hardware on the SoC which in
turn could make it fail.
SoftDevice S140 is correct BLE stack for nRF52840 SoC and would
provide a more accurate test build.
Eventually it would be good to run the full test suite on a big-endian
system, but for now this will help to catch build errors with the
big-endian configuration.
Signed-off-by: Damien George <damien@micropython.org>
The powerpc port can be built with two different UART drivers, so build
both in CI.
The default compiler is now powerpc64le-linux-gnu- so it does not need to
be specified on the command line.
Specifically:
- pca10040: It was already the default.
- microbit: It uses nRF51, has a Cortex-M0, and has additional libraries.
- pca10056: It has USB CDC.
Explicitly add the repository as upstream and fetch the master commit.
This makes this bare-arm/minimal job more robust when finding the
fork-point of a PR relative to upstream/master (especially for forks of
this repo).
But only when bluetooth is enabled, i.e. if building the dev or coverage
variants, and we have libusb available.
Update travis to match, i.e. specify the variant when doing
`make submodules`.
This is to make the Travis CI size check more robust, by not relying on the
saved firmware from a previous build (which may use a different compiler,
environment, etc) but rather compile both master and the PR and diff them.
This size check now checks both bare-arm and minimal x86-32 builds (before
it just checked minimal Cortex-M build).
Add -Wdouble-promotion and -Wfloat-conversion for most ports to ban out
implicit floating point conversions, and add extra Travis builds using
MICROPY_FLOAT_IMPL_FLOAT to uncover warnings which weren't found
previously. For the unix port -Wsign-comparison is added as well but only
there since only clang supports this but gcc doesn't.
For jobs which run tests multiple times terminate after the first run fails
otherwise the next test run overwrites the previous results, making
--print-failures useless.
Looking at the recent build history the time it takes just to complete the
OSX build is already 12 minutes so make it start early, which brings down
the total build time from about 20 minutes to 14 minutes.
Recent builds are failing with the following error:
Error: pkg-config 0.29.2 is already installed
Assuming this will be the case form now on, we don't have to install
pkgconfig anymore.
This adds a couple of commands to the run-tests script to print the diffs
of failed tests and also to clean up the .exp and .out files after failed
tests. (And a spelling error is fixed while we are touching nearby code.)
Travis is also updated to use these new commands, including using it for
more builds.
The CI job will fail if there is any code which does not conform to the
style encoded by tools/codeformat.py. And it will list any changes
required.
uncrustify is built from source because Ubuntu bionic has uncrustify-0.66.1
which is from 2017/11/22 and is missing many options needed here.