Skip to content

Build Linux Kernel #314

Build Linux Kernel

Build Linux Kernel #314

Workflow file for this run

# MIT License
#
# Copyright (c) 2022 David Schall and EASE Lab
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: Build Linux Kernel
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: "0 7 * * 1"
push:
branches: [main]
paths:
- "setup/kernel.Makefile"
- "configs/linux-configs/**"
pull_request:
branches: [main]
paths:
- "setup/kernel.Makefile"
- "configs/linux-configs/**"
env:
WORKDIR: setup/
MAKEFILE: setup/kernel.Makefile
KERNEL: kernel
jobs:
build:
name: Build kernel
# Building the kernel works also on the github runners.
# However, they only offer building on one core therefor it take a while
# Using self hosted is faster
runs-on: ubuntu-20.04
# runs-on: [self-hosted, gem5-build]
strategy:
fail-fast: true
matrix:
arch: [ amd64, arm64 ]
version: [ focal, jammy ]
include:
- version: focal
kversion: v5.4.84
- version: jammy
kversion: v5.15.59
env:
ARCH: ${{ matrix.arch }}
KVERSION: ${{ matrix.kversion }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
make -f ${{ env.MAKEFILE }} dep_install
- name: Configure and build the Linux kernel
shell: bash
run: |
make -f ${{ env.MAKEFILE }} build
- name: Save the outup binary
shell: bash
env:
OUTPUT: ${{ env.KERNEL }}
run: |
make -f ${{ env.MAKEFILE }} save_output
- name: Upload Kernel Artifact
uses: actions/upload-artifact@v4
with:
name: vmlinux-${{ matrix.version }}-${{ matrix.arch }}
path: ${{ env.KERNEL }}