Commit Graph

671 Commits

Author SHA1 Message Date
Anas Nashif
be18415fc3 ci: codeql: enable on PRs
Enable CodeQL on PRs to catch issues before they are merged.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-24 12:17:19 +01:00
Anas Nashif
961593d152 Revert "ci: twister: move weekly to sunday [REVERT ME]"
This reverts commit c99325a8a5.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-23 10:24:07 -04:00
Anas Nashif
c99325a8a5 ci: twister: move weekly to sunday [REVERT ME]
Previous job failed, let's give it another try.

Should be reverted once workflow has started.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-23 10:15:49 -04:00
Anas Nashif
3b6fe8677b ci: Add codeql workflow for python, actions, js
Integrate codeql code scanning from github to do basic static code
analysis on python, actions, js.

c/cpp to be added later.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-21 14:39:50 -04:00
Benjamin Cabé
911d803291 doc: ci: github: Require hashes during pip install
require hashes in doc ci workflow

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
d794fe42f9 ci: doc: github: drop unused env variable
We get West from the action-zephyr-setup action

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
df2bdb9a6f ci: doc: github: Build PDF from vanilla ubuntu
Moved away from a texlive docker container to a vanilla ubuntu runner
so that we can better track the actual dependencies a user needs to
build the PDF rather than relying on the gigabytes of random stuff
that the texlive docker container pulls in.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
d161e29a12 ci: doc: update documentation dependencies to include coverxygen
Removed coverxygen installation from the CI workflow and added it to the
requirements.txt/.in files and make it easier for anyone to potentially
use it locally.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
1185942575 ci: doc: github: check Doxygen MD5 checksum
Add a check that we're installing a legit Doxygen binary

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
c9a149349a ci: Update GitHub Actions workflows to follow principle of least privilege
Default to `permissions: read-all` in all workflows and then add
additional permissions as needed at the job level

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-19 18:53:52 -04:00
Benjamin Cabé
f254b5775a ci: doc: do not prevent running doc CI in forks
Building docs just works on vanilla GH runner so it can be convenient
to not prevent the workflow to run on forks.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-19 18:50:30 -04:00
Benjamin Cabé
e82ab80574 doc: do not trigger doc-build on PR touching tests/
There is no need to trigger a doc build when tests are being
changed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-19 18:50:30 -04:00
Benjamin Cabé
8ce24da0cf ci: doc: bump and pin tj-actions/changed-files action
Ensure we run the latest version of this action (and align with what is
already used for bsim-tests)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-19 18:50:30 -04:00
Benjamin Cabé
2eec91d527 ci: doc: pin actions/checkout GH action
Following the revert in the previous commit, pin the actions/checkout
action to align with what is now the accepted practice in the project.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-19 18:50:30 -04:00
Benjamin Cabé
1baaaafabd Revert "ci: doc-build: do not check for changed files"
This reverts commit b80526658c
and restores the original use of looking for changed files
before triggering a documentation build.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-19 18:50:30 -04:00
Anas Nashif
d13ccfd74c ci: clang: add workflow on push
Change workflow to work on push events.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-19 08:55:43 -04:00
Anas Nashif
ed222a9f1f Revert "ci: drop clang workflow, use main twister flow instead"
This reverts commit ecaa30329e.

Restore as a push workflow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-19 08:55:43 -04:00
Benjamin Cabé
d5b2fcffa5 ci: scorecard: bump actions to latest as per dependabot
Apply dependabot suggested updates to the `scorecard` workflow to pull
latest versions of the actions.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-19 08:53:00 -04:00
Benjamin Cabé
078ac84db0 ci: pin "actions/" GitHub Actions to SHAs
This commit follows up on e808ccfxy and completes the pinning of *all*
GitHub Actions to SHAs, including GitHub-owned `actions/*` actions.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-19 08:53:00 -04:00
Anas Nashif
ddcb8611ed ci: twister: use ci specific test configuration
Use a CI specific test configuration that forces samples to be built in
integration mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-19 08:51:50 -04:00
Jan Gałda
4b622a256e ci: Use Ubuntu 24 in GH actions
Ubuntu 20.04 will be deprecated soon

Signed-off-by: Jan Gałda <jan.galda@nordicsemi.no>
2025-03-17 21:02:38 -04:00
Benjamin Cabé
e808ccf013 ci: pin GitHub Actions to SHAs
This commit updates all GitHub Actions workflows to use specific
SHAs for the actions when they're not GitHub owned (`actions/*`)
instead of using tag-based versioning since tags are mutable.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-17 20:58:39 -04:00
Anas Nashif
b80526658c ci: doc-build: do not check for changed files
Remove check for changed files for now until we have a better way to do
that without the 3rd party action.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-15 11:39:28 -04:00
Benjamin Cabé
5a2e6124a4 doc: ci: reduce documentation build job count
Reduce the number of parallel jobs for documentation build since we use
GH-hosted runner with only 4 vCPUs and 16GiB of RAM.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-21 18:03:37 +00:00
Benjamin Cabé
4260bd0df3 doc: ci: use ubuntu-24.04 runner
Make CI run on latest Ubuntu LTS so that default Python version
is effectively 3.12.
This allows to build against latest Sphinx 8.2 release, as it
dropped support for Python 3.10.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-21 15:13:20 +00:00
Benjamin Cabé
b6922c83a8 ci: doc: add action-zephyr-setup
Setup a fully working Zephyr workspace so that documentation steps that
require e.g. building Zephyr apps have the ability to do so.
The "turbo" builds running on pull requests get a minimal setup, with
no toolchain being installed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-20 15:08:50 +00:00
Benjamin Cabé
43013e4899 ci: twister: upload junit.xml artifact
The "raw" junit.xml is a useful artifact to make available to developers
as it can be ingested by various tools to help dig into failures, look
at evolution of test results over time, etc.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-17 21:03:01 +01:00
Anas Nashif
ff4dc62f0e ci: twister: start weekly run earlier
Start weekly run a bit earlier to make use of idle night time of the
weekend.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-15 07:24:00 +01:00
Benjamin Cabé
c544e4d08b Revert "ci: cleanup concurrency rules"
This reverts commit 2dcb61858b.
Completely breaks CI due to concurrency key being wrong and
the same for every PR...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-14 15:26:20 -05:00
Benjamin Cabé
2dcb61858b ci: cleanup concurrency rules
This addresses issues were CI jobs would wrongly get cancelled due to
sharing the concurrency group as other workflows.

For example:
- Twister runs being cancelled if both contributor submitting PRs named
  their branch the same (often, `main` :))
- The scheduled doc-build systematically kills any ongoing
  "on_pull_request_target" workflow runs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-14 19:40:31 +00:00
Anas Nashif
c65d394fcc ci: twister: increase weekly matrix size
Increase matrix size to deal with builds aborting under heavy load or
when running out of resources.

Also increase number of tests per node to deal with growth.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-14 20:14:47 +01:00
Benjamin Cabé
154d5adb18 doc: ci: exclude unneeded files from documentation tarball
There is no point in including source .rst files in html-output.tar.xz
as it unnecessarily slows down the creation of html-output.tar.xz as well
as transfer to/decompression on S3. Same for Doxygen XML output which is
only useful at build time.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-11 00:44:06 +01:00
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