Commit Graph

80 Commits

Author SHA1 Message Date
Marc Herbert fcb8552b4a doc-build.yml: pip3 install wheel, fix 'invalid command bdist_wheel'
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>
2021-01-13 08:01:20 -05:00
Anas Nashif cc0f600753 ci: fix check_compliance workflow
- 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>
2021-01-12 23:25:37 -05:00
Marc Herbert 2fd1d3ca07 doc-build.yml: add top-level Makefile
Dunno why the top-level Makefile is doc/ specific but it is.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-11 19:27:06 -05:00
Anas Nashif 0a98147d04 ci: compliance: setup west modules
Setup a complete workspace with west. Some checks need access to
configured modules.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-06 07:53:46 -06:00
Fabio Utzig 831194abe3 ci: remove block copypasta in compliance check
Update copypasta to iterate over a list of files to check.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-12-18 07:50:08 -06:00
Anas Nashif 8b826e59e3 actions: fix issue tracker configuration
prio -> priority

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-15 22:19:37 -05:00
Anas Nashif 687b411525 actions: add issue tracker action
This action will generate a summary page with bug counts and issues
counts for common labels.

The report will be pubished on
https://testing.zephyrproject.org/issues/zephyrproject-rtos/zephyr/index.html

Example:

https://testing.zephyrproject.org/issues/zephyrproject-rtos/docker-image/index.html

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-15 22:03:32 -05:00
Anas Nashif 6be5e02923 actions: use descriptive job names
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>
2020-12-15 14:47:26 -05:00
Anas Nashif 17b09c2761 ci: rename sanitycheck -> twister
Replace leftover sanitycheck mentions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 14:13:16 -05:00
Øyvind Rønningstad c1b000bfb3 west_cmds.yml: Add itself to path filter
So build is run when west_cmds.yml is changed.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-11 20:24:33 -05:00
Øyvind Rønningstad 819b3639a9 sanitycheck_tests.yml: Add itself to path filter
So build is run when sanitycheck_tests.yml is changed.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-11 20:24:33 -05:00
Øyvind Rønningstad 9d2e64191c devicetree_checks.yml: Add itself to path filter
So build is run when devicetree_checks.yml is changed.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-11 20:24:33 -05:00
Anas Nashif a05d056943 ci: rename sanitycheck -> twister
Change all CI scripts to use the new script name: twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 14:13:02 -05:00
Øyvind Rønningstad 2fc50c6e9d doc-build.yml: Add itself to path filter
So doc build is run when doc-build.yml is changed.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-10 15:38:46 -05:00
Øyvind Rønningstad 5362a88338 doc-build.yml: Add west.yml to path filter
Since modules can affect the doc build.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-10 15:38:46 -05:00
Anas Nashif 6658b1938a actions: rename jobs
Do not use default 'triage' job names.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-09 08:20:38 -05:00
Carles Cufi cd97cffa79 actions: manifest: Update to latest action revision
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>
2020-11-27 20:12:46 +01:00
Emil Gydesen e39ae14f9b actions: Add labels for Bluetooth Controller/Host
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>
2020-11-27 09:58:34 -05:00
Carles Cufi f97b07bc3f actions: Enable new manifest workflow
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>
2020-11-26 12:07:23 -05:00
Max Bachmann 1d4c36486c CI: only release to AWS in the Zephyr repository
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>
2020-11-25 08:53:49 -06:00
Eugeniy Paltsev 0699f38f16 ARC: west: mdb runner: record MDB's CLD process pid to file
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>
2020-11-11 08:18:38 -05:00
Fabio Utzig 577d588b3a workflows: enable documentation build for Kconfig*
Trigger documentation builds when Kconfig files are changed.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-11-07 08:29:57 -06:00
Kumar Gala fabf40398f ci: github: Update for deprecation of add-path
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>
2020-11-04 14:45:08 -06:00
Fabio Utzig 0df18a9163 doc: enable documentation build for known-issues
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>
2020-11-03 15:27:37 +01:00
Kumar Gala f80f31eb0d ci: github: reduce when we do doc builds
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>
2020-10-21 17:40:52 +02:00
Carlo Caione d16eb84dbe github: labeler: Add 'area: ARM_64' label
As answered in [0] add a new label for the ARM64 code.

