Commit graph

239 commits

Author SHA1 Message Date
Gerard Marull-Paretas abda02ff0b doc: ci: publish: install graphviz
Graphviz was missing from the doc publish workflow.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-21 14:08:15 +03:00
Gerard Marull-Paretas 4127138475 doc: enable graphviz extension
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>
2021-07-20 19:54:52 -04:00
Gerard Marull-Paretas 5b939ea731 ci: doc: fix build target for doc publish
The build target was not updated on the doc publish workflow (htmldocs
-> html).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-16 21:15:43 -04:00
Gerard Marull-Paretas 0d0b0ce10e doc: make: adjust Makefile
Adjust Makefile according to latest CMake changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Marc Herbert e21ffe6baa requirements-doc: add PyYAML which removes dependency on -base
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>
2021-06-16 10:39:08 +02:00
Katsuhiro Suzuki 262c7deca6 actions: replace duplicated label for RISCV
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>
2021-06-10 07:53:49 -04:00
Gerard Marull-Paretas a140a249b3 doc: only enable -W option on CI
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>
2021-06-08 09:58:32 -05:00
Carles Cufi c5e50ef0e2 workflows: backport: Switch to using main
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>
2021-05-31 15:40:33 -04:00
Gerard Marull-Paretas 9c3450d87e ci: labeler: add Power Management
Add support for Power Management automatic labeling.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-27 13:28:29 -04:00
Gerard Marull-Paretas 8743ed9509 ci: doc: force quiet mode
Force quiet mode in CI, since interactive output adds no value there.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 19:38:11 +02:00
Kumar Gala c71e2dc007 actions: clang: invoke twister with -M to keep size down
Use the -M option to cleanup as we go to deal with any
disk space issues.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-19 10:43:43 -05:00
Anas Nashif 1b155dfbb9 actions: publish docs every 3 hours
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>
2021-05-18 19:47:32 -04:00
Anas Nashif 6fa1e8650f actions: fix path of API doc publishing
Fix path for publishing api docs when running latest docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-18 15:29:29 -05:00
Gerard Marull-Paretas 442f631af1 ci: doc: remove unused step
`check-warns` step is no longer used since the introduction of
`warnings_filter` extension.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-18 15:27:46 -05:00
Anas Nashif 5e9d434069 actions: publish docs twice daily
Publish docs twice daily, this way fixes early in the morning are
reflects online same day.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-17 11:49:36 -04:00
Carles Cufi 2189c08e4e ci: Add an errno.h check to CI
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>
2021-05-17 09:11:15 -04:00
Kumar Gala 5d97f8ce4c ci: Update to docker image v0.17.1
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>
2021-05-05 17:56:53 -05:00
Anas Nashif c8a2432955 ci: use new docker image based on ubuntu 20.04
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>
2021-05-05 11:04:36 -05:00
Martí Bolívar faf68fb213 doc: west: add 0.11.0 docs
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>
2021-05-04 15:29:36 -05:00
Anas Nashif a4643dc132 actions: guidelines: rebase tree
Rebase tree to get the right commit change.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-03 17:11:12 -04:00
Anas Nashif 0b67f90b2d ci: simplify action step
return after failure, do not check again in another if statement.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-03 08:08:25 -05:00
Anas Nashif 6eb5063ddc ci: add coding guideline workflow
Use coccinelle rules to detect coding guideline violations on submitted
code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-30 22:09:43 -04:00
Anas Nashif c0bfad6214 actions: bsim: fix typo
Fix typo in workflow allowing comments to be published to the PR.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-26 17:38:48 +02:00
David Brown 84b1659675
Update SECURITY.md
Update 1.14.x LTS verfsion.
2021-04-26 08:44:02 -06:00
Anas Nashif e366d7948a ci: remove bsim from buildkit execution
We now have a dedicated action for this.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-23 21:40:10 -04:00
Anas Nashif d93297b3d0 actions: clang: do not post comment to pr
disable comments for now to avoid any confusion.
also update action version to v1.12

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-22 21:15:07 -04:00
Anas Nashif d0d1bc4452 action: clang: reduce matrix size
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>
2021-04-22 21:15:07 -04:00
Anas Nashif 4d4b0a09b8 actions: do not run twister with integration
We already select the platforms we want to run on, so do not run with
--integration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-22 21:15:07 -04:00
Anas Nashif 9021f6fdd2 ci: add initial clang action
Action to verify clang builds on select platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-22 07:42:58 -04:00
Anas Nashif d881d7227f actions: limit issue tracker to main project
Run this action only on the main zephyr tree. Do not run in forks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-13 17:39:39 -04:00
Gerard Marull-Paretas d7754cf2c9 ci: upgrade core python dependencies
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>
2021-04-08 15:21:40 +02:00
Gerard Marull-Paretas 7a6efbd9ed ci: remove old paths in doc-build workflow
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>
2021-04-08 09:55:16 +02:00
Gerard Marull-Paretas 8cf054a1ab ci: trigger doc build if requirements change
If Python requirements for docs change build should also be triggered.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-07 12:12:07 -04:00
Carles Cufi d5c3be3948 actions: Do not set the bug label on failed backports
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>
2021-04-06 16:29:22 -04:00
Carlo Caione b3e1fa3ce7 labels: Rename ARM_64 to ARM64
Because Zephyrbot is already using ARM64.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-04-06 08:33:32 -04:00
Martí Bolívar 5332847644 dts: separate DT libraries from gen_defines.py
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>
2021-04-02 08:28:12 -05:00
Carlo Caione a43f3bade8 arm/arm64: Fix misc and trivials for ARM/ARM64 split
Fix the header guards, comments, github labeler, CODEOWNERS and
MAINTAINERS files.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-03-31 10:34:33 -05:00
Anas Nashif 301ee9792d ci: run issue count workflow every 10 minutes
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>
2021-03-31 07:44:39 -04:00
Martí Bolívar 8697935882 .github: doc-build: run on scripts/dts change
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>
2021-03-30 20:41:28 -04:00
Gerard Marull-Paretas 32b71cbcdc doc: move Makefile to doc folder
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>
2021-03-29 10:59:28 -04:00
Carles Cufi 799a87072a actions: Update manifest action to v1.1.0
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>
2021-03-26 17:43:20 -04:00
Carles Cufi f938cc427e doc: contribute: Rework the process for external code inclusion
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>
2021-03-26 14:48:48 +01:00
Carles Cufi 153a46620c actions: backport: Update to 1.1.1-1 and enable issue creation
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>
2021-03-26 10:51:10 +01:00
Carles Cufi 3f4109b982 actions: manifest: Pin to v1.0.0
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>
2021-03-25 09:14:52 -04:00
David Brown 911ba334a0 .github: Create Github security policy document
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>
2021-03-20 06:06:57 -04:00
Martí Bolívar 2ea77dd019 ci: doc-build: bump west version
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>
2021-03-17 12:50:33 -05:00
Martí Bolívar ffadff947c .github: doc-build: use west 0.10.0a1
Testing for the release itself.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-11 11:08:25 +01:00
Emil Gydesen eb2b5fe4c9 actions: Add Bluetooth Audio label to Bluetooth Audio directory changes
Automatically apply the "area: Bluetooth Audio" label to changes in the
subsys/bluetooth/audio directory.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-02-16 08:55:17 -05:00
Anas Nashif 09cb9ab259 actions: use a different user for this action
PRs created by github bot do not trigger new workflows, so we have to
use a different user.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-14 18:40:09 -05:00
Anas Nashif a2078890d4 actions: run backporting bot only on main
Backporting bot should only run on main branch, not release branches.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-14 18:40:09 -05:00
Anas Nashif 666949cda1 action: publish documentation when VERSION is changed
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>
2021-02-14 11:52:38 -05:00
Anas Nashif 769d91b922 actions: publish release docs to correct folder
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>
2021-02-12 11:07:43 -05:00
Anas Nashif e4ffad6725 labels: label release note changes
Set label 'Release Notes' when release files are changed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-08 11:49:49 -05:00
Anas Nashif 2e9e241f29 ci: add action to create release
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>
2021-02-03 09:55:18 -06:00
Carles Cufi 777c5c9941 actions: compliance: Rebase before running west update
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>
2021-02-03 09:45:50 -05:00
Maureen Helm 1778e117d7 actions: Fix typo in twister action name
Replaces "Twsiter" with "Twister" in the associated GitHub Action name.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-01-29 14:22:25 -05:00
Martí Bolívar de73db9dbc doc-build: build with west 0.9
This is required to get the relevant API docstrings.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Anas Nashif f9b76ca76e ci: compliance: fail on errors
Fail workflow in case of script crashes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-22 08:55:06 -05:00
Anas Nashif 52ec40cbdf actions: run manifest workflow only on manifest changes
Run the manifest workflow only when west.yml changes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-19 11:50:39 -06:00
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
Henrik Brix Andersen 2bd451e9eb actions: add labels for CAN and EEPROM driver areas
Add automatic labeling of the CAN and EEPROM driver areas.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-02 07:56:11 -04:00
Kumar Gala afda728f08 actions: Add some additional labels for devicetree
- Handle name change of labels from 'Device Tree' to Devicetree
- Split out things between "Devicetree" (as a catchall),
  "Devicetree Tooling" (for the scripts) and
  "Devicetree Binding" (for bindings)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-30 18:14:52 -05:00
