action.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: 'Apply BBRv3 Patches'
  2. description: 'Apply BBRv3 TCP congestion control patches with version-specific patch selection'
  3. inputs:
  4. version:
  5. description: 'Kernel config version (e.g., android15-6.6)'
  6. required: true
  7. sublevel:
  8. description: 'Kernel sublevel'
  9. required: true
  10. runs:
  11. using: 'composite'
  12. steps:
  13. - name: Apply BBRv3 Patch
  14. shell: bash
  15. working-directory: ${{ github.workspace }}/kernel/common
  16. run: |
  17. set -euo pipefail
  18. if [[ ${{ inputs.version }} == "android16-6.12" ]]; then
  19. cp "${{ github.workspace }}/kernel_patches/common/bbrv3/0001-net-tcp-backport-BBRv3-to-android15-6.6.patch" temp.patch
  20. #patch -p1 -F 3 < temp.patch
  21. rm temp.patch
  22. elif [[ ${{ inputs.version }} == "android15-6.6" ]]; then
  23. cp "${{ github.workspace }}/kernel_patches/common/bbrv3/0001-net-tcp-backport-BBRv3-to-android15-6.6.patch" temp.patch
  24. patch -p1 -F 3 < temp.patch
  25. rm temp.patch
  26. elif [[ ${{ inputs.version }} == "android14-6.1" ]]; then
  27. cp "${{ github.workspace }}/kernel_patches/common/bbrv3/0001-net-tcp-backport-BBRv3-to-android14-6.1.patch" temp.patch
  28. patch -p1 -F 3 < temp.patch
  29. rm temp.patch
  30. elif [[ ${{ inputs.version }} == "android14-5.15" ]]; then
  31. cp "${{ github.workspace }}/kernel_patches/common/bbrv3/0001-net-tcp-backport-BBRv3-to-android13-5.15.patch" temp.patch
  32. patch -p1 -F 3 < temp.patch
  33. rm temp.patch
  34. elif [[ ${{ inputs.version }} == "android13-5.15" && ${{ inputs.sublevel }} -ge "74" ]]; then
  35. cp "${{ github.workspace }}/kernel_patches/common/bbrv3/0001-net-tcp-backport-BBRv3-to-android13-5.15.patch" temp.patch
  36. patch -p1 -F 3 < temp.patch
  37. rm temp.patch
  38. elif [[ ${{ inputs.version }} == "android13-5.10" && ${{ inputs.sublevel }} -ge "186" ]]; then
  39. cp "${{ github.workspace }}/kernel_patches/common/bbrv3/0001-net-tcp-backport-BBRv3-to-android12-5.10.patch" temp.patch
  40. patch -p1 -F 3 < temp.patch
  41. rm temp.patch
  42. elif [[ ${{ inputs.version }} == "android12-5.10" && ${{ inputs.sublevel }} -ge "185" ]]; then
  43. cp "${{ github.workspace }}/kernel_patches/common/bbrv3/0001-net-tcp-backport-BBRv3-to-android12-5.10.patch" temp.patch
  44. patch -p1 -F 3 < temp.patch
  45. rm temp.patch
  46. fi
  47. echo "✅ BBRv3 patches applied"
  48. - name: Enable BBRv3 Kernel Config
  49. uses: ./.github/actions/set-kernel-config
  50. with:
  51. config_list: |
  52. CONFIG_TCP_CONG_BBR3=y