Pull in the CI docker image v0.22.0, which contains the Zephyr SDK
0.14.0 release, and use the Zephyr SDK 0.14.0 for building and testing
Zephyr in the CI.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The twister workflow was invoking `west config`, which requires a west
workspace to be set up, prior to initialising the workspace via
`west init`.
This commit relocates the `west config` to be run after the workspace
initialisation.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The filter in the testcase.yaml made it impossible for these to run.
Also, the Kconfig names for the options didn't really make much sense
so they were renamed to avoid conflict.
This fixes an issue found by #36433.
Signed-off-by: Yuval Peress <peress@google.com>
ZEPHYR_SDK_INSTALL_DIR is a required environment variable, otherwise the
script fails.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit updates the Bluetooth test workflow to fetch all branches
during checkout by specifying the fetch depth of 0, in order to allow
rebasing onto the latest main branch before running the workflow.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The 'bluetooth-tests' workflow is currently written such that it
only triggers on the pull requests that make changes to the files under
specific paths, which do not include the workflow itself.
This allows the workflow changes to be merged without being tested in
the CI and may lead to CI breakages when such changes contain errors.
This commit adds the workflow itself to the list of trigger paths so
that any changes made to the 'bluetooth-tests.yaml' and
'bluetooth-tests-publish.yaml' workflows are tested in the CI before
merging.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Like in most other actions, rebase the branch on to of the latest main
branch in order to ensure that we pick up any hotfixes.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
With this setting enabled, Git credentials are not kept after checkout.
Credentials are not necessary after the checkout step since we do not
do any further manual push/pull operations.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Split Bluetooth tests workflow into 2 steps:
- One that runs the actual tests and stored results
- A second one that fecthes and uploads tests results
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Make sure sources are up-to-date before installing any package. This is
causing failures on some workflows.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The -q flag supresses all wget output, even when there is a failure.
This makes it difficult to diagnose CI failures when the download fails.
The --no-verbose flag is a better choice: it is silent enough but it
always shows the outcome.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The documentation supports a special target named "html-fast" that skips
generation of all Kconfig pages. Instead, it creates a single dummy page
where a reference to all existing Kconfig options is placed. This means
that references are resolved, but content is not rendered. Since Kconfig
help is rendered as a literal, chances of breaking documentation
build due to Kconfig changes should be low. The change proposed in this
patch should speed up documentation build on pull requests while a
proper solution is found for the Kconfig docs.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add the documentation build jobs to a concurrency group so that branch
force pushes will automatically cancel in progress jobs.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
When an error happens during the Sphinx build (e.g. due to a broken
reference), the process hangs on CI when run with both `-j auto`
(parallel build) and `-W` (warnings as errors) options. The root cause
of the issue is unknown, and does not seem to happen locally. Parallel
builds are experimental on Sphinx, so they have been disabled on CI for
now. Because CI runner is a single core machine, the build time should
remain equal or similar. The option is still left as default, so local
builds will continue to benefit from parallelization.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
We are reusing already checked out trees that might be in the middle of
a rebase or conflict. Remove files preventing us from doing another
rebase after the tree was reset.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Merge all results from all nodes and generate an HTML report and upload
it as an artifact for review of failures offline.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If variable exit is not defined, the test is not properly executed.
Note that in case of an actual error the var would be defined and the
test executed properly.
Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
Improve calculation of matrix and move calculations from workflow to the
testplan script. We now generate a file that can be parsed by the action
with the data needed to start twister with the right number of nodes.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When the number of tests is smaller, but not too small, we still run on
10 builders, if the test is small enough however, we will determine the
number of builders automatically.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Pull in the CI docker image v0.21.0, which contains the Zephyr SDK
0.13.2 release, and use the Zephyr SDK 0.13.2 for building and testing
Zephyr in the CI.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Merged 3 files used to generate the test plan per PR based on the
changes. 2 python scripts and a shell script are now all merged into 1
python script that generates the input file for twister based on a list
of changed files by the PR.
This remove lots of old and obsolete code and simplifies things a bit,
no need anymore for an intermediate script to call twister, we call it
directly in the workflow and use the new test_plan script to generate
the test plan.
This also reenables the recently disabled tag based filtering which had
a bug, bug is resolved in this new implementation.
On push events, we now run twister without the --integration option to
catch any issues in the main branch that were not caught in PRs. PRs
continue to run with --integration enabled. This event (push) is now run
on 15 builders due to the increased size.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Give documentation build up to 30 minutes to finish. This should improve
the user experience when Sphinx hangs due to broken references, a
problem that needs some investigation.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This action replaces current buildkite workflow and uses github actions
to build and run tests in the zephyr tree using twister. The main
differences to current builtkite workflow:
- the action handles all 3 events: pull requests, push and schedule
- the action determines size of matrix (number of build hosts) based on
the change with a minimum of 1 builder. If more tests are built/run
due to changes to boards or tests/samples, the matrix size is
increased. This will avoid timeouts when running over capacity due to
board/test changes.
- We use ccache and store cache files on amazon S3 for more flexibility
- Results are collected per build host and merged in the final step and
failures are posted into github action check runs.
- It runs on more powerful instances that can handle more load.
Currently we have 10 build hosts per run (that can increase depending
on number of tests run) and can deliver results within 1 hour.
- the action can deal with non code changes and will not allocate more
than required to deal with changes to documentation and other files
that do not require running twister
The goal long-term is better integrate this workflow with other actions
and not run unncessarily if other workflows have failed, for example, if
commit message is bogus, we should stop at that check, to avoid wasting
resources given that the commit message will have to be fixed anyways
which would later trigger another run on the same code.
Currently there is 1 open issue with this action related to a github
workflow bug where the final results are not posted to the same workflow
and might appear under other workflows. Github is working on this bug.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Process issues are tracked and do not need to be automatically made
stale.
Suggested-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Avoid rebasing and instead use the commit range. This avoids issues with
trees having intermediate rebase data after a reboot (due to
cancellation).
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Misc fixes including:
- unique job names
- Change description to mention Bluetooth
- Retry west update
- Use latest unit test publication action
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
- use zephyr runner
- reduce number of builders and adapt matrix to be platform based
- check for changed files and optimize run accordingly, should reduce
build times depending on what has changed
- If no source has changed, skip twister completely.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a code coverage collection action that triggers based on a schedule
on the main branch and posts results to
https://app.codecov.io/gh/zephyrproject-rtos/zephyr
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Set the artifact run_id to the one from the doc-build workflow. This way
the downloaded artifact should always match the one from the build
action that triggered publish.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
To restrict the job to the upstream repository a new `if` entry was
added, however, another `if` was already present (violates yaml).
Combined the conditions into a single expression.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new toctree with reference material, including:
- API docs (Doxygen)
- Kconfig options
- Devicetree bindings
Note that the toctree is rendered manually due to the limitations Sphinx
has when it comes to including relative URLs. Hardcoding absolute URLs
in toctrees is possible, but that means we'd need to update the toctree
on every release (to point to /version/ URL), and downstream users of
the documentation would have to manually patch the toctree with their
own URL. In order to make local builds work, version prefix is only
added if publish tag is provided.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Create a template for nominating GitHub users for an elevated
permission levels. Update the TSC Project Roles page to reference the
nomination template and add clarity to the GitHub permissions allowed at
each level.
Signed-off-by: Keith Short <keithshort@google.com>
Upgrade to Doxygen version 1.9.1. Package is downloaded directly from
the Doxygen official site, since it is not yet part of the latest Ubuntu
LTS. Note that libclang1-9 and libclang-cpp9 are runtime dependencies
required by Doxygen.
NOTE: Documentation can still be built with older Doxygen versions (e.g.
1.8.17 shipped with latest Ubuntu LTS), however, the template used in
upcoming patches claims to work better with Doxygen 1.9.1 or 1.9.2.
Using 1.9.1 as theme v1.6.0 has some issues on mobile view when using
Doxygen 1.9.2, see
https://github.com/jothepro/doxygen-awesome-css/issues/47.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Now that SDK 0.13.1 is released bump buildkite & github workflows
to use this SDK version and the docker image that has it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Use 0.11.1 to build the docs. The docstrings are the same as 0.11.1a1,
so it doesn't make a difference in the output, but let's keep things
clean now that the final release is up.
Fix typos in the release notes.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
With CMake minimum required as 3.20.0 we update CI to use docker image
v0.18.2, which contains CMake 3.20.5.
For doc builds we fetch the same CMake v3.20.5 but using pip as the doc
build doesn't use the docker image.
The main reason for increasing CMake version is better toolchain
support.
The decision to bump the CMake version was taken by the Toolchain WG.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
To get confirmation this will work before I cut the release. That
pre-release is already available on PyPI.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This reverts commit 40a5cf6016. Debug
information is no longer necessary as doc-publish workflow is now
working correctly.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Enable debug mode and disable quiet option. It should help diagnosing
AWS S3 problems. Some prints have also been added to spot potential
problems.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
`github.event.workflow_run.head_branch` contains the actual release tag
on releases, so it is required. It does not affect the publication of
"latest".
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Publish action has been refactored into a workflow_run based action.
The action is now triggered after a successful doc-build workflow run
(only on main/release branches). The artifacts are downloaded from the
build run and published accordingly. Publish code has been simplified a
bit and PDF upload has been added.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Artifacts will be required for the publish workflow, so do not let the
build workflow succeed without them being uploaded correctly.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Storing west version in a single place avoids keeping duplicates in each
job. Also added a note on why pinning version is important: west
docstrings are extracted from the installed version.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The pip cache should be discarded if any of the required dependencies
changes, so use the hash of the requirements file as a key source.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
xz compression reduces the html archive sice from ~350MB to ~90MB (at
the cost of more compression time). Compression has been moved to a
separate step.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This action will run on each PR and will post a comment if footprint of
some reference applications has changed, initially as a FYI but later it
will be enforced when footprint for example is gone beyond a certain
threshold.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Enable the built-in Sphinx Graphviz extension to allow creating Graphviz
diagrams natively on the source files. Some style defaults have been
enabled to make sure diagrams are consistent and have good quality in
both light and dark modes.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This means a light requirements-doc.txt is enough for doc writers. See
previous discussions in PR #31199 and PR #31239
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch removes duplicated label RISCVv32/64 and replace into
RISCV that has already used in GitHub.
Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
The usage of -W may lead to the loss of the Sphinx build environment
even for small typos. Remove this option from the defaults but still
enable it on CI, where the fail-fast behavior given by -W is desired.
Fixes#36033
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The workflow was pointing to `master` instead of `main`, which
prevented it from running after the branch was renamed.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Publish docs every 3 hours, this way fixes early in the morning are
reflected online earlier and no need to wait until the next day.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
`check-warns` step is no longer used since the introduction of
`warnings_filter` extension.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a very simple check that verifies that new error numbers are added
according to the errno.h file in newlib, in order to maintain
compatibility with it.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update docker image to v0.17.1 to get SDK 0.13.0-alpha-1 to
allow testing of ARC64 as well as the SDK update to gcc-10.3 and
qemu 6.0.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update to new docker image with various updates including renode, llvm
and the base distro (moving from ubuntu 18.04 to 20.04).
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is mainly a feature release which includes a few ways to speed up
'west update', along with a couple of fixes and other changes.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
With balancing in twister fixed, reduce matrix size for now, since we
are running tests only for native_posix.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Upgrade core Python dependencies (setuptools, wheel, pip) at a system
level. Some old versions of pip do not resolve the dependency chain
correctly, this is why it has been added to the list.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Documentation build still contained references to the old top Makefile
and old known-issues folder.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Failing a backport is not a bug per-se. We create a GitHub issue to be
able to track the Pull Requests that failed to backport, but they should
not be considered bugs.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
We are now in the process of extracting edtlib and dtlib into a
standalone source code library that we intend to share with other
projects.
Links related to the work making this standalone:
https://pypi.org/project/devicetree/https://python-devicetree.readthedocs.io/en/latest/https://github.com/zephyrproject-rtos/python-devicetree
This standalone repo includes the same features as what we have in
Zephyr, but in its own 'devicetree' python package with PyPI
integration, etc.
To avoid making this a hard fork, move the code that's being made
standalone around in Zephyr into a new scripts/dts/python-devicetree
subdirectory, and handle the package and sys.path changes in the
various places in the tree that use it.
From now on, it will be possible to update the standalone repository
by just recursively copying scripts/dts/python-devicetree's contents
into it and committing the results.
This is an interim step; do NOT 'pip install devicetree' yet.
The code in the zephyr repository is still the canonical location.
(In the long term, people will get the devicetree package from PyPI
just like they do the 'yaml' package today, but that won't happen for
the foreseeable future.)
This commit is purely intended to avoid a hard fork for the standalone
code, and no functional changes besides the package structure and
location of the code itself are expected.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Do not run workflow on each issue change, instead run every 10 minutes.
Running this on every issue open/close/label will cause reaching API
call limit very fast when issues are automatically created from coverity
or during bug triaging sessions.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some of the generated documentation depends on the devicetree scripts.
E.g. the bindings index uses edtlib.
We don't have a well-defined interface boundary here for managing
dependencies, so let's just add the entire dts directory to the
'paths' glob list in doc-build.yml. This will ensure we don't
accidentally change some DT implementation detail in a way that breaks
the docs.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Move the top-level Makefile to the documentation folder as it is only
used for documentation.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This new release adds support for diffs as well as being able to list
added and removed projects.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
As per the agreements in the Process Group Meeting, rework the procedure
to include external code so that it reflects the reality of Zehyr today
with the choice between modules and integration into the main tree, and
decouple the non-Apache v2.0 license side of the question from the
process from importing 3rd-party code.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update the backport action to 1.1.1-1, which adds support for issue
creation when a backport fails.
In our case, label the issue with the "backport" and "bug" labels.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
In order to develop further functionality in the action-manifest repo,
pin the version to v1.0.0 here.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This document will show up when a viewer selects the "Security" tab, and
selects the "Security Policy". It has a brief introduction, and directs
to the official documentation of the security policy.
Signed-off-by: David Brown <david.brown@linaro.org>
This should produce no changes in the docs since there are no API
changes in this point release, but let's just keep the build up to
date with the version being documented for cleanliness.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Automatically apply the "area: Bluetooth Audio" label to changes in the
subsys/bluetooth/audio directory.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When VERSION is changed, do not wait for daily cron and publish
documentation immediately to keep things in sync.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We have been publishing docs to the wrong folter on AWS S3. We still had
the official docs published to the correct place manually though, so all
was good.
This change will eliminate the manual step of publishing documentation
and will put things where they belong.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Action to create release when tag is pushed. This will additionally
create an SPDX file and the changelog since the last tag.
The release is created as a draft and will have to be modified by the
release engineer and published when ready.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Instead of rebasing just before running the compliance script, do so
before running `west update`, so that the main manifest, west.yml, is up
to date with the latest master before west inspects it.
Fixes#31327.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
As recommended by @mbolivar-nordic and... stackoverflow.
While I could not reproduce this locally, this should get rid of many
non-fatal pip errors in CI all looking like this one:
Building wheels for collected packages: PyYAML, progress, psutil, ...
Running setup.py bdist_wheel for PyYAML: started
Running setup.py bdist_wheel for PyYAML: finished with status 'error'
Complete output from command /usr/bin/python3 -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-b3sj5a6m/PyYAML/setup.py';
f=getattr(tokenize, 'open',open)(__file__);code=f.read().replace(
'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
bdist_wheel -d /tmp/tmpvn0bt6xfpip-wheel- --python-tag cp36:
Failed building wheel for PyYAML
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Running setup.py clean for PyYAML
Etc.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
- Use older junitparser, new version is not compatible
- Fetch pull request ref, not master
- add few debug messages
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use descriptive and unique job names, otherwise we end up with those
showing up in different location with no way to know which is which.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The manifest GitHub action now optionally takes a checked out tree in
order to find the merge base of the pull request branch. Provide this to
avoid artifacts in edge cases.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Automatically assign the Bluetooth Controller and
Bluetooth Host labels to changes in the controller and
host respecitvely. For this, both Mesh and the Gatt services
will be considered part of the host.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The manifest workflow uses the manifest action to detect changes in the
west manifest. It then analyzes the changes and posts labels and a
comment in table format accordingly.
It is meant to be used as a helper bot for developers submitting changes
to modules, reducing the need for manual work and oversight and
automating common operations.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Currently, nightly releases are performed in Forks as well.
Since these fail due to missing AWS credentials this causes
a lot of messages about failing builds, this commit disables
them for Forks.
Signed-off-by: Max Bachmann <kontakt@maxbachmann.de>
Record MDB's CLD process pid to file so this process can be
terminated by sanitycheck infrastructure.
Update mdb runners test to be able to handle changes.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Github has deprecated add-path, so update the workflows that use it to
the new method of setting the PATH.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Changing .known-issues/doc should always trigger a documentation build
so add it to the filters.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Rather than doing a doc build on every PR, limit it to PRs that either
touch a file in doc/, *.rst and what's listed as DOXY_SOURCES in
doc/CMakeLists.txt.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Use the pytest test framework in the dtlib.py and edtlib.py test
suites (testdtlib.py and testedtlib.py respectively).
The goal here is not to change what is being tested. The existing test
suite is excellent and very thorough.
However, it is made up of executable scripts where all of the tests
are run using a hand-rolled framework in a single function per file.
This is a bit all-or-nothing and prevents various nice features
available in the de-facto standard pytest test framework from being
used.
In particular, pytest can:
- drop into a debugger (pdb) when there is a problem
- accept a pattern which specifies a subset of tests to run
- print very detailed error messages about the actual and expected
results in various traceback formats from brief to very verbose
- gather coverage data for the python scripts being tested (via plugin)
- run tests in parallel (via plugin)
- It's easy in pytest to run tests with temporary directories
using the tmp_path and other fixtures. This us avoid
temporarily dirtying the working tree as is done now.
Moving to pytest lets us leverage all of these things without any loss
in ease of use (in fact, some things are nicer in pytest):
- Any function that starts with "test_" is automatically picked up and
run. No need for rolling up lists of functions into a test suite.
- Tests are written using ordinary Python 'assert'
statements.
- Pytest magic unpacks the AST of failed asserts to print details on
what went wrong in really nice ways. For example, it will show you
exactly what parts of two strings that are expected to be equal
differ.
For the most part, this is a pretty mechanical conversion:
- extract helpers and test cases into separate functions
- insert temporary paths and adjust tests accordingly to not match
file names exactly
- use 'assert CONDITION' instead of 'if not CONDITION: fail()'
There are a few cases where making this happen required slightly
larger changes than that, but they are limited.
Move the checks from check_compliance.py to a new GitHub workflow,
removing hacks that are no longer needed.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Inspect the hex file with intelhex, and fail if the hex file has any
contents in the UICR area(s).
family == 'NRF52' still always does --sectoranduicrerase, but this
option is not available on other families.
Add --force command line option to proceed with flashing instead of
failing.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
The action is currently being aborted due to a very low value. Trying
something larger to get more operation done per day.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The current version of the labeler action doesn't support yet negations.
This is supported in master but we probably want to wait until a release
to update. In the meantime remove the rule that uses negations.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
With new event 'pull_request_target' it is now possible to run the
backporting action that we used to have in the past as a Github app.
Use labels for backporting as before.
See https://github.com/tibdex/backport for more details.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use mypy to type check the runners package.
The test procedure is now annoying enough to replicate locally that
I'm going to wrap it in a script. Do this for both UNIX and Windows
environments by writing that script in Python.
Keep the GitHub workflow up to date so we now get mypy results in CI.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>