2022-03-09 18:22:22 +01:00
|
|
|
name: Build Kernel
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
2022-12-04 20:58:11 +01:00
|
|
|
- '.github/workflows/check-kernel-patches.yml'
|
|
|
|
- '.github/workflows/build.yml'
|
2022-08-07 18:18:40 +02:00
|
|
|
- '.github/workflows/kernel.yml'
|
2022-10-19 23:02:43 +02:00
|
|
|
- 'include/kernel*'
|
2022-03-09 18:22:22 +01:00
|
|
|
- 'package/kernel/**'
|
2022-08-07 18:18:40 +02:00
|
|
|
- 'target/linux/generic/**'
|
2022-10-08 19:25:54 +02:00
|
|
|
push:
|
|
|
|
paths:
|
2022-12-04 20:58:11 +01:00
|
|
|
- '.github/workflows/check-kernel-patches.yml'
|
|
|
|
- '.github/workflows/build.yml'
|
2022-10-08 19:25:54 +02:00
|
|
|
- '.github/workflows/kernel.yml'
|
2022-10-19 23:02:43 +02:00
|
|
|
- 'include/kernel*'
|
2022-10-08 19:25:54 +02:00
|
|
|
- 'package/kernel/**'
|
|
|
|
- 'target/linux/generic/**'
|
2022-09-19 12:20:37 +02:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-03-09 18:22:22 +01:00
|
|
|
jobs:
|
|
|
|
determine_targets:
|
|
|
|
name: Set targets
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
target: ${{ steps.find_targets.outputs.target }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-10-12 15:24:11 +02:00
|
|
|
uses: actions/checkout@v3
|
2022-03-09 18:22:22 +01:00
|
|
|
|
|
|
|
- name: Set targets
|
|
|
|
id: find_targets
|
|
|
|
run: |
|
|
|
|
export TARGETS="$(perl ./scripts/dump-target-info.pl targets 2>/dev/null \
|
|
|
|
| sort -u -t '/' -k1,1 \
|
|
|
|
| awk '{ print $1 }')"
|
|
|
|
|
|
|
|
JSON='['
|
|
|
|
FIRST=1
|
|
|
|
for TARGET in $TARGETS; do
|
|
|
|
[[ $FIRST -ne 1 ]] && JSON="$JSON"','
|
|
|
|
JSON="$JSON"'"'"${TARGET}"'"'
|
|
|
|
FIRST=0
|
|
|
|
done
|
|
|
|
JSON="$JSON"']'
|
|
|
|
|
|
|
|
echo -e "\n---- targets ----\n"
|
|
|
|
echo "$JSON"
|
|
|
|
echo -e "\n---- targets ----\n"
|
|
|
|
|
2022-10-21 16:09:19 +02:00
|
|
|
echo "target=$JSON" >> $GITHUB_OUTPUT
|
2022-03-09 18:22:22 +01:00
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build Kernel with external toolchain
|
|
|
|
needs: determine_targets
|
2022-11-01 19:10:01 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: read
|
2022-03-09 18:22:22 +01:00
|
|
|
strategy:
|
|
|
|
fail-fast: False
|
|
|
|
matrix:
|
|
|
|
target: ${{fromJson(needs.determine_targets.outputs.target)}}
|
2022-11-01 19:10:01 +01:00
|
|
|
uses: ./.github/workflows/build.yml
|
|
|
|
with:
|
|
|
|
target: ${{ matrix.target }}
|
2022-12-07 14:44:34 +01:00
|
|
|
build_kernel: true
|
2022-11-01 19:10:01 +01:00
|
|
|
build_all_kmods: true
|
2022-03-09 18:22:22 +01:00
|
|
|
|
2022-11-01 19:10:01 +01:00
|
|
|
check-kernel-patches:
|
|
|
|
name: Check Kernel patches
|
|
|
|
needs: determine_targets
|
2022-09-05 23:18:00 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: read
|
2022-10-15 10:56:46 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: False
|
|
|
|
matrix:
|
|
|
|
target: ${{fromJson(needs.determine_targets.outputs.target)}}
|
2022-11-01 19:10:01 +01:00
|
|
|
uses: ./.github/workflows/check-kernel-patches.yml
|
|
|
|
with:
|
|
|
|
target: ${{ matrix.target }}
|
2022-10-15 10:56:46 +02:00
|
|
|
|