gen.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: codegen
  2. on: workflow_dispatch
  3. jobs:
  4. codegen:
  5. runs-on: ubuntu-20.04
  6. steps:
  7. - uses: actions/checkout@v4
  8. with:
  9. submodules: recursive
  10. - name: update libbpf
  11. working-directory: xtask/libbpf
  12. run: |
  13. set -euxo pipefail
  14. git fetch origin
  15. git checkout origin/HEAD
  16. echo "LIBBPF_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
  17. - uses: dtolnay/rust-toolchain@nightly
  18. with:
  19. components: rustfmt, clippy
  20. - uses: Swatinem/rust-cache@v2
  21. - name: Install headers
  22. run: |
  23. set -euxo pipefail
  24. sudo apt -y update
  25. sudo apt -y install libelf-dev libc6-dev libc6-dev-{arm64,armel,riscv64,ppc64el,s390x,mips}-cross
  26. - run: cargo xtask codegen
  27. - run: cargo xtask public-api --bless
  28. - uses: peter-evans/create-pull-request@v7
  29. with:
  30. branch: create-pull-request/codegen
  31. commit-message: |
  32. aya-obj, aya-ebpf-bindings: regenerate
  33. libbpf commit: ${{ env.LIBBPF_SHA }}
  34. title: 'aya-obj, aya-ebpf-bindings: regenerate'
  35. body: |
  36. **Automated changes**
  37. libbpf commit: ${{ env.LIBBPF_SHA }}