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] initial setup (preliminary) #1029

Draft
wants to merge 45 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
4b2c5d9
[linty] initial setup
stnolting Sep 20, 2024
3cda0d2
[linty] fix file name typo
stnolting Sep 20, 2024
9dfefb4
[linty] set processor top
stnolting Sep 21, 2024
41805dd
Update read.ys
stnolting Sep 21, 2024
755f8fa
revert top
stnolting Sep 21, 2024
444df30
test wildcards
stnolting Sep 21, 2024
9cd9609
revert wildcards
stnolting Sep 21, 2024
b348068
relocate configuration files
stnolting Sep 21, 2024
c4a3734
Update linty_read.ys
stnolting Sep 21, 2024
ae53899
Update linty_read.ys
stnolting Sep 21, 2024
b15c013
try to change top
stnolting Sep 21, 2024
0366b37
typo fix
stnolting Sep 21, 2024
77e25b7
use configuration from web interface only
stnolting Sep 21, 2024
4a7e59c
Update linty_read.ys
stnolting Sep 21, 2024
2962e8e
Update Linty.yml
stnolting Sep 21, 2024
8ca3583
[.github] test listing command
stnolting Sep 25, 2024
cf19dd7
Update Linty.yml
stnolting Sep 25, 2024
c940d8f
Update Linty.yml
stnolting Sep 25, 2024
d571e11
use simple TB as top (just testing...)
stnolting Sep 25, 2024
bb8bee4
test Vivado IP as top
stnolting Sep 25, 2024
5b8ffdf
[.github] update linty workflow
stnolting Oct 3, 2024
49c69e5
Merge branch 'main' into linty_test
stnolting Oct 3, 2024
c4a41af
[linty] update file-list
stnolting Oct 3, 2024
e85e557
[linty] test neorv32_top as top
stnolting Oct 3, 2024
172c0e7
Update linty_read.ys
stnolting Oct 3, 2024
eb71014
Merge branch 'main' into linty_test
stnolting Oct 3, 2024
56b22b0
[linty] analyze files from rtl/core only
stnolting Oct 3, 2024
1cb21dd
[linty] relocate sonar project script
stnolting Oct 4, 2024
fabbb82
[linty] auto-gen sonar-project.properties
stnolting Oct 5, 2024
7424952
[linty] auto-gen *.ys files
stnolting Oct 5, 2024
f6dc693
[linty] update sonar sources
stnolting Oct 5, 2024
3c290ea
Update Linty.yml
stnolting Oct 5, 2024
dc68b91
Merge branch 'main' into linty_test
stnolting Oct 5, 2024
f578329
Update Linty.yml
stnolting Oct 5, 2024
b0ec0b0
Merge branch 'main' into linty_test
stnolting Oct 5, 2024
cb10829
[linty] temporarily remove trigger filter
stnolting Oct 5, 2024
450a166
Merge branch 'main' into linty_test
stnolting Oct 6, 2024
952da5a
[.github] run only if this workflow is edited
stnolting Oct 7, 2024
4cd17a5
Merge branch 'main' into linty_test
stnolting Oct 10, 2024
3216baf
Merge branch 'main' into linty_test
stnolting Oct 11, 2024
82d35c7
[readme] add linty badge
stnolting Oct 17, 2024
3df089c
Merge branch 'main' into linty_test
stnolting Oct 17, 2024
4c1d485
Add link to https://linty-services.com
racodond Oct 18, 2024
f846ec7
Add link to https://linty-services.com (#1062)
stnolting Oct 18, 2024
fea96e0
Merge branch 'main' into linty_test
stnolting Nov 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/Linty.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Linty
on:
push:
paths:
- 'rtl/**'
- 'sim/**'
- '.github/workflows/Linty.yml'
workflow_dispatch:

jobs:
linty:
# if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
name: Linty
timeout-minutes: 10
runs-on: ubuntu-latest

steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create sonar-project.properties
run: |
echo "sonar.projectKey=neorv32" > $GITHUB_WORKSPACE/sonar-project.properties
echo "sonar.sources=./rtl/core" >> $GITHUB_WORKSPACE/sonar-project.properties