Anas Nashif 9c65a17743 actions: mark pull requests with conflicts
This action will go over pull requests after something was pushed to the
tree and marks pull requests with conflicts.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 17:51:56 -04:00
Anas Nashif a6e7d95a26 actions: only mark bugs as stale
Bugs are being looked at on a weekly basis, we still did not go through
many of the enhancements and long term feature issues, so do not mark
those as stale yet, this will otherwise mark more than 50% of open GH
issues as stale...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 12:10:38 -04:00
Anas Nashif 183585c810 actions: action for processing stale PRs/Issues
Mark stale PRs/Issues and close them after a period of inactivity.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 10:59:18 -04:00
Anas Nashif 2f350dfe43 actions: add automatic labeler action
Add action to labler pull requests on a regular basis. This will replace
the current labler implemented in ci-tools and will operate on a
schedule rather than on pull request trigger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 10:27:57 -04:00
Joakim Andersson f7f164468b templates: Encourage attaching log files over screenshots
Rewrite console log section to encourage bug-reporters to obtain the
console output in text-format over screenshots, as well as hinting
about other debug information that can be attached.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-06-25 08:53:42 -04:00
Anas Nashif 288ae28c13 ci: add compliance checking via GH actions
Move check_compliance script to main tree and adapt/use with GH actions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-12 07:53:09 -04:00
Anas Nashif 2c8cb643bb templates: use correct label for Enhancement
enhancement -> Enhancement

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-21 13:21:09 -04:00
Henrik Brix Andersen 3c2984d4a9 scripts: west: add CANopen flash runner
Add west flash runner for program download via CANopen.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-08 10:53:42 +02:00
Anas Nashif 295572a5b1 ci: do not use latest breathe release for docs
breathe v4.15.0 was just released and fixes some compatibility issues
with latest sphinx, the combo works, however with many warnings that we
still need to either fix or whitelist. This is temporary until we are
able to use those new versions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-07 18:51:13 -04:00
Anas Nashif 6cfa11c013 doc: lock sphinx version to a compatible one
Version 3.0.0 release recently break doc build, lock version of sphinx
to something compatible while we upgrade dependencies...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-05 19:10:43 -04:00
Anas Nashif 82e0066601 ci: support license check with topic branch with v3
When determining added files, support branches other than master.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-20 18:22:58 -06:00
Kumar Gala 8469ae6c87 github: doc-publish: remove debug flag
Now that we found the permission issue that was causing the aws s3 sync
to fail we can remove the debug flag.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-16 12:08:48 -06:00
Kumar Gala c6fc36f7cc Revert "github: For now limit doc publish to master"
This branch filter doesn't work as expected with tag.  Need to test this
more on testing tree to find a combo or solution that works properly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-15 17:35:58 -06:00
Kumar Gala ac484f2f39 github: add more debug to see why aws sync is failing
For some reason the aws s3 sync fails, but not sure exactly why.  Adding
more debug to see if we can understand what's going on.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-15 16:43:18 -06:00
Kumar Gala 9e075e5e8c github: For now limit doc publish to master
Limit doc publish workflow to master branch.  Need to see if we can
seperate out 'latest' to be on master only and release branches to
publish to the proper location.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-15 16:43:18 -06:00
Kumar Gala bf3850c270 github: Add debug to try diagnose workflow failure
The doc publish workflow is failing in the AWS S3 push.  Add more
debug output in that section to see what's going on.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-14 22:32:48 +02:00
Kumar Gala 49bf8b1d54 github: Fix daily/release doc publish workflow
We now need pyelftools to build the docs.  See the following commit:

