dpup-kernel #95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dpup-kernel | |
on: | |
schedule: | |
- cron: '0 0 1,15 * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
if: github.event_name != 'schedule' || (github.repository == 'puppylinux-woof-CE/woof-CE' && github.ref == 'refs/heads/testing') | |
runs-on: ubuntu-22.04 | |
container: | |
image: debian:${{ matrix.release }}-slim | |
volumes: | |
- /usr:/hostusr | |
continue-on-error: ${{ matrix.release == 'sid' }} | |
strategy: | |
matrix: | |
include: | |
- release: bullseye | |
arch: x86_64 | |
base: config.amd64_none_amd64.xz | |
- release: bullseye | |
arch: x86 | |
base: config.i386_none_686-pae.xz | |
- release: bookworm | |
arch: x86_64 | |
base: config.amd64_none_amd64.xz | |
- release: bookworm | |
arch: x86 | |
base: config.i386_none_686-pae.xz | |
- release: trixie | |
arch: x86_64 | |
base: config.amd64_none_amd64.xz | |
- release: sid | |
arch: x86_64 | |
base: config.amd64_none_amd64.xz | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
rm -rf /hostusr/local/lib/android /hostusr/share/dotnet # increase free space, we don't need these | |
[ ${{ matrix.release }} = sid ] || echo "deb http://deb.debian.org/debian ${{ matrix.release }} main contrib non-free" > /etc/apt/sources.list | |
[ ${{ matrix.release }} = sid ] || echo "deb http://deb.debian.org/debian ${{ matrix.release }}-updates main contrib non-free" >> /etc/apt/sources.list | |
[ ${{ matrix.release }} = sid ] || echo "deb http://deb.debian.org/debian-security ${{ matrix.release }}-security main contrib non-free" >> /etc/apt/sources.list | |
[ ${{ matrix.arch }} != x86 ] || dpkg --add-architecture i386 | |
apt-get update -qq | |
apt-get upgrade -y | |
apt-get install -y --no-install-recommends curl wget ca-certificates git file squashfs-tools xz-utils diffutils patch make flex bison python3 bc bzip2 kmod rsync libelf-dev libssl-dev dwarves gcc jq | |
apt-get install -y linux-source | |
[ ${{ matrix.arch }} != x86 ] || apt-get install -y --no-install-recommends gcc-multilib `dpkg --get-selections | grep -m1 ^linux-config- | awk '{print $1}' | sed s/amd64/i386/` | |
curl https://raw.githubusercontent.com/puppylinux-woof-CE/initrd_progs/master/pkg/w_apps_static/w_apps/vercmp.c | gcc -x c -o /usr/local/bin/vercmp - | |
echo "dash dash/sh boolean false" | debconf-set-selections | |
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash | |
- name: Build kernel | |
run: | | |
cd kernel-kit | |
tar -xJf /usr/src/linux-source-*.tar.xz | |
cfg=`ls /usr/src/linux-config-*/${{ matrix.base }}` | |
xz -dc $cfg > /tmp/base | |
ver=`grep -Fm1 "Kernel Configuration" /tmp/base | cut -f 3 -d ' '` | |
mv -f linux-source-* linux-$ver | |
mkdir -p sources/kernels | |
tar -c linux-$ver | xz -1 > sources/kernels/linux-$ver.tar.xz | |
cd linux-$ver | |
./scripts/kconfig/merge_config.sh /tmp/base ../debian-diffconfigs/${{ matrix.release }} | |
mv -f .config ../configs_${{ matrix.arch }}/DOTconfig-$ver-${{ matrix.arch }} | |
apt-get autoremove -y linux-source | |
cd .. | |
rm -rf linux-$ver | |
md5sum sources/kernels/linux-$ver.tar.xz | sed s~sources/kernels/~~ > sources/kernels/linux-$ver.tar.xz.md5.txt | |
echo "DOTconfig_file=configs_${{ matrix.arch }}/DOTconfig-$ver-${{ matrix.arch }}" >> build.conf | |
echo "kernel_ver=$ver" >> build.conf | |
echo "package_name_suffix=kernel-kit" >> build.conf | |
echo "COMP=\"-comp zstd -Xcompression-level 19 -b 256K -no-exports -no-xattrs\"" >> build.conf | |
echo "fware=n" >> build.conf | |
echo "AUTO=yes" >> build.conf | |
echo "AUFS=no" >> build.conf | |
CREATE_KBUILD_SFS=yes ./build.sh | |
rm -rf kernel_sources-* | |
./usrmerge.sh | |
mkdir small-output | |
mv `ls output/kernel_sources-*.sfs* output/kbuild-*.sfs* output/*.tar* 2>/dev/null` small-output | |
rm -rf output | |
- name: Upload kernel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: kernel-kit-output-usrmerge-debian-${{ matrix.release }}-${{ matrix.arch }} | |
path: kernel-kit/small-output | |
retention-days: 16 |