prototyper.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # This workflow uses actions that are not certified by GitHub.
  2. # They are provided by a third-party and are governed by
  3. # separate terms of service, privacy policy, and support
  4. # documentation.
  5. # rust-clippy is a tool that runs a bunch of lints to catch common
  6. # mistakes in your Rust code and help improve your Rust code.
  7. # More details at https://github.com/rust-lang/rust-clippy
  8. # and https://rust-lang.github.io/rust-clippy/
  9. name: CI
  10. on:
  11. pull_request:
  12. push:
  13. paths-ignore:
  14. - '**.md'
  15. - 'LICENSE'
  16. jobs:
  17. rust-clippy-analyze:
  18. name: Run rust-clippy analyzing
  19. runs-on: ubuntu-latest
  20. permissions:
  21. security-events: write
  22. steps:
  23. - name: Checkout code
  24. uses: actions/checkout@v4
  25. - name: Check format
  26. run: cargo fmt --check
  27. - name: Run test
  28. run: |
  29. cargo test -p rustsbi-prototyper
  30. - name: Install required cargo
  31. run: cargo install clippy-sarif sarif-fmt
  32. - name: Run rust-clippy
  33. run: |
  34. cargo clippy -p rustsbi-prototyper --target riscv64imac-unknown-none-elf --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
  35. cargo clippy -p rustsbi-test-kernel --target riscv64imac-unknown-none-elf --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
  36. cargo clippy -p rustsbi-bench-kernel --target riscv64imac-unknown-none-elf --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
  37. continue-on-error: true
  38. - name: Upload analysis results to GitHub
  39. uses: github/codeql-action/upload-sarif@v3
  40. with:
  41. sarif_file: rust-clippy-results.sarif
  42. wait-for-processing: true