commit 83b346edef
Author: Alexey Brodkin <abrodkin@synopsys.com>
Date:   Fri Feb 7 11:37:25 2020 +0300

    runners: opeocd: Allow loading Elf-files

Match the update to doc-build.yml to `pip3 install pyelftools`.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-13 20:23:55 -06:00
Alexey Brodkin 83b346edef runners: opeocd: Allow loading Elf-files
In some cases especially for on-going development & debugging of real
application it might be useful to load and run not from flash but
from RAM in that case there's one catch: we cannot reset the board
after loading memory with our app.

That's because:
 a) RAM we use might be either cleared on reset or might enter
    unpredictable state with portion of previously loaded data
    being corrupted.
 b) Reset vector most probably still point to ROM/flash and so
    our current application won't be executed on reset.

So instead of "run reset" command of OpenOCD we'll use
"resume 0x12345678". Where 0x12345678 is our application's
entry-point (which BTW may very well not match beginning of
the .text section or link base).

Now to extract the entry-point we need our application's zephyr.elf
and since we already have a requirement for Elf we may use it for
loading because OpenOCD does it perfectly fine moreover automatically
detecting loaded image type (binary, hex, Elf etc).

And to use that nice feature just add "--use-elf" to west's
command-line for boards that use "openocd" runner. Like that:
----------->8--------------
west flash --use-elf
----------->8--------------

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-13 10:45:44 +02:00
Kumar Gala 3b60f09583 github: Add GH workflow to build daily docs and docs on release
Add a workflow that will build the docs daily or on release and
publish them to AWS S3.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-13 02:15:35 -06:00
Kumar Gala ae380c55c8 github: Update doc build action
Make a few cleanups to the doc build action:

