2020-04-29 10:08:37 +00:00
|
|
|
name: Kernel Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-09-18 10:54:40 +00:00
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
- flavor/*/v*
|
2020-04-29 10:08:37 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-09-16 20:24:33 +00:00
|
|
|
name: Build
|
2020-04-29 10:08:37 +00:00
|
|
|
runs-on: [self-hosted, build]
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- build_type: 'generic'
|
|
|
|
build_cc: gcc-10
|
2020-08-09 10:12:59 +00:00
|
|
|
build_cflags: ''
|
2020-04-29 10:08:37 +00:00
|
|
|
- build_type: zen2
|
|
|
|
build_cc: gcc-10
|
2020-08-09 10:12:59 +00:00
|
|
|
build_cflags: '-march=znver2'
|
2020-04-29 10:08:37 +00:00
|
|
|
- build_type: cascadelake
|
|
|
|
build_cc: gcc-10
|
2020-08-09 10:12:59 +00:00
|
|
|
build_cflags: '-march=cascadelake'
|
2020-04-29 10:08:37 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Sources
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Build Kernel
|
2020-07-12 12:25:48 +00:00
|
|
|
run: make
|
2020-04-29 10:08:37 +00:00
|
|
|
env:
|
|
|
|
PVE_BUILD_TYPE: ${{ matrix.build_type }}
|
|
|
|
PVE_BUILD_CC: ${{ matrix.build_cc }}
|
|
|
|
PVE_BUILD_CFLAGS: ${{ matrix.build_cflags }}
|
|
|
|
- name: Read Build Information
|
|
|
|
id: read_build_info
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=release::$(sed '1q;d' release.txt)"
|
|
|
|
echo "::set-output name=dst::$(sed '1q;d' artifacts.txt)"
|
|
|
|
echo "::set-output name=hdr::$(sed '2q;d' artifacts.txt)"
|
|
|
|
echo "::set-output name=tools::$(sed '3q;d' artifacts.txt)"
|
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v2-preview
|
|
|
|
with:
|
|
|
|
name: debs-${{ matrix.build_type }}
|
|
|
|
path: "*.deb"
|
|
|
|
publish:
|
2020-09-16 20:24:33 +00:00
|
|
|
name: Publish
|
2020-04-29 10:08:37 +00:00
|
|
|
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:
|
2020-09-16 20:24:33 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-04-29 10:08:37 +00:00
|
|
|
with:
|
|
|
|
name: pve-edge-kernel ${{ steps.format_release.outputs.release }}
|
|
|
|
body: ${{ steps.format_release.outputs.changelog }}
|
|
|
|
files: |
|
|
|
|
artifacts/debs-generic/pve-edge-headers-*.deb
|
|
|
|
artifacts/debs-generic/linux-tools-*.deb
|
2020-08-08 13:00:20 +00:00
|
|
|
artifacts/debs-generic/pve-kernel-libc-*.deb
|
2020-04-29 10:08:37 +00:00
|
|
|
artifacts/debs-*/pve-edge-kernel-*.deb
|
|
|
|
|