action.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: 'Setup Build Environment'
  2. description: 'Clones dependencies and exports mkbootimg/avbtool paths'
  3. inputs:
  4. version:
  5. description: 'Kernel config version (e.g., android12-5.10)'
  6. required: true
  7. sublevel:
  8. description: 'Kernel sublevel'
  9. required: true
  10. runs:
  11. using: composite
  12. steps:
  13. - shell: bash
  14. run: |
  15. set -euo pipefail
  16. git config --global user.name "github-actions[bot]"
  17. git config --global user.email "github-actions[bot]@users.noreply.github.com"
  18. mkdir -p "${{ github.workspace }}/kernel"
  19. mkdir -p "${{ github.workspace }}/git-repo"
  20. curl -L https://storage.googleapis.com/git-repo-downloads/repo -o "${{ github.workspace }}/git-repo/repo"
  21. chmod +x "${{ github.workspace }}/git-repo/repo"
  22. echo "${{ github.workspace }}/git-repo" >> "$GITHUB_PATH"
  23. if [ -d "${{ github.workspace }}/kernel_patches" ]; then rm -rf "${{ github.workspace }}/kernel_patches"; fi
  24. git clone https://github.com/WildKernels/kernel_patches.git "${{ github.workspace }}/kernel_patches"
  25. if [ -d "${{ github.workspace }}/AnyKernel3" ]; then rm -rf "${{ github.workspace }}/AnyKernel3"; fi
  26. git clone https://github.com/WildKernels/AnyKernel3.git -b gki-2.0 "${{ github.workspace }}/AnyKernel3"
  27. - name: Install build deps for BTF generation (android12-5.10, sublevel>43)
  28. shell: bash
  29. if: ${{ inputs.version == 'android12-5.10' && fromJSON(inputs.sublevel) > 43 }}
  30. run: |
  31. set -euo pipefail
  32. sudo apt-get update -qq
  33. sudo apt-get install -y -qq dwarves libelf-dev