2022-03-09 17:22:22 +00:00
|
|
|
name: Build Kernel
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
2022-12-04 19:58:11 +00:00
|
|
|
- '.github/workflows/check-kernel-patches.yml'
|
|
|
|
- '.github/workflows/build.yml'
|
2022-08-07 16:18:40 +00:00
|
|
|
- '.github/workflows/kernel.yml'
|
2022-10-19 21:02:43 +00:00
|
|
|
- 'include/kernel*'
|
2022-03-09 17:22:22 +00:00
|
|
|
- 'package/kernel/**'
|
2022-08-07 16:18:40 +00:00
|
|
|
- 'target/linux/generic/**'
|
2022-10-08 17:25:54 +00:00
|
|
|
push:
|
|
|
|
paths:
|
2022-12-04 19:58:11 +00:00
|
|
|
- '.github/workflows/check-kernel-patches.yml'
|
|
|
|
- '.github/workflows/build.yml'
|
2022-10-08 17:25:54 +00:00
|
|
|
- '.github/workflows/kernel.yml'
|
2022-10-19 21:02:43 +00:00
|
|
|
- 'include/kernel*'
|
2022-10-08 17:25:54 +00:00
|
|
|
- 'package/kernel/**'
|
|
|
|
- 'target/linux/generic/**'
|
2022-09-19 10:20:37 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-03-09 17:22:22 +00:00
|
|
|
jobs:
|
|
|
|
determine_targets:
|
|
|
|
name: Set targets
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
target: ${{ steps.find_targets.outputs.target }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-10-12 13:24:11 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-03-09 17:22:22 +00: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 14:09:19 +00:00
|
|
|
echo "target=$JSON" >> $GITHUB_OUTPUT
|
2022-03-09 17:22:22 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build Kernel with external toolchain
|
|
|
|
needs: determine_targets
|
2022-11-01 18:10:01 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: read
|
2022-03-09 17:22:22 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: False
|
|
|
|
matrix:
|
|
|
|
target: ${{fromJson(needs.determine_targets.outputs.target)}}
|
2022-11-01 18:10:01 +00:00
|
|
|
uses: ./.github/workflows/build.yml
|
|
|
|
with:
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
build_all_kmods: true
|
2022-03-09 17:22:22 +00:00
|
|
|
|
2022-11-01 18:10:01 +00:00
|
|
|
check-kernel-patches:
|
|
|
|
name: Check Kernel patches
|
|
|
|
needs: determine_targets
|
2022-09-05 21:18:00 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: read
|
2022-10-15 08:56:46 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: False
|
|
|
|
matrix:
|
|
|
|
target: ${{fromJson(needs.determine_targets.outputs.target)}}
|
2022-11-01 18:10:01 +00:00
|
|
|
uses: ./.github/workflows/check-kernel-patches.yml
|
|
|
|
with:
|
|
|
|
target: ${{ matrix.target }}
|
2022-10-15 08:56:46 +00:00
|
|
|
|