build-aya-bpf.yml 1000 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: build-aya-bpf
  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. build:
  14. strategy:
  15. matrix:
  16. arch:
  17. - x86_64
  18. - aarch64
  19. - arm
  20. # Disable riscv64 due to missing pt_regs handling in aya-bpf/args.rs
  21. # - riscv64
  22. runs-on: ubuntu-20.04
  23. steps:
  24. - uses: actions/checkout@v2
  25. - uses: actions-rs/toolchain@v1
  26. with:
  27. toolchain: nightly
  28. override: true
  29. - uses: Swatinem/rust-cache@v1
  30. - name: Build
  31. env:
  32. CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }}
  33. run: |
  34. pushd bpf
  35. cargo build --workspace --exclude aya-bpf-macros --verbose
  36. popd
  37. - name: Run tests
  38. env:
  39. CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }}
  40. run: |
  41. pushd bpf
  42. cargo test --workspace --exclude aya-bpf-macros --verbose
  43. popd