Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Build kernel

Build kernel #82

Workflow file for this run

name: Build kernel
on:
push:
branches: [ "main" ]
schedule:
- cron: "10 0 * * *" # run at the start of every day after configs are updated
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-kernel-mainline:
runs-on: ubuntu-latest
steps:
- name: Maximizing build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 5120
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies
run: sudo apt update && sudo apt install -y git build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison binutils dracut
- name: Building Kernel
run: bash build.sh mainline
- name: Uploading as artifact
uses: actions/upload-artifact@v3
with:
name: mainline-kernel
retention-days: 1
path: |
bzImage
modules.tar.xz
headers.tar.xz
initramfs.cpio.xz
build-kernel-chromeos:
runs-on: ubuntu-latest
steps:
- name: Maximizing build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 5120
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies
run: sudo apt update && sudo apt install -y git build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison binutils dracut
- name: Building Kernel
run: bash build.sh chromeos
- name: Uploading as artifact
uses: actions/upload-artifact@v3
with:
name: chromeos-kernel
retention-days: 1
path: |
bzImage
modules.tar.xz
headers.tar.xz
initramfs.cpio.xz
create-release:
runs-on: ubuntu-latest
needs: [ build-kernel-mainline, build-kernel-chromeos ]
steps:
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Deleting old dev release
uses: cb80/delrel@latest
with:
tag: dev-build
- name: Generating release tag and setting prerelease + name
id: tag
run: |
message=$(git log -1 --pretty=format:"%s")
echo "commit_message=$message" >> $GITHUB_OUTPUT
- name: creating tmp folder
run: mkdir /tmp/artifacts
- name: Downloading kernel artifacts
uses: actions/download-artifact@v3
with:
path: /tmp/artifacts/
- name: Renaming kernel artifacts
run: |
# append kernel type to downloaded artifacts
cd "/tmp/artifacts/mainline-kernel"
for file in *; do
if [ -f "$file" ]; then
mv "$file" "mainline-$file"
fi
done
cd "/tmp/artifacts/chromeos-kernel"
for file in *; do
if [ -f "$file" ]; then
mv "$file" "chromeos-$file"
fi
done
- name: Publishing new release
uses: softprops/action-gh-release@v1
with:
tag_name: dev-build
name: Kernel builds - ${{ steps.tag.outputs.commit_message }}
prerelease: true
body: |
Triggered by ${{ github.sha }} at ${{ github.event.repository.updated_at }}
files: |
/tmp/artifacts/*-kernel/*-bzImage
/tmp/artifacts/*-kernel/*-modules.tar.xz
/tmp/artifacts/*-kernel/*-headers.tar.xz
/tmp/artifacts/*-kernel/*-initramfs.cpio.xz