- name: Create linty_read.ys
run: |
cp $GITHUB_WORKSPACE/rtl/file_list_soc.f $GITHUB_WORKSPACE/.github/linty_read.ys
sed -i 's/NEORV32_RTL_PATH_PLACEHOLDER/verific -work neorv32 -vhdl .\/..\/rtl/g' $GITHUB_WORKSPACE/.github/linty_read.ys
echo "verific -L neorv32 -vhdl ./../rtl/core/neorv32_top.vhd" >> $GITHUB_WORKSPACE/.github/linty_read.ys

- name: Create linty_hierarchy.ys
run: |
echo "hierarchy -top neorv32_top" > $GITHUB_WORKSPACE/.github/linty_hierarchy.ys

- name: Cache
uses: actions/[email protected]
with:
path: ~/.sonar/cache
key: sonar
restore-keys: sonar

- name: Run Linty
run: |
docker run \
-e SONAR_HOST_URL=https://oss.linty-services.com \
-e SONAR_TOKEN="${{ secrets.LINTY_TOKEN }}" \
-e GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
-e GITHUB_REPOSITORY_OWNER="$GITHUB_REPOSITORY_OWNER" \
-e GITHUB_REPOSITORY="$GITHUB_REPOSITORY" \
-e TABBY_CAD_LICENSE="$TABBY_CAD_LICENSE" \
-v "$PWD:/usr/src" \
lintyservices/linty-scanner:latest
env:
TABBY_CAD_LICENSE: ${{ secrets.TABBY_CAD_LICENSE }}

