gen.yml 1.2 KB

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