Commit Graph

639 Commits

Author SHA1 Message Date
Anas Nashif
d3253a1adf ci: twister: fix steps for analyzing failures
Checkout code early, so files are downloaded and read from one single
place.

Check for job results, only run script on failures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-08 19:44:53 -05:00
Anas Nashif
ecaa30329e ci: drop clang workflow, use main twister flow instead
Twister supports building with multiple toolchains in the same workflow
already, so there is no need for doing this in own workflow.

This will allow us to have a few targeted tests that are built with
multiple toolchains and frees up resources spent on duplicated builds in
a second workflow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-08 08:13:57 +01:00
Grzegorz Chwierut
7eef57f591 ci: twister: add twister report analysis
Added steps to analyze Twister reports and upload the results
if Twister build fails

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-02-07 17:47:43 +01:00
Vixay Phimmasane
8119951283 ci: fix typo in coding_guidelines.yml
Typo fix: Guidelines

Signed-off-by: Vixay Phimmasane <visuphi@gmail.com>
2025-02-05 01:16:24 +01:00
Fabio Baltieri
72c02b3ba5 actions: manifest: use a manifest specitic dnm label
Reconfigure the manifest action to use a manifest specific DNM label, so
that the "DNM" one can be used by humans.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-02-04 15:05:20 +00:00
Fabio Baltieri
563f1f9e07 ci: do_not_merge: add the manifest specific dnm label to the list
Add "DNM (manifest)" to the "do not merge" labels. This is meant to be a
DNM controlled by the manifest action specific, so that the normal one
can be used by humans and the two are not going to fight with each
other.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-02-03 19:52:16 +01:00
Benjamin Cabé
06fbd18344 ci: github: bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-31 16:09:18 +01:00
Benjamin Cabé
298b6be66d ci: github: bump dawidd6/action-download-artifact from 6 to 8
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 6 to 8.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v6...v8)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-31 16:09:18 +01:00
Benjamin Cabé
54a7214895 ci: github: bump fsfe/reuse-action from 1 to 5
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 1 to 5.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v1...v5)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-31 16:09:18 +01:00
Benjamin Cabé
576b27a3f7 ci: twister: rename weekly twister job
Properly name the twister weekly job to reflect it's running... weekly,
not daily.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-17 23:08:26 +01:00
Grzegorz Swiderski
7ce6ac225e scripts: ci: check_compliance: Add sysbuild Kconfig checks
Introduce sysbuild-specific variants of existing Kconfig checks:

  * SysbuildKconfig
  * SysbuildKconfigBasic
  * SysbuildKconfigBasicNoModules

This involves a few additions to the base `KconfigCheck` class:

  * Supporting a variable symbol prefix, to handle `SB_CONFIG_`.
  * Generating extra files, including `Kconfig.sysbuild.modules`.
    Although these are never sourced outside of sysbuild Kconfig,
    they're still generated for every regular Zephyr build, so it's
    natural to let all Kconfig checks follow this behavior.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-01-17 16:35:53 +01:00
Fabio Baltieri
8cf0148380 github: hello_world_multiplatform: set --runtime-artifact-cleanup
Set --runtime-artifact-cleanup on the twister run to reduce the disk
usage of the workflow.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-01-15 23:05:50 +01:00
Pieter De Gendt
33f257b12b ci: Add junitparser to the west_cmds workflow
Add the junitparser package to installed python packages for the west
commands workflow.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-10 04:12:42 +01:00
Anas Nashif
6fdd9461e8 ci: twister: define llvm toolchain path
Twister can now build using llvm, so define the toolchain path.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-08 17:00:59 +01:00
Alberto Escolar Piedras
4137c11ee3 ci: bsim tests: Also trigger on module/hal_nordic changes
We should also trigger this workflow on changes to the
module integration files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-12-23 01:02:02 +01:00
Carles Cufi
6e92a3f223 actions: manifest: Update to the latest version
See these PRs for additional information on what changed between v1.5.0
and v1.7.0:

