Skip to content

include 3.14 workflow #166

include 3.14 workflow

include 3.14 workflow #166

Workflow file for this run

name: Compile and release
on:
push:
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
build:
# Only publish on tags. run git tag vX and git push origin vX
# runs-on: self-hosted
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
strategy:
matrix:
target: [armel, arm64, mipsel, mipseb, mips64eb, x86_64]
version: ["4.10", "3.14"] # XXX: quotes are necessary, otherwise 4.10 -> 4.1
exclude:
- target: arm64
version: "3.14"
- target: mipsel
version: "3.14"
- target: mipseb
version: "3.14"
- target: mips64eb
version: "3.14"
- target: x86_64
version: "3.14"
steps:
- uses: actions/checkout@v4 # Clones to $GITHUB_WORKSPACE
with:
fetch-depth: 0
#submodules: 'true'
# Instead of getting submodules with checkout, we can do it manually to control depth.
# We don't want a full Linux history
- name: Pull kernel source
run: git submodule update --init --depth 1
- name: Cache kernel build objects
uses: actions/cache@v2
with:
path: |
cache
key: ${{ runner.os }}-kernel-build-${{ matrix.kernel_version }}-${{ matrix.target }}-${{ hashFiles('**/Dockerfile', '**/*.sh') }}
restore-keys: |
${{ runner.os }}-kernel-build-${{ matrix.kernel_version }}-${{ matrix.target }}-
${{ runner.os }}-kernel-build-${{ matrix.kernel_version }}-
${{ runner.os }}-kernel-build-
- name: Lint configs
run: ./build.sh --targets ${{ matrix.target }} --versions ${{ matrix.version }} --config-only
- name: Build Kernel for ${{ matrix.target }}
run: ./build.sh --targets ${{ matrix.target }} --versions ${{ matrix.version }}
# Temporarily store each target's build output
- name: Save ${{ matrix.target }} ${{ matrix.version }} build output
uses: actions/upload-artifact@v4
with:
name: build-output-${{ matrix.target }}.${{ matrix.version }}
path: kernels-latest.tar.gz
aggregate:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
steps:
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: downloaded-kernels
- name: Combine all kernels into a single archive
run: |
rm -rf combined-kernels && mkdir combined-kernels
# Extract each kernels-latest.tar.gz archive
for archive in $(find downloaded-kernels -name "*.tar.gz"); do
tar -xzf "$archive" -C combined-kernels
done
# Combine OSI profiles for each kernel version
# otherwise the extracted kernel configs willc lobber each other
if [ -d combined-kernels/kernels/4.10 ] ; then
for archive in $(find downloaded-kernels -name "*.tar.gz"); do
tar -O -xf "$archive" "kernels/4.10/osi.config";
done > combined-kernels/kernels/4.10/osi.config
fi
if [ -d combined-kernels/kernels/6.7 ] ; then
for archive in $(find downloaded-kernels -name "*.tar.gz"); do
tar -O -xf "$archive" "kernels/6.7/osi.config";
done > combined-kernels/kernels/6.7/osi.config
fi
# Create a new single archive from the combined content
tar -czvf kernels-latest.tar.gz -C combined-kernels .
- name: Create and publish release
uses: softprops/action-gh-release@v1
with:
files: kernels-latest.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}