Commit graph

175 commits

Author SHA1 Message Date
Anas Nashif 798a66fdaf actions: twister: load modules from cache
We have a local cache, so tell west to clone modules from cache if
available.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-28 20:35:40 -05:00
Anas Nashif f856f69202 actions: twister: apply a new strategy from smaller test plans
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>
2021-11-28 20:35:40 -05:00
Stephanos Ioannidis 3debfe3365 ci: Update to Zephyr SDK 0.13.2
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>
2021-11-25 06:58:45 -05:00
Anas Nashif 632628ec63 actions: twister: remove cleanup job
We now cleanup at the beginning.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-24 23:12:10 -05:00
Anas Nashif 3fcecc3b11 actions: check of testplan exists
Check if test plan exist before trying to read it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-24 23:02:42 -05:00
Anas Nashif 0b2df8f41c actions: twister/clang: cleanup test plan generation
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>
2021-11-24 22:54:25 -05:00
Gerard Marull-Paretas f6dd3bc982 ci: doc-build: set timeout to 30 minutes
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>
2021-11-24 12:36:58 -05:00
Anas Nashif f2d2a48b96 actions: twister: add a cancel job very early on
Cancel using GH runner for faster execution.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-23 06:42:23 -05:00
Anas Nashif 6ab1a7cb22 actions: clang: add branch name to ccache key
Add branch name to the ccache key to avoid cache contamination from old
branches.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-23 06:42:23 -05:00
Anas Nashif 5c24fcb4ae actions: run twister using github action
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>
2021-11-23 06:42:23 -05:00
Martí Bolívar f0a2a17bdc .github: exempt the 'Process' label from stale issues
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>
2021-11-19 15:51:56 -06:00
Anas Nashif a30e71a7de actions: clang: set reporting before calling twister
Otherwise reporting is skipped and failures are not recorded.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-16 16:23:43 -05:00
Anas Nashif 5595e2a739 actions: clang: use ccache
Use ccache to speed up builds.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-16 16:23:43 -05:00
Anas Nashif 977db5b049 actions: retry west update on various workflows
Retry west when update fails and use update.narrow configuration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-16 16:23:43 -05:00
Anas Nashif 43622e0864 actions: clang: fix typo
Add missing ")".

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-16 13:02:57 +01:00
Anas Nashif 9852790811 actions: clang: do not rebase, use commit range
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>
2021-11-16 06:48:20 -05:00
Anas Nashif add37df1bc actions: run code coverage only on main tree
Run code coverage reporting on main zephyr repo only.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-16 06:48:20 -05:00
Anas Nashif aace2da700 actions: follow namespace for job names
To avoid conflicts in reporting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-15 15:07:07 -06:00
Anas Nashif 5da807d57d actions: conflict: update version
Use released version instead of master.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-15 15:07:07 -06:00
Anas Nashif e50cbdb9f8 actions: compliance: minor improvements
Namespace job names and retry west update if something goes wrong the
first time.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-15 15:07:07 -06:00
Anas Nashif e49240941f actions: bluetooth: rename action and make it obvious
Rename to make action file name obvious referring to bluetooth, rather
than the tool used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-15 15:07:07 -06:00
Anas Nashif 75b7a35aec actions: bluetooth: fix job names and description
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>
2021-11-15 15:07:07 -06:00
Anas Nashif c3a1b4e8f3 action: codecov: do not run on weekends
No need to run on weekends, nothing much happens, so lets save some
resources.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-13 17:29:54 -05:00
Anas Nashif 5ce51a91da actions: fix typo in clang action
Fix a minor typo in action and always set variable controlling reports.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-13 17:29:54 -05:00
Anas Nashif 5832a8e19f action: configure git user
Configure git for rebase by setting user name, email.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-13 15:19:38 -05:00
Anas Nashif 8a4f0ae889 actions: optimize clang actions
- 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>
2021-11-13 09:30:25 -05:00
Anas Nashif 81e6ba8ba0 ci: add code coverage action
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>
2021-11-12 08:18:24 -05:00
Gerard Marull-Paretas 3c5e937ae2 ci: doc-publish: specify artifacts run_id
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>
2021-11-09 14:50:27 -05:00
Gerard Marull-Paretas 4ae9fb6ce5 ci: doc-publish: fix run condition syntax
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>
2021-11-05 08:23:06 -04:00
Martí Bolívar 612409d39d doc: west 0.12 docs
Update the documentation for this release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-04 19:30:42 -04:00
Anas Nashif ab83b6e850 actions: only publish docs from zephyr repo
Do not run doc publication job on other reports, only on the main zephyr
repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-04 10:20:29 +01:00
Gerard Marull-Paretas 7fe6b6f0bf ci: docbuild: update to latest Doxygen
Use Doxygen 1.9.2, the latest version.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 09:57:01 +01:00
Gerard Marull-Paretas b4f968cf9d doc: add a toctree with reference material
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>
2021-11-02 13:24:40 +01:00
Gerard Marull-Paretas bed8f352e4 ci: doc: upgrade to Doxygen 1.9.1
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>
2021-10-07 11:54:23 -04:00
Henrik Brix Andersen d198da7bb4 actions: exclude Python 3.6 tests on macos-latest
Python 3.6 support is no longer available on macos-latest. Exclude it.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-05 19:37:02 -04:00
Kumar Gala b312470bbb ci: Bump to use SDK 0.13.1
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>
2021-09-21 13:03:02 -04:00
Anas Nashif 0f9533e3d5 actions: run get_maintainer.py to validate paths
Run script which would error on any missing paths or invalid syntax.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-09-16 09:13:01 -04:00
Kumar Gala fa549139df ci: bump to docker image 0.18.3
Update to 0.18.3 to hopefully get fix for uefi-run needed by
qemu_x86_64.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-09-01 14:38:45 -04:00
Martí Bolívar 49e06ea1e4 .github: update action-manifest SHA
Use the latest.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-31 22:16:58 -04:00
Anas Nashif 5d988fde05 actions: run footprint action in zephyr repo only
Run footprint actions only on the zephyr repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-08-23 12:49:43 -04:00
Martí Bolívar f442266d09 doc: west release 0.11.1 follow-ups
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>
2021-08-20 06:23:49 -04:00
Torsten Rasmussen e78cb747bd ci: Bump to use CMake 3.20.5
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>
2021-08-16 11:03:32 -05:00
Martí Bolívar 212da336f0 doc-build.yml: build west 0.11.1a1
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>
2021-08-09 13:29:57 -04:00
Kumar Gala 8566bfec26 ci: github: bump SDK usage to 0.13.0
Now that SDK 0.13.0 is out, bump all github workflows to utilize it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-08-03 22:58:14 -04:00
Gerard Marull-Paretas 89f6c8a39d Revert "ci: doc: enable debug for aws s3 step"
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>
2021-07-30 16:55:00 -04:00
Gerard Marull-Paretas 40a5cf6016 ci: doc: enable debug for aws s3 step
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>
2021-07-30 13:59:13 -04:00
Gerard Marull-Paretas 5268f28e93 ci: doc: use copy for PDF
Use `cp` instead of `sync` for the PDF file.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-30 13:59:13 -04:00
Gerard Marull-Paretas adb59f1cc1 ci: doc: expose head branch to aws s3 upload step
`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>
2021-07-30 13:59:13 -04:00
Gerard Marull-Paretas f650710ba7 ci: doc: adjust build workflow name
Adjust the name to "Documentation Build".

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-30 08:21:02 -04:00
Gerard Marull-Paretas 1c41b5dae8 ci: doc: refactor doc publish
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>
2021-07-30 08:21:02 -04:00