[0] https://github.com/zephyrproject-rtos/zephyr/discussions/28353

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-10-06 09:50:12 -05:00
Anas Nashif dac6937cda actions: install needed modules for docs
add scripts/requirements-base.txt to install needed modules for docs to
build.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-10-05 13:04:22 -04:00
Martí Bolívar a6856811a3 scripts: dts: pass tests on windows
Doing this just requires a bit of os.fspath()-ery.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-02 11:51:15 +02:00
Martí Bolívar a8612f75c5 scripts: dts: convert test suites to pytest
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>
2020-10-02 11:51:15 +02:00
Øyvind Rønningstad d6c30eead0 nrfjprog.py: Fail if hex file has UICR data and no --erase
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>
2020-09-28 14:09:14 -05:00
Anas Nashif c25f486322 actions: increase stale operations
Increase to 400 to have it complete the job in one run.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-21 16:05:15 -04:00
Anas Nashif a06884a4e6 actions: stale: increase operations per run
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>
2020-09-18 19:05:29 -04:00
Carles Cufi c573bef48f github: labeler: Remove line using negation (!)
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>
2020-09-14 18:19:39 +02:00
Carles Cufi 1019fb3fc6 Revert "github: labeler: Fix dts/ folder matching"
This reverts commit d20b6f90ea.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-14 18:19:39 +02:00
Carles Cufi d20b6f90ea github: labeler: Fix dts/ folder matching
Use the syntax described in:
https://github.com/actions/labeler#common-examples

in order to rewrite the matching expression for the dts/ folder.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-14 09:33:06 -04:00
Anas Nashif bc8832f6c8 actions: add backporting bot
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>
2020-09-12 07:28:16 -04:00
Carles Cufi bbcda199bf github: actions: Use on-PR labeler
Now that the standard GitHub action supports forks, switch to the on-PR
action instead of running a cronjob.

Reference:

https://github.com/actions/labeler/issues/12#issuecomment-670967607

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-12 07:27:41 -04:00
Martí Bolívar bd827056f6 scripts: runners: add type checking for west_commands
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>
2020-09-03 16:49:09 -05:00
Fabio Utzig 551f1789a5 doc: update versions of build tools
Update documentation build tooling:

- Sphinx>=3.2.0
- Breathe>=4.20.0
- docutil>=0.16.0

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Anas Nashif 1787663b15 actions: daily_tests: fetch all tags
Fetch all tags or otherwise we will not be able to run 'git describe'
and post a new version.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-20 08:57:44 -04:00
Anas Nashif b8c7de6d9a actions: update daily version for testing
Update versions.json with the daily commit that device testing will be
performed on.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-09 11:29:56 +02:00
Aastha Grover 177f2dac8b github workflow : Add github worklow for Sanitycheck testsuite
Add github worklow for sanitycheck tests to run sanitycheck
testsuite on any changes in sanitycheck, sanitylib or
scripts/tests/sanitycheck directory.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2020-07-08 20:27:03 -04:00
Anas Nashif c53581dc1a templates: add template for hardware support
Add template for hardware support to properly label those requests and
distinguish them from other feature requests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-08 15:08:26 -04:00
Anas Nashif 7eeb572e8c templates: rename rfc template file
Remove the too many hyphens.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-08 15:08:26 -04:00
Christian Taedcke 668e359d85 actions: add labeler rule for "platform: SiLabs"
Update labeler action script to apply label for efm32/efr32 mcus.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-07-08 10:48:28 -05:00
Maureen Helm 4e39938942 actions: Add label for nxp boards, drivers, socs
Extends the github labeling action to automatically add the nxp label to
nxp-related boards, drivers, and socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-07-07 13:01:37 -04:00
Erwan Gouriou 41279af8a4 actions: get labeler adding "area: Shields" labels
Update labeler action script to treat Shields label.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-07 07:53:35 -04:00
Erwan Gouriou dce698c496 actions: get labeler adding "platform: STM32" labels
Update labeler action script to treat stm32 label.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-07 07:53:35 -04:00
Anas Nashif 743d2c4d3e actions: disable conflict action for now
Too much traffic is causing this workflow to generate noise and
conflicting labeling. Disabling for now while we investigate.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-02 10:59:34 -04:00
Anas Nashif 8516d19ffd actions: use one label for stale PRs and issues
Lets just use one single label for stale items.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-02 10:59:34 -04:00