kernel.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. name: Build Kernel
  2. on:
  3. pull_request:
  4. paths:
  5. - '.github/workflows/check-kernel-patches.yml'
  6. - '.github/workflows/build.yml'
  7. - '.github/workflows/kernel.yml'
  8. - 'include/kernel*'
  9. - 'package/kernel/**'
  10. - 'target/linux/generic/**'
  11. push:
  12. paths:
  13. - '.github/workflows/check-kernel-patches.yml'
  14. - '.github/workflows/build.yml'
  15. - '.github/workflows/kernel.yml'
  16. - 'include/kernel*'
  17. - 'package/kernel/**'
  18. - 'target/linux/generic/**'
  19. permissions:
  20. contents: read
  21. jobs:
  22. determine_targets:
  23. name: Set targets
  24. runs-on: ubuntu-latest
  25. outputs:
  26. target: ${{ steps.find_targets.outputs.target }}
  27. steps:
  28. - name: Checkout
  29. uses: actions/checkout@v3
  30. - name: Set targets
  31. id: find_targets
  32. run: |
  33. export TARGETS="$(perl ./scripts/dump-target-info.pl targets 2>/dev/null \
  34. | sort -u -t '/' -k1,1 \
  35. | awk '{ print $1 }')"
  36. JSON='['
  37. FIRST=1
  38. for TARGET in $TARGETS; do
  39. [[ $FIRST -ne 1 ]] && JSON="$JSON"','
  40. JSON="$JSON"'"'"${TARGET}"'"'
  41. FIRST=0
  42. done
  43. JSON="$JSON"']'
  44. echo -e "\n---- targets ----\n"
  45. echo "$JSON"
  46. echo -e "\n---- targets ----\n"
  47. echo "target=$JSON" >> $GITHUB_OUTPUT
  48. build:
  49. name: Build Kernel with external toolchain
  50. needs: determine_targets
  51. permissions:
  52. contents: read
  53. packages: read
  54. strategy:
  55. fail-fast: False
  56. matrix:
  57. target: ${{fromJson(needs.determine_targets.outputs.target)}}
  58. uses: ./.github/workflows/build.yml
  59. with:
  60. target: ${{ matrix.target }}
  61. build_all_kmods: true
  62. include_feeds: true
  63. check-kernel-patches:
  64. name: Check Kernel patches
  65. needs: determine_targets
  66. permissions:
  67. contents: read
  68. packages: read
  69. strategy:
  70. fail-fast: False
  71. matrix:
  72. target: ${{fromJson(needs.determine_targets.outputs.target)}}
  73. uses: ./.github/workflows/check-kernel-patches.yml
  74. with:
  75. target: ${{ matrix.target }}