https://github.com/zephyrproject-rtos/action-manifest/pull/15
https://github.com/zephyrproject-rtos/action-manifest/pull/16

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-12-20 20:18:29 +01:00
Fabio Baltieri
93cb20befd ci: general pip cleanup
Cleanup all pip commands in the various workflow
- drop the install/upgrade for setuptool pip and wheel, seems like this
  was introduced few years back to work around some old bug and it's not
  needed anymore
- use pip instead of pip3, that's probably been equivalent for quite a
  long time in the CI image

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-20 18:31:48 +01:00
Fabio Baltieri
fa8ebd3e45 ci: do_not_merge: pass instead of skip on mergeable PRs
Change the workflow to pass instead of skip if the PR is mergeable,
just trying to see if it helps with PRs not appearing as mergeable
because they do not match status:success when they should.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-20 16:23:35 +01:00
Fabio Baltieri
dd1a5f5a86 github: hello_world_multiplatform: run on any script changes
Open up the hello_world_multiplatform filter to run on any PR changing
anything in scripts. This should catch twister regressions as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-16 18:24:43 +01:00
Mert Ekren
c96c143a9a ci: workflows: remove rebase-merge folder before rebase
With gitv2.26, git rebase uses "git merge" mechanism instead of "git
apply". This creates a rebase-merge folder in .git, in case of rebase
conflict. This caused problems in self hosted runners due to old
rebase-merge folder. This commit deletes this folder before git rebase
action.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-12-16 15:55:59 +01:00
Alberto Escolar Piedras
46e87afc25 ci: bsim tests: Fix paths for triggers
These paths were not updated when we transitioned to hwmv2
which led to CI jobs not being triggered in some cases.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-12-12 16:20:02 +01:00
Jamie McCrae
3a6c4f5b80 Revert "ci: twister: add workaround until module test data is fixed [REVERTME]"
This reverts commit b8957692fc.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-05 19:58:30 -05:00
Anas Nashif
b8957692fc ci: twister: add workaround until module test data is fixed [REVERTME]
Workaround for CI to not fail on building mcuboot tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-04 22:25:54 -05:00
Pieter De Gendt
3bf519de38 ci: compliance: Rebase on the target branch before running compliance
Prior to running the compliance checks, we rebase the PR onto the target
branch to check the compliance state as if we were merged.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-27 06:57:52 -05:00
Pieter De Gendt
5d9a0cba9b ci: compliance: Install python packages from requirements
Instead of maintaining two lists, use the requirements file for
installing compliance dependencies.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-27 08:16:58 +01:00
Pieter De Gendt
f475f3c8cc ci: compliance: Exclude ClangFormat
Stop running ClangFormat in CI as it confuses (first time) contributors
more than it helps.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-26 14:44:29 +00:00
Anas Nashif
ba5330e2ac ci: twister: for correctness, rename DAILY -> WEEKLY
We run on a weekly basis, not daily.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-26 08:45:16 +01:00
Anas Nashif
088670d605 ci: twister: report filter suites in weekly run
For analysis purposes, report filtered in weekly run.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-26 08:45:16 +01:00
Anas Nashif
5fc66f67b9 ci: twister: capture branch when publishing results
This way we can filter by branches in the dashboard.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 13:01:24 -06:00
Anas Nashif
1c6066baea ci: twister: prep: add a more vebose name
Expand onn the workflow name

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 13:01:24 -06:00
Anas Nashif
aba2274fae ci: twister: publish only main branch jobs
This workflow is wrongly being triggered by pushed to branches.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 13:01:24 -06:00
Anas Nashif
1f17c761e5 ci: test_plan: call with --no-detailed-test-id
add --no-detailed-test-id to call of test_plan. Was missed in previous
commit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 17:40:25 +01:00
Anas Nashif
c14b022bea ci: twister: add --no-detailed-test-id
Switch to short test identifier in reporting.
Part of a series of changes to improve reporting and remove duplication
and clutter when running twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 08:27:16 -05:00
Anas Nashif
c1b8cd7db1 ci: twister_prep: do not double check for event
We already do the check for the job.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 15:53:58 -05:00
Anas Nashif
5b51632103 ci: twister: fix setting of output for workflow_call
Fix setting of output variables of workflow_call.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 15:53:58 -05:00
Anas Nashif
0c88010d0d Reapply "ci: twister: use workflow_call for prep job"
This reverts commit fd4c7bbbc2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 15:53:58 -05:00
Anas Nashif
dc14a212eb ci: twister: check event using correct context
Check for event using correct github context.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 15:53:58 -05:00
Anas Nashif
fd4c7bbbc2 Revert "ci: twister: use workflow_call for prep job"
This reverts commit ac08acafdd.

