build-aya-bpf.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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: Prereqs
  31. run: cargo install cross --git https://github.com/cross-rs/cross
  32. - name: Build
  33. env:
  34. CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }}
  35. run: |
  36. pushd bpf
  37. cargo build --workspace --exclude aya-bpf-macros --verbose
  38. popd
  39. - name: Run tests
  40. env:
  41. CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }}
  42. run: |
  43. pushd bpf
  44. cargo test --workspace --exclude aya-bpf-macros --verbose
  45. popd
  46. build-macros:
  47. strategy:
  48. matrix:
  49. arch:
  50. - x86_64-unknown-linux-gnu
  51. - aarch64-unknown-linux-gnu
  52. - armv7-unknown-linux-gnueabi
  53. - riscv64gc-unknown-none-elf
  54. runs-on: ubuntu-20.04
  55. steps:
  56. - uses: actions/checkout@v2
  57. - uses: actions-rs/toolchain@v1
  58. with:
  59. toolchain: nightly
  60. override: true
  61. - uses: Swatinem/rust-cache@v1
  62. - name: Prereqs
  63. run: cargo install cross --git https://github.com/cross-rs/cross
  64. - name: Build bpf macros
  65. run: |
  66. pushd bpf
  67. cross build -p aya-bpf-macros --verbose
  68. popd
  69. - name: Test bpf macros
  70. run: |
  71. pushd bpf
  72. RUST_BACKTRACE=full cross test -p aya-bpf-macros --verbose
  73. popd