c63bdfa130
This change updates the build pipeline to build the kernel with the default GCC version on Debian Buster. This is more safe for people running custom kernel modules.
82 lines
No EOL
2.6 KiB
YAML
82 lines
No EOL
2.6 KiB
YAML
name: Kernel Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
- flavor/*/v*
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: [self-hosted, build]
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- build_profile: 'generic'
|
|
build_cc: gcc
|
|
build_cflags: ''
|
|
steps:
|
|
- name: Clean Workspace
|
|
run: rm -rf *.deb *.ddeb *.build *.buildinfo *.changes
|
|
- name: Checkout Sources
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
path: pve-edge-kernel
|
|
- name: Clean Repository
|
|
run: git -C pve-edge-kernel submodule foreach git clean -ffdx
|
|
- name: Build Kernel
|
|
run: |
|
|
cd pve-edge-kernel
|
|
debian/rules debian/control
|
|
if [ "$PVE_BUILD_PROFILE" != "generic" ]; then
|
|
debchange -l +$PVE_BUILD_PROFILE -D edge --force-distribution -U -M "Specialization for $PVE_BUILD_PROFILE"
|
|
fi
|
|
debuild -e PVE* -e CCACHE_DIR=/var/cache/ccache --prepend-path=/usr/lib/ccache --jobs=auto -b -uc -us
|
|
env:
|
|
PVE_BUILD_PROFILE: ${{ matrix.build_type }}
|
|
PVE_KERNEL_CC: ${{ matrix.build_cc }}
|
|
PVE_KERNEL_CFLAGS: ${{ matrix.build_cflags }}
|
|
PVE_ZFS_CC: ${{ matrix.build_cc }}
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v2-preview
|
|
with:
|
|
name: debs-${{ matrix.build_type }}
|
|
path: "*.deb"
|
|
publish:
|
|
name: Publish
|
|
runs-on: [self-hosted]
|
|
needs: build
|
|
steps:
|
|
- name: Checkout Sources
|
|
uses: actions/checkout@v2
|
|
- name: Download Artifacts
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: artifacts
|
|
- name: Display structure of downloaded files
|
|
run: ls -R artifacts
|
|
- name: Format Release Name
|
|
id: format_release
|
|
run: |
|
|
ref="${{ github.ref}}"
|
|
release_name=${ref#"refs/tags/"}
|
|
echo "::set-output name=release::$release_name"
|
|
changelog=$(dpkg-parsechangelog -c 1 -l debian/changelog)
|
|
changelog="${changelog//'%'/'%25'}"
|
|
changelog="${changelog//$'\n'/'%0A'}"
|
|
changelog="${changelog//$'\r'/'%0D'}"
|
|
echo "::set-output name=changelog::$changelog"
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
|
with:
|
|
name: pve-edge-kernel ${{ steps.format_release.outputs.release }}
|
|
body: ${{ steps.format_release.outputs.changelog }}
|
|
files: |
|
|
artifacts/debs-generic/pve-headers-*.deb
|
|
artifacts/debs-generic/linux-tools-*.deb
|
|
artifacts/debs-generic/pve-kernel-libc-*.deb
|
|
artifacts/debs-*/pve-kernel-*.deb |