Pull requests not working as expected.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 19:49:21 -05:00
Anas Nashif
2f0fcdf81c ci: twister: do not fail if there are no artifacts
Do not fail if we can't download any artifacts, i.e. when job is
cancelled.

Only publish on push/schedule

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 19:49:21 -05:00
Pieter De Gendt
1be5c157d9 scripts: ci: check_compliance: Add python lint/format check
Add a compliance test using ruff, for both linting and formatting of
newly added python files.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-19 18:36:54 -05:00
Anas Nashif
ac08acafdd ci: twister: use workflow_call for prep job
Use workflow_call to allow for different type of nodes depending on
event.

On push, we do not need to use zephyr runners, GH runners are enough and
are much faster to deploy and start.

This resolves an issue where push jobs will have to be queued for a
longer time waiting for the prep step, once the prep step is done, we
will have to wait one more time in the queue for requested nodes.

This should speed up execution of push events in CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 17:48:11 -05:00
Anas Nashif
0a8b16693f ci: twister: split publishing results out of main workflow
Move publishing data to ES to a workflow_run step. This way we can
change the main workflow to use pull_request instead of
pull_request_target.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 17:48:11 -05:00
Anas Nashif
cfd5469dc1 ci: do not pull babblesim in twister test workflow
No need to pull babblesim and nrf_hw_models when doing twister testing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 09:57:13 -05:00
Carles Cufi
a3cc532221 actions: manifest: check additional metadata in projects
See https://github.com/zephyrproject-rtos/action-manifest/pull/14.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-16 13:28:58 -05:00
Fabio Baltieri
f7ff83079f github: west_cmds: add missing anytree package
Add missing anytree package, runners started to fail on it:

../pylib/twister/twisterlib/runner.py:60: in <module>
    from anytree import Node, RenderTree
E   ModuleNotFoundError: No module named 'anytree'

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-14 09:51:06 -05:00
Anas Nashif
9f5ef47184 ci: twister: also report filtered instances
For statistical purposes and to improve over all coverage, report
filtered suites so we can see trends in elasticsearch and act on them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-13 20:04:04 -05:00
Benjamin Cabé
dc2c13bebd doc: ci: Build documentation on board documentation changes
Adds glob expression triggering CI for *all* changes in boards'
documentation, not just those matching the "*.rst" pattern since there
can also be images being changed without any other change on RST files.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-08 11:40:58 -06:00
Stephanos Ioannidis
5c00d99f4b ci: Add '-specs' to ccache ignore option list
`-specs=` is an alternate form of `--specs=`, which is now used by the
Zephyr build system.

This commit adds `-specs=*` to the ccache ignore option list because, as
with `--specs=*`, ccache is unable to resolve the toolchain specs file path
and refuses to cache when this option is specified.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-11-06 11:26:32 +09:00
Stephanos Ioannidis
e1389fa2cf ci: doc-publish-pr: Improve workflow security
Improve workflow security.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-29 21:48:50 +09:00
Carles Cufi
d73fda80a6 ci: Switch to CI image v0.27.4
This commit updates the CI workflows to use the CI image v0.27.4, which
includes nrf-regtool v7.0.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-27 16:20:25 +01:00