1. Only do action for pull requests - action is meant to test PRs
2. Remove west update / cache of modules as we dont need them for docs

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-13 02:15:35 -06:00
Anas Nashif 3b625aaaa9 ci: add license check using github actions
Use Github for license checks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-09 11:55:56 -05:00
Kumar Gala b1de748948 github: Rename GitHub workflow action
GitHub checks need to be uniquely named, and 'Documentation' conflicts
with the ci-tool name.  Rename this while we are running both so the
names don't conflict.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-08 09:05:50 -06:00
Kumar Gala 63fddba8d1 ci: github: doc: Add a GH workflow to test build the docs
This github workflow will build the html docs on a pull request or push.
This is similar to the current ci-tools 'Documentation' check.  One
difference is this version produces a GH artifact of the html docs
instead of posting it to S3.  The artifact is a tarball that is than
zip'd (not gzip).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-07 18:10:15 -06:00
Kumar Gala 2fd7876aa7 ci: github: west: Add a GH workflow to run the west command tests
Replace running west command tests in run_ci.sh with a github workflow.
This provides some benefits in that we can run the west command tests on
multiple python versions and host OSes (linux, mac and windows).

Also have the benefit that the tests are only run on modifications to
files in scripts/west_commands/ or scripts/west-commands.yml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-06 08:34:43 -06:00
Kumar Gala 418f34d955 Revert "github: Add plumbing of using the github workflow labeler"
This reverts commit 18cbd0dc81.

Revert this as the labeler workflow can't work on fork's right now so
its useless to us at this point.  Remove this plumbing for now and we
will wait and see if GitHub comes up with a solution for this.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 19:46:32 +01:00
Kumar Gala 18cbd0dc81 github: Add plumbing of using the github workflow labeler
This just installs the workflow and an empty .github/labeler.yml that
we will fill in later.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 12:28:15 -05:00
Anas Nashif df3b7994d3 templates: Update issue templates
Updated templates with auto-labels.
Added enhancement/RFC templates.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-07 08:27:20 -05:00
Anas Nashif 765c39188b doc: Add issue templates
Add issue templates

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-10 15:06:04 -05:00