Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cmake only for sonarcloud #13771

Closed

Conversation

balaji-srin
Copy link

No description provided.

Balaji Srinivasan added 30 commits January 24, 2024 22:16
Add workflow that rebases from ncs/main and creates a PR

Signed-off-by: Balaji Srinivasan <[email protected]>
Add sonarcloud workflow

Signed-off-by: Balaji Srinivasan <[email protected]>
The workflow now invokes sonarcloud with coverage option.
This will make sonarcloud UI show code coverage data.

Signed-off-by: Balaji Srinivasan <[email protected]>
Removed building of atv2 on all integration platforms because I am not
sure if invoking build wrapper twice, once for building atv2 for
integration platforms and once again for native_posix will work.

Run tests separately after building. Running the tests under build
wrapper fails mysterously for certain tests (lwm2m_* tests).

Signed-off-by: Balaji Srinivasan <[email protected]>
This avoids code owners (with access to my fork)  getting PR requests.

Signed-off-by: Balaji Srinivasan <[email protected]>
Run all native_posix tests in sdk-nrf repo.

Signed-off-by: Balaji Srinivasan <[email protected]>
Exclude modules from analysis.

Signed-off-by: Balaji Srinivasan <[email protected]>
Expand the scope of sonarcloud to include integration tests. This has to
be run on self-hosted setup because github actions does not have the
resources to handle large twister runs.

Signed-off-by: Balaji Srinivasan <[email protected]>
We dont want to analyse zephyr repo

Signed-off-by: Balaji Srinivasan <[email protected]>
And also the code coverage

Signed-off-by: Balaji Srinivasan <[email protected]>
This is to make it produce debug output

Signed-off-by: Balaji Srinivasan <[email protected]>
Ignore vsdx files

Signed-off-by: Balaji Srinivasan <[email protected]>
Clobber output when running unit tests

Signed-off-by: Balaji Srinivasan <[email protected]>
This is to make it print failures inline

Signed-off-by: Balaji Srinivasan <[email protected]>
Created a new workflow file that runs sonarcloud by only invoking
twister for native_posix tests. The sonarcloud analysis on main branch
will run twister with integration scope and will take longer time to
complete.

Signed-off-by: Balaji Srinivasan <[email protected]>
This is mainly to exclude any failing unit tests

Signed-off-by: Balaji Srinivasan <[email protected]>
Run native_posix tests on main so that sonarcloud
gets some info about main branch.

Signed-off-by: Balaji Srinivasan <[email protected]>
Renamed to reflect what it does

Signed-off-by: Balaji Srinivasan <[email protected]>
This was done in sonarcloud for PR. Doing this in
main sonarcloud now.

Signed-off-by: Balaji Srinivasan <[email protected]>
We have another workflow that runs sonarcloud on integration scope on
pushes to main

Signed-off-by: Balaji Srinivasan <[email protected]>
Exclude zephyr from code coverage collection

Signed-off-by: Balaji Srinivasan <[email protected]>
This is to debug any possible future failures

Signed-off-by: Balaji Srinivasan <[email protected]>
This was causing gcovr to fail with an assert. Its a known issue

Signed-off-by: Balaji Srinivasan <[email protected]>
They are now moved to sonar-project.properties file

Signed-off-by: Balaji Srinivasan <[email protected]>
Add chatgpt review workflow

Signed-off-by: Balaji Srinivasan <[email protected]>
Include python code in the sonarcloud analysis

Signed-off-by: Balaji Srinivasan <[email protected]>
This is to avoid conflicts due to changes in upstream

Signed-off-by: Balaji Srinivasan <[email protected]>
Create codeql.yml for security analysis of c and python code

Signed-off-by: Balaji Srinivasan <[email protected]>
It has been fixed in ncs/main

Signed-off-by: Balaji Srinivasan <[email protected]>
Balaji Srinivasan added 19 commits January 24, 2024 22:16
Make codeql run every day at 12am

Signed-off-by: Balaji Srinivasan <[email protected]>
The usage limit for the API expired for my acc. So removing this.

Signed-off-by: Balaji Srinivasan <[email protected]>
lwm2m_code test was fixed long time back. Removing from quarentine.
But the download_client test started failing on docker on github actions
(passes locally even in docker). My guess is that the failure is because
of ioctl call return 2 because docker was not run in privilaged mode by
github actions. Disabling now.

Signed-off-by: Balaji Srinivasan <[email protected]>
Changed pull_request to pull_request_target

Signed-off-by: Balaji Srinivasan <[email protected]>
This is done because I have not disabled the sonarcloud (all platforms)
workflow on main.

Signed-off-by: Balaji Srinivasan <[email protected]>
- Use PR's head sha when checking out code when triggered from PR.
- Provided the PR number, head ref, sha to sonarcloud so that it
consideres the run as a PR run. It would not treat pull_request_target
events as a PR and hence wont do PR decoration if not done this way
- Also when building/running unit tests on PRs, we should not use
quarentine_downstream.yaml file as it is not available on the PR's
branch.

Signed-off-by: Balaji Srinivasan <[email protected]>
It is now included in the docker image

Signed-off-by: Balaji Srinivasan <[email protected]>
Saves a lot of manual steps in the workflow

Signed-off-by: Balaji Srinivasan <[email protected]>
The nrf-docker image build broke after it started to inclde
the ncs toolchain manager. We had to run builds by calling
docker directly and without using the container keyword in github
actions. Hence I moved to official zephyr image

Signed-off-by: Balaji Srinivasan <[email protected]>
Add clang-tidy review workflow

Signed-off-by: Balaji Srinivasan <[email protected]>
The code changes in ncs/main need newest zcbor. Hence
upgrading.
See nrfconnect#12193

Signed-off-by: Balaji Srinivasan <[email protected]>
Bump version to see if java related error goes away.

Signed-off-by: Balaji Srinivasan <[email protected]>
They fail currently due to mismatch in zcbor version.

Signed-off-by: Balaji Srinivasan <[email protected]>
This is not needed because we no longer run native_posix
tests in sonar_cloud action. This is why we needed zcbor
in the first place.

Signed-off-by: Balaji Srinivasan <[email protected]>
Due to zephyrproject-rtos/zephyr#57484.
The board-root is not needed.

Signed-off-by: Balaji Srinivasan <[email protected]>
This is done by stopping the twister at a stage where compilation
database is generated.

Signed-off-by: Balaji Srinivasan <[email protected]>
@balaji-srin balaji-srin requested review from tejlmand and a team as code owners January 26, 2024 15:06
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant