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

Linty configuration #1027

Closed
wants to merge 3 commits into from
Closed

Conversation

racodond
Copy link

Very quick and dirty configuration to start with.
Obviously, you can change the location of those files, automate the generation of read.ys, etc.

@stnolting
Copy link
Owner

Wow, thanks for the quick setup!

But this isn't the typical GitHub *.yml setup, right? I am still looking through the documentation... Can you point me to something like a file/API description?

@stnolting stnolting self-assigned this Sep 20, 2024
@stnolting stnolting added the CI Continuous integration-related label Sep 20, 2024
@racodond
Copy link
Author

racodond commented Sep 20, 2024

Wow, thanks for the quick setup!

But this isn't the typical GitHub *.yml setup, right? I am still looking through the documentation... Can you point me to something like a file/API description?

I just added the GitHub workflow: https://github.com/stnolting/neorv32/pull/1027/files#diff-14a0f0d330d013b60b745ff53daf4e6cfa5e5c60776408c4e09045763a38799b
For the LINTY_TOKEN and the TABBY_CAD_LICENSE, I'll send them to you by email as soon as I create your account.

Our GitHub project sample: https://github.com/Linty-Services/bugfinder-sample/blob/main/.github/workflows/linty.yml
Doc: https://doc.linty-services.com/scan.html#from-github

@stnolting stnolting linked an issue Sep 20, 2024 that may be closed by this pull request
@stnolting
Copy link
Owner

I just added the GitHub workflow [...]

I think this is quite straightforward. But I wonder how this action interacts with the other files you have created... Where do they get referenced? And how do we change the reference when moving these files to a different location? Can we use file-list files inside the read.ys script?

For the LINTY_TOKEN and the TABBY_CAD_LICENSE, I'll send them to you by email as soon as I create your account.

Great. Thanks a lot!

@stnolting stnolting added the enhancement New feature or request label Sep 20, 2024
@racodond
Copy link
Author

I think this is quite straightforward. But I wonder how this action interacts with the other files you have created... Where do they get referenced? And how do we change the reference when moving these files to a different location?

You can update the location of read.ys and hierarchy.ys files at https://oss.linty-services.com/project/settings?id=neorv32&category=hdl
For sonar-project.properties, please keep it at the root of your repository for now as it is a bit more complex to move. We can move it during a video conf once everything else is properly working.

Can we use file-list files inside the read.ys script?

You can for Verilog projects: https://doc.linty-services.com/scan.html#with-bugfinder-and-linter
But I never tried before for VHDL projects. verific -f -vhdl file_list_soc.f does not seem work. I just asked Yosys if it also works for VHDL projects and the proper syntax would be because there's nothing about VHDL and filelist in their documentation.

@stnolting stnolting marked this pull request as draft September 20, 2024 18:48
@stnolting stnolting added the experimental Experimental feature label Sep 20, 2024
@stnolting
Copy link
Owner

I would like to test everything locally (in this PR), but due to the GH action configuration the workflow is not run on pull requests. Unfortunately, I cannot edit the files in this PR as they belong to an external fork's branch. Can you update the GH actions file or can you move your branch upstream?

@racodond
Copy link
Author

I would like to test everything locally (in this PR), but due to the GH action configuration the workflow is not run on pull requests. Unfortunately, I cannot edit the files in this PR as they belong to an external fork's branch. Can you update the GH actions file or can you move your branch upstream?

I added execution on pull requests.
But it doesn't work because I think I cannot access your secrets from my fork: https://github.com/stnolting/neorv32/actions/runs/10965319047/job/30450892509?pr=1027

How do I move my branch to your repo? I don't have enough rights I guess for now.

@stnolting
Copy link
Owner

How do I move my branch to your repo?

git push upstream should do the trick I think.

But it doesn't work because I think I cannot access your secrets from my fork [...]

The GH actions flow should use the secrets from this repository anyway, because the actions are executed over here. I set up the secrets in the right way I think 🤔

grafik

@racodond
Copy link
Author

git push upstream

racodond@racodond-XPS:~/git/linty/neorv32$ git remote -v
origin  [email protected]:Linty-Services/neorv32.git (fetch)
origin  [email protected]:Linty-Services/neorv32.git (push)
upstream        [email protected]:stnolting/neorv32.git (fetch)
upstream        [email protected]:stnolting/neorv32.git (push)
racodond@racodond-XPS:~/git/linty/neorv32$ git push upstream 
ERROR: Permission to stnolting/neorv32.git denied to racodond.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The GH actions flow should use the secrets from this repository anyway, because the actions are executed over here. I set up the secrets in the right way I think 🤔

Indeed...
But let's make it an actual branch of your repo to make sure that there's no weird security stuff preventing access to those secrets.

@stnolting
Copy link
Owner

Please make sure you have the correct access rights

Oh, what went wrong there? 😅

Anyway, let's try another "local" version: #1029

@stnolting
Copy link
Owner

superseded by #1029

@stnolting stnolting closed this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration-related enhancement New feature or request experimental Experimental feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants