build-aya-bpf.yml 1002 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. fail-fast: false
  16. matrix:
  17. arch:
  18. - x86_64
  19. - aarch64
  20. - arm
  21. - riscv64
  22. target:
  23. - bpfel-unknown-none
  24. - bpfeb-unknown-none
  25. runs-on: ubuntu-20.04
  26. steps:
  27. - uses: actions/checkout@v3
  28. - uses: dtolnay/rust-toolchain@master
  29. with:
  30. toolchain: nightly
  31. components: rust-src
  32. - uses: Swatinem/rust-cache@v2
  33. - name: Prereqs
  34. run: cargo install bpf-linker
  35. - uses: taiki-e/install-action@cargo-hack
  36. - name: Build
  37. env:
  38. CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }}
  39. run: |
  40. cargo hack build --package aya-bpf --package aya-log-ebpf \
  41. --feature-powerset \
  42. --target ${{ matrix.target }} \
  43. -Z build-std=core