919c62f72e
This change disables ccache for the CI pipeline since the code base changes so much between workflow instantiations that ccache becomes ineffective.
79 lines
2.6 KiB
YAML
79 lines
2.6 KiB
YAML
name: Kernel Release
|
|
|
|
on:
|
|
push:
|
|
tags: v*
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: [self-hosted, build]
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- build_type: 'generic'
|
|
build_cc: gcc-10
|
|
build_cflags: '-O3 -Wno-error=maybe-uninitialized'
|
|
- build_type: zen2
|
|
build_cc: gcc-10
|
|
build_cflags: '-O3 -march=znver2 -Wno-error=maybe-uninitialized'
|
|
- build_type: cascadelake
|
|
build_cc: gcc-10
|
|
build_cflags: '-O3 -march=cascadelake -Wno-error=maybe-uninitialized'
|
|
steps:
|
|
- name: Checkout Sources
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- name: Build Kernel
|
|
run: make
|
|
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:
|
|
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.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
|
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
|
|
artifacts/debs-*/pve-edge-kernel-*.deb
|
|
|