lint.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: Lint
  2. on:
  3. push:
  4. branches:
  5. - main
  6. - ci
  7. pull_request:
  8. branches:
  9. - main
  10. env:
  11. CARGO_TERM_COLOR: always
  12. jobs:
  13. lint:
  14. runs-on: ubuntu-20.04
  15. steps:
  16. - uses: actions/checkout@v2
  17. - uses: actions-rs/toolchain@v1
  18. with:
  19. profile: minimal
  20. toolchain: nightly
  21. components: rustfmt, clippy, miri
  22. override: true
  23. - name: Check formatting
  24. run: |
  25. cargo fmt --all -- --check
  26. pushd bpf
  27. cargo fmt --all -- --check
  28. popd
  29. - name: Run clippy
  30. run: |
  31. cargo clippy -p aya -- --deny warnings
  32. cargo clippy -p aya-gen -- --deny warnings
  33. cargo clippy -p xtask -- --deny warnings
  34. pushd bpf
  35. cargo clippy -p aya-bpf -- --deny warnings
  36. popd
  37. - name: Run miri
  38. env:
  39. MIRIFLAGS: -Zmiri-disable-stacked-borrows
  40. run: |
  41. cargo miri test
  42. pushd bpf
  43. cargo miri test
  44. popd