Skip to content

Dockerfile: Install sparse package for code analysis - #109

Merged
stephanosio merged 1 commit into
zephyrproject-rtos:masterfrom
aiChaoSONG:sparse
Jul 20, 2022
Merged

Dockerfile: Install sparse package for code analysis#109
stephanosio merged 1 commit into
zephyrproject-rtos:masterfrom
aiChaoSONG:sparse

Conversation

@aiChaoSONG

@aiChaoSONG aiChaoSONG commented Jun 30, 2022

Copy link
Copy Markdown
Contributor

The sparse tool can be used to do static code analysis,
which helps to find coding faults at compile-time.

Signed-off-by: Chao Song chao.song@linux.intel.com

The Sound Firmware Team will need this package for sparse test. I think zephyr should do sparse test now or sooner.

We have to clone the latest code and compile, the sparse package shipped with ubuntu 20.04 can not work for us.

@lyakh @keqiaozhang FYI

@stephanosio
stephanosio self-requested a review June 30, 2022 08:20
@aiChaoSONG

Copy link
Copy Markdown
Contributor Author

I see this error, Error: The log was not found. It may have been deleted based on retention settings. can someone tell me what happened, how can i fix this?

@cjgraydon

cjgraydon commented Jun 30, 2022

Copy link
Copy Markdown

Looks like the CI workflow for the PR failed due to some kind of runner/network issue: https://github.com/zephyrproject-rtos/docker-image/actions/runs/2588361237

i.e. Build
The hosted runner: GitHub Actions 15 lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

It looks like the run timed out and it never made it far enough to generate the log that subsequent workflow steps want. The step before where you see the log error message threw some kind of error.

You might try updating your PR or doing an empty commit to try to trigger another run: git commit --allow-empty -m "this is an empty commit" Pushing that should force CI to run again, in theory. Might just be something flukey that caused the initial run to time out.

Looks like stephanoslo might have attempted a couple of re-runs, though. So might not be so simple. Just something to try, for what it is worth.

@aiChaoSONG

Copy link
Copy Markdown
Contributor Author

@cjgraydon Thank you, but looks I am first-time contributor, need approval to run GH action.

@aiChaoSONG

Copy link
Copy Markdown
Contributor Author

failed at Installing uefi-run utility, not even touch my changes.

@stephanosio

Copy link
Copy Markdown
Member

It looks like the resources available on the default GitHub-provided CI runner is no longer sufficient to build the docker image. I will see if I can rework the CI to fix this.

@cjgraydon

Copy link
Copy Markdown

@cjgraydon Thank you, but looks I am first-time contributor, need approval to run GH action.

Side note: Any additional push to your PR should trigger a new CI run. So you could dodge having to have direct access to the GitHub actions. I'd think an empty commit to your PR would do the trick, but I might be off on that. I use this approach in our enterprise GH on occasion. Might be different in public GH, though? Anyway, just a little more detail on what I was talking about in case I wasn't especially clear. :)

@marc-hb marc-hb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A record of which particular sparse SHA1 was used must be kept somewhere. I don't know how that's normally done, maybe you can add a new ARG SPARSE_COMMIT variable at the top and check that out?

@aiChaoSONG

Copy link
Copy Markdown
Contributor Author

@stephanosio Is CI good now? please help to approve and test this patch, thank you.

@stephanosio

Copy link
Copy Markdown
Member

@stephanosio Is CI good now? please help to approve and test this patch, thank you.

sorry, I haven't had time to fix the Docker image CI yet (apparently the problem turned out to be not so simple to fix, will likely need an overhaul ...).

I will let you know when it is fixed and merge this PR thereafter.

@aiChaoSONG

Copy link
Copy Markdown
Contributor Author

@stephanosio Thank you, the test passed, will you push a new image to docker hub after this merged?

@stephanosio stephanosio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless you actually need a feature from the unstable/development branch, we should use a release tag.

Comment thread Dockerfile Outdated
Comment thread Dockerfile Outdated
The sparse tool can be used for static code analysis,
which helps to detect coding faults at compile-time.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
@stephanosio
stephanosio merged commit 633fe31 into zephyrproject-rtos:master Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants