lint.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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, rust-src
  22. override: true
  23. - name: Check formatting
  24. run: |
  25. cargo fmt --all -- --check
  26. (cd bpf && cargo fmt --all -- --check)
  27. (cd test/integration-ebpf && cargo fmt --all -- --check)
  28. - name: Run clippy
  29. run: |
  30. cargo clippy -p aya -- --deny warnings
  31. cargo clippy -p aya-gen -- --deny warnings
  32. cargo clippy -p xtask -- --deny warnings
  33. (cd bpf && cargo clippy -p aya-bpf -- --deny warnings)
  34. (cd test/integration-ebpf && cargo clippy -- --deny warnings)
  35. - name: Run miri
  36. env:
  37. MIRIFLAGS: -Zmiri-disable-stacked-borrows
  38. run: |
  39. cargo miri test --all-targets
  40. pushd bpf
  41. cargo miri test
  42. popd