- name: Debug
if: always()
uses: actions/upload-artifact@v3
with:
name: debug
path: |
./bugfinder_workdir/
./.linty/
include-hidden-files: true
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,16 @@ not working as expected. See how to [contribute](https://github.com/stnolting/ne

| Task / Subproject | Repository | CI Status |
|:------------------|:-----------|:----------|
| GitHub pages (docs) | [neorv32](https://github.com/stnolting/neorv32) | [![GitHub Pages](https://img.shields.io/website.svg?label=stnolting.github.io%2Fneorv32&longCache=true&style=flat-square&url=http%3A%2F%2Fstnolting.github.io%2Fneorv32%2Findex.html&logo=GitHub)](https://stnolting.github.io/neorv32) |
| Build documentation | [neorv32](https://github.com/stnolting/neorv32) | [![Documentation](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32/Documentation.yml?branch=main&longCache=true&style=flat-square&label=Documentation&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3ADocumentation) |
| Processor verification | [neorv32](https://github.com/stnolting/neorv32) | [![Processor](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32/Processor.yml?branch=main&longCache=true&style=flat-square&label=Processor%20Check&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AProcessor) |
| VUnit testbench | [neorv32-vunit](https://github.com/stnolting/neorv32-vunit) | [![neorv32-vunit](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-vunit/vunit.yml?branch=main&longCache=true&style=flat-square&label=neorv32-vunit&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-vunit/actions/workflows/vunit.yml) |
| RISCOF core verification | [neorv32-riscof](https://github.com/stnolting/neorv32-riscof) | [![neorv32-riscof](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-riscof/main.yml?branch=main&longCache=true&style=flat-square&label=neorv32-riscof&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-riscof/actions/workflows/main.yml) |
| FPGA implementations | [neorv32-setups](https://github.com/stnolting/neorv32-setups) | [![Implementation](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-setups/Implementation.yml?branch=main&longCache=true&style=flat-square&label=Implementation&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-setups/actions?query=workflow%3AImplementation) |
| All-Verilog version | [neorv32-verilog](https://github.com/stnolting/neorv32-verilog) | [![neorv32-verilog](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-verilog/main.yml?branch=main&longCache=true&style=flat-square&label=neorv32-verilog&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-verilog/actions/workflows/main.yml) |
| FreeRTOS port | [neorv32-freertos](https://github.com/stnolting/neorv32-freertos) | [![neorv32-freertos](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-freertos/main.yml?branch=main&longCache=true&style=flat-square&label=neorv32-freertos%20sim&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-freertos/actions/workflows/main.yml) |
| Prebuilt GCC toolchains | [riscv-gcc-prebuilt](https://github.com/stnolting/riscv-gcc-prebuilt) | [![Prebuilt_Toolchains](https://img.shields.io/github/actions/workflow/status/stnolting/riscv-gcc-prebuilt/main.yml?branch=main&longCache=true&style=flat-square&label=Prebuilt%20Toolchains&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/riscv-gcc-prebuilt/actions/workflows/main.yml) |
| Code quality ([Linty](https://linty-services.com)) | [neorv32](https://github.com/stnolting/neorv32) | [![Quality Gate Status](https://oss.linty-services.com/api/project_badges/measure?project=neorv32&metric=alert_status&token=sqb_97b392f36051f7887215e61c53d6f0f858ca2697)](https://oss.linty-services.com/dashboard?id=neorv32) |
| GitHub pages (docs) | [neorv32](https://github.com/stnolting/neorv32) | [![GitHub Pages](https://img.shields.io/website.svg?label=stnolting.github.io%2Fneorv32&longCache=true&style=flat-square&url=http%3A%2F%2Fstnolting.github.io%2Fneorv32%2Findex.html&logo=GitHub)](https://stnolting.github.io/neorv32) |
| Build documentation | [neorv32](https://github.com/stnolting/neorv32) | [![Documentation](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32/Documentation.yml?branch=main&longCache=true&style=flat-square&label=Documentation&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3ADocumentation) |
| Processor verification | [neorv32](https://github.com/stnolting/neorv32) | [![Processor](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32/Processor.yml?branch=main&longCache=true&style=flat-square&label=Processor%20Check&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AProcessor) |
| VUnit testbench | [neorv32-vunit](https://github.com/stnolting/neorv32-vunit) | [![neorv32-vunit](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-vunit/vunit.yml?branch=main&longCache=true&style=flat-square&label=neorv32-vunit&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-vunit/actions/workflows/vunit.yml) |
| RISCOF core verification | [neorv32-riscof](https://github.com/stnolting/neorv32-riscof) | [![neorv32-riscof](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-riscof/main.yml?branch=main&longCache=true&style=flat-square&label=neorv32-riscof&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-riscof/actions/workflows/main.yml) |
| FPGA implementations | [neorv32-setups](https://github.com/stnolting/neorv32-setups) | [![Implementation](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-setups/Implementation.yml?branch=main&longCache=true&style=flat-square&label=Implementation&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-setups/actions?query=workflow%3AImplementation) |
| All-Verilog version | [neorv32-verilog](https://github.com/stnolting/neorv32-verilog) | [![neorv32-verilog](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-verilog/main.yml?branch=main&longCache=true&style=flat-square&label=neorv32-verilog&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-verilog/actions/workflows/main.yml) |
| FreeRTOS port | [neorv32-freertos](https://github.com/stnolting/neorv32-freertos) | [![neorv32-freertos](https://img.shields.io/github/actions/workflow/status/stnolting/neorv32-freertos/main.yml?branch=main&longCache=true&style=flat-square&label=neorv32-freertos%20sim&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32-freertos/actions/workflows/main.yml) |
| Prebuilt GCC toolchains | [riscv-gcc-prebuilt](https://github.com/stnolting/riscv-gcc-prebuilt) | [![Prebuilt_Toolchains](https://img.shields.io/github/actions/workflow/status/stnolting/riscv-gcc-prebuilt/main.yml?branch=main&longCache=true&style=flat-square&label=Prebuilt%20Toolchains&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/riscv-gcc-prebuilt/actions/workflows/main.yml) |

The processor passes the official RISC-V architecture tests to ensure compatibility with the RISC-V ISA specs., which is checked by the
[neorv32-riscof](https://github.com/stnolting/neorv32-riscof) repository. It can successfully run _any_ C program
Expand Down
Loading