2023-01-11 09:26:16 +00:00
|
|
|
# ci:kernel:x86:64 is going to trigger CI kernel check jobs for x86/64 target
|
|
|
|
|
|
|
|
name: Build kernel and check patches for target specified in labels
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- labeled
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
set_target:
|
|
|
|
if: startsWith(github.event.label.name, 'ci:kernel:')
|
|
|
|
name: Set target
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
target: ${{ steps.set_target.outputs.target }}
|
2023-05-25 21:09:59 +00:00
|
|
|
subtarget: ${{ steps.set_target.outputs.subtarget }}
|
2023-01-11 09:26:16 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set target
|
|
|
|
id: set_target
|
|
|
|
env:
|
|
|
|
CI_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
|
|
run: |
|
2023-05-27 17:53:15 +00:00
|
|
|
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/target=\1/p' | tee --append $GITHUB_OUTPUT
|
|
|
|
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/subtarget=\2/p' | tee --append $GITHUB_OUTPUT
|
2023-01-11 09:26:16 +00:00
|
|
|
|
|
|
|
build_kernel:
|
|
|
|
name: Build Kernel with external toolchain
|
|
|
|
needs: set_target
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: read
|
|
|
|
uses: ./.github/workflows/build.yml
|
|
|
|
with:
|
2023-05-28 01:44:01 +00:00
|
|
|
container_name: toolchain
|
2023-01-11 09:26:16 +00:00
|
|
|
target: ${{ needs.set_target.outputs.target }}
|
2023-05-25 16:24:00 +00:00
|
|
|
subtarget: ${{ needs.set_target.outputs.subtarget }}
|
2023-01-11 09:26:16 +00:00
|
|
|
build_kernel: true
|
|
|
|
build_all_kmods: true
|
|
|
|
|
|
|
|
check-kernel-patches:
|
|
|
|
name: Check Kernel patches
|
|
|
|
needs: set_target
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: read
|
|
|
|
uses: ./.github/workflows/check-kernel-patches.yml
|
|
|
|
with:
|
|
|
|
target: ${{ needs.set_target.outputs.target }}
|
2023-05-25 16:24:00 +00:00
|
|
|
subtarget: ${{ needs.set_target.outputs.subtarget }}
|