Build #738
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: Build | |
# ========== TRIGGER ========== | |
on: | |
push: | |
branches: | |
- main # default branch name | |
- '*-build*' # Temporary build, no testing | |
- '*build-*' # Temporary build, no testing | |
- 'prerelease-*' # Prerelease build | |
- 'release-*' # Release build | |
- '*.check' | |
# Schedule run at midnight daily | |
schedule: | |
- cron: '0 0 * * *' | |
env: | |
DOWNLOAD: ".download" | |
UNPACKED: ".unpacked" | |
jobs: | |
build-ubuntu: | |
name: 'Build Ubuntu: ${{matrix.release.name}}-${{matrix.release.kernel}}-${{matrix.release.hwe}}' | |
runs-on: ubuntu-${{ matrix.release.name }} | |
timeout-minutes: 90 | |
env: | |
MIRROR: "https://mirrors.edge.kernel.org/ubuntu" | |
FLAVOUR: generic | |
MAKEFLAGS: "" | |
strategy: | |
matrix: | |
release: [ | |
{ "name": "24.04", "kernel": "6.8" }, | |
{ "name": "22.04", "kernel": "6.8", "hwe": "hwe" }, | |
{ "name": "22.04", "kernel": "5.15" }, | |
{ "name": "20.04", "kernel": "5.4" }, | |
{ "name": "20.04", "kernel": "5.15", "hwe": "hwe" }, | |
] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set HWE Environment (Ubuntu 22.04) | |
if: matrix.release.hwe != '' && matrix.release.name == '22.04' | |
env: | |
NAME: ${{ matrix.release.name }} | |
KERNEL_VERSION: ${{ matrix.release.kernel }} | |
run: | | |
MATCH="*~${NAME#*-}.[0-9]" | |
echo "MATCH=$MATCH" >> $GITHUB_ENV | |
echo "FLAVOUR_MATCH=*-${FLAVOUR}_${MATCH}" >> $GITHUB_ENV | |
echo "PKG_DIR=linux-hwe-${KERNEL_VERSION}" >> $GITHUB_ENV | |
- name: Set HWE Environment (Ubuntu 20.04) | |
if: matrix.release.hwe != '' && matrix.release.name == '20.04' | |
env: | |
NAME: ${{ matrix.release.name }} | |
KERNEL_VERSION: ${{ matrix.release.kernel }} | |
run: | | |
MATCH="${{ matrix.release.kernel }}.0-1[0-9][0-9]*~${NAME#*-}.[0-9]" | |
#MATCH="*~${NAME#*-}.[0-9]" | |
echo "MATCH=$MATCH" >> $GITHUB_ENV | |
echo "FLAVOUR_MATCH=*-${FLAVOUR}_${MATCH}" >> $GITHUB_ENV | |
echo "PKG_DIR=linux-hwe-${KERNEL_VERSION}" >> $GITHUB_ENV | |
- name: Set Non-HWE Environment | |
if: matrix.release.hwe == '' | |
env: | |
MATCH: ${{ matrix.release.kernel }}.0-* | |
REJECT: "*+[0-9][0-9].[0-9][0-9].[0-9]*" | |
run: | | |
echo "MATCH=$MATCH" >> $GITHUB_ENV | |
echo "REJECT=$REJECT" >> $GITHUB_ENV | |
echo "FLAVOUR_MATCH=${MATCH}-${FLAVOUR}_*" >> $GITHUB_ENV | |
echo "PKG_DIR=linux" >> $GITHUB_ENV | |
- name: Limit download range for 20.04 | |
if: matrix.release.hwe == '' && matrix.release.kernel == 5.4 | |
env: | |
MATCH: ${{ matrix.release.kernel }}.0-1[5-9][0-9]* | |
REJECT: "*+[0-9][0-9].[0-9][0-9].[0-9]*" | |
run: | | |
echo "MATCH=$MATCH" >> $GITHUB_ENV | |
echo "REJECT=$REJECT" >> $GITHUB_ENV | |
echo "FLAVOUR_MATCH=${MATCH}-${FLAVOUR}_*" >> $GITHUB_ENV | |
echo "PKG_DIR=linux" >> $GITHUB_ENV | |
- name: Limit download range for 22.04 | |
if: matrix.release.hwe == '' && matrix.release.kernel == 5.15 | |
env: | |
MATCH: ${{ matrix.release.kernel }}.0-1[0-9][0-9]* | |
REJECT: "*+[0-9][0-9].[0-9][0-9].[0-9]*" | |
run: | | |
echo "MATCH=$MATCH" >> $GITHUB_ENV | |
echo "REJECT=$REJECT" >> $GITHUB_ENV | |
echo "FLAVOUR_MATCH=${MATCH}-${FLAVOUR}_*" >> $GITHUB_ENV | |
echo "PKG_DIR=linux" >> $GITHUB_ENV | |
- name: Install dependencies 20.04 | |
if: matrix.release.name == '20.04' | |
run: sudo apt-get -q=2 install libelf-dev | |
- name: Install dependencies 22.04 | |
if: matrix.release.name == '22.04' | |
run: | | |
sudo apt-get -q=2 install libelf-dev gcc-12 | |
MAKEFLAGS="${{ env.MAKEFLAGS }} CC=gcc-12" | |
echo "MAKEFLAGS=$MAKEFLAGS" >> $GITHUB_ENV | |
- name: Download Kernel Headers | |
uses: ./.github/actions/download | |
with: | |
output-path: ${{ env.DOWNLOAD }} | |
url: "${{ env.MIRROR }}/pool/main/l/${{ env.PKG_DIR }}" | |
accept: "linux-headers-${{ env.MATCH }}_all.deb,linux-hwe*-headers-${{ env.MATCH }}_all.deb,linux-headers-${{ env.FLAVOUR_MATCH }}_amd64.deb" | |
reject: "${{ env.REJECT }}" | |
- name: Unpack Kernel Headers | |
uses: ./.github/actions/unpack-deb | |
with: | |
input-path: ${{ env.DOWNLOAD }} | |
output-path: ${{ env.UNPACKED }} | |
- name: Build Ubuntu | |
uses: ./.github/actions/build | |
with: | |
search-path: "${{ env.UNPACKED }}/usr/src" | |
search-pattern: "*-${{ env.FLAVOUR }}" | |
build-centos: | |
name: 'Build-CentOS: ${{matrix.release.name}}' | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 90 | |
env: | |
KVER: "*" | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
strategy: | |
matrix: | |
release: [ | |
# CentOS | |
{ "name": "7.0.1406", "container": "centos:7.9.2009" }, | |
{ "name": "7.1.1503", "container": "centos:7.9.2009" }, | |
{ "name": "7.2.1511", "container": "centos:7.9.2009" }, | |
{ "name": "7.3.1611", "container": "centos:7.9.2009" }, | |
{ "name": "7.4.1708", "container": "centos:7.9.2009" }, | |
{ "name": "7.5.1804", "container": "centos:7.9.2009" }, | |
{ "name": "7.6.1810", "container": "centos:7.9.2009" }, | |
{ "name": "7.7.1908", "container": "centos:7.9.2009" }, | |
{ "name": "7.8.2003", "container": "centos:7.9.2009" }, | |
{ "name": "7.9.2009", "container": "centos:7.9.2009" }, | |
{ "name": "8.0.1905", "container": "rockylinux:8.5" }, | |
{ "name": "8.1.1911", "container": "rockylinux:8.5" }, | |
{ "name": "8.2.2004", "container": "rockylinux:8.5" }, | |
{ "name": "8.3.2011", "container": "rockylinux:8.5" }, | |
{ "name": "8.4.2105", "container": "rockylinux:8.5" }, | |
{ "name": "8.5.2111", "container": "rockylinux:8.5" }, | |
{ "name": "8.6", "container": "rockylinux:8.5" }, | |
{ "name": "8.7", "container": "rockylinux:8.5" }, | |
{ "name": "8.8", "container": "rockylinux:8.5" }, | |
{ "name": "8.9", "container": "rockylinux:8.5" }, | |
{ "name": "8.10", "container": "rockylinux:8.5" }, | |
{ "name": "8-stream", "container": "rockylinux:8.5" }, | |
{ "name": "9.0", "container": "rockylinux:9.0" }, | |
{ "name": "9.1", "container": "rockylinux:9.0" }, | |
{ "name": "9.2", "container": "rockylinux:9.0" }, | |
{ "name": "9.3", "container": "rockylinux:9.0" }, | |
{ "name": "9.4", "container": "rockylinux:9.0" }, | |
{ "name": "9-stream", "container": "rockylinux:9.0" }, | |
] | |
container: | |
image: ${{ matrix.release.container }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set Download Environment | |
env: | |
RELEASE_NAME: ${{ matrix.release.name }} | |
run: | | |
case $RELEASE_NAME in | |
7.[0-9].*|8.[0-5].*|8-stream) MIRROR="vault.centos.org" ;; | |
8.[6-9]) MIRROR="dl.rockylinux.org/vault/rocky" ;; | |
8.10) MIRROR="dl.rockylinux.org/pub/rocky" ;; | |
9.[0-3]) MIRROR="dl.rockylinux.org/vault/rocky" ;; | |
9.[4-9]) MIRROR="dl.rockylinux.org/pub/rocky" ;; | |
9-*) MIRROR="mirror.stream.centos.org" ;; | |
*) MIRROR="mirror.centos.org/centos" ;; | |
esac | |
case $RELEASE_NAME in | |
7.*) OS_DIR1="os" | |
OS_DIR2="" | |
;; | |
8*) OS_DIR1="BaseOS" | |
OS_DIR2="os" | |
;; | |
9*) OS_DIR1="AppStream" | |
OS_DIR2="os" | |
;; | |
esac | |
case $RELEASE_NAME in | |
9.*) OS_PATH="$MIRROR/$RELEASE_NAME/$OS_DIR1/x86_64/$OS_DIR2/Packages/k/" | |
;; | |
8.[6-9]) OS_PATH="$MIRROR/$RELEASE_NAME/$OS_DIR1/x86_64/$OS_DIR2/Packages/k/" | |
;; | |
8.1[0-9]) OS_PATH="$MIRROR/$RELEASE_NAME/$OS_DIR1/x86_64/$OS_DIR2/Packages/k/" | |
;; | |
*) OS_PATH="$MIRROR/$RELEASE_NAME/$OS_DIR1/x86_64/$OS_DIR2/Packages/" | |
esac | |
UPDATE_PATH="$MIRROR/$RELEASE_NAME/updates/x86_64/$OS_DIR2/Packages/" | |
echo "OS_PATH=$OS_PATH" >> $GITHUB_ENV | |
echo "UPDATE_PATH=$UPDATE_PATH" >> $GITHUB_ENV | |
- name: Cache OS Kernel Header Packages | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-os-headers | |
with: | |
path: ${{ env.DOWNLOAD }}/${{ env.OS_PATH }} | |
key: ${{ env.cache-name }}-${{ matrix.release.name }}-v1 | |
- name: Cache Update Kernel Header Packages | |
if: startsWith(matrix.release.name, '7') | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-update-headers | |
with: | |
path: ${{ env.DOWNLOAD }}/${{ env.UPDATE_PATH }} | |
key: ${{ env.cache-name }}-${{ matrix.release.name }}-v1 | |
- name: Fixup mirror for CentOS7 - Point to vault after EOL | |
if: startsWith(matrix.release.name, '7') | |
run: | | |
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* | |
sed -i 's|#.*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* | |
- name: Install Dependencies | |
run: yum -q -y install cpio elfutils-libelf-devel findutils gcc make wget ca-certificates | |
- name: Filter CentOS stream 8 kernel | |
if: startsWith(matrix.release.name, '8-stream') | |
run: | | |
KVER=$(curl -s "http://${{ env.OS_PATH }}/" | \ | |
sed -En 's/.*kernel-devel-(4.18.0-[0-9].*).el8.*rpm.*/\1/p' | \ | |
tail -n 1) | |
echo $KVER | |
echo "KVER=${KVER}*" >> $GITHUB_ENV | |
- name: Filter CentOS stream 9 and RHEL 9 kernels | |
if: startsWith(matrix.release.name, '9') | |
run: | | |
KVER=$(curl -s "http://${{ env.OS_PATH }}/" | \ | |
sed -En 's/.*kernel-devel-(5.14.0-[0-9].*).el9*rpm.*/\1/p' | \ | |
tail -n 1) | |
echo $KVER | |
echo "KVER=${KVER}*" >> $GITHUB_ENV | |
- name: Download OS Kernel Header Packages | |
uses: ./.github/actions/download | |
with: | |
output-path: ${{ env.DOWNLOAD }} | |
url: "http://${{ env.OS_PATH }}" | |
accept: "kernel-devel-${{ env.KVER }}.rpm" | |
- name: Download Update Kernel Header Packages | |
if: startsWith(matrix.release.name, '7') | |
uses: ./.github/actions/download | |
with: | |
output-path: ${{ env.DOWNLOAD }} | |
url: "http://${{ env.UPDATE_PATH }}" | |
accept: "kernel-devel-${{ env.KVER }}.rpm" | |
- name: Unpack Kernel Headers | |
uses: ./.github/actions/unpack-rpm | |
with: | |
input-path: ${{ env.DOWNLOAD }} | |
output-path: ${{ env.UNPACKED }} | |
- name: Build | |
uses: ./.github/actions/build | |
with: | |
search-path: "${{ env.UNPACKED }}/usr/src/kernels" | |
build-upstream-ubuntu: | |
name: 'Build-Upstream: ${{matrix.release.name}}' | |
runs-on: ubuntu-${{ matrix.release.runs-on }} | |
timeout-minutes: 20 | |
env: | |
CDN: "cdn.kernel.org/pub/linux/kernel" | |
GITWEB: "git.kernel.org" | |
KERNEL_TARGET: "bindeb-pkg" | |
strategy: | |
matrix: | |
release: [ | |
{ name: "net-next", runs-on: "20.04", }, | |
{ name: "net", runs-on: "20.04", }, | |
{ name: "6.11", runs-on: "20.04", }, | |
{ name: "6.10", runs-on: "20.04", }, | |
{ name: "6.9", runs-on: "20.04", }, | |
{ name: "6.8", runs-on: "20.04", }, | |
{ name: "6.7", runs-on: "20.04", }, | |
{ name: "6.6", runs-on: "20.04", }, | |
{ name: "6.5", runs-on: "20.04", }, | |
{ name: "6.4", runs-on: "20.04", }, | |
{ name: "6.3", runs-on: "20.04", }, | |
{ name: "6.2", runs-on: "20.04", }, | |
{ name: "6.1", runs-on: "20.04", }, | |
{ name: "6.0", runs-on: "20.04", }, | |
{ name: "5.19", runs-on: "20.04", }, | |
{ name: "5.18", runs-on: "20.04", }, | |
{ name: "5.17", runs-on: "20.04", }, | |
{ name: "5.16", runs-on: "20.04", }, | |
{ name: "5.15", runs-on: "20.04", }, | |
{ name: "5.14", runs-on: "20.04", }, | |
{ name: "5.13", runs-on: "20.04", }, | |
{ name: "5.12", runs-on: "20.04", }, | |
{ name: "5.11", runs-on: "20.04", }, | |
{ name: "5.10", runs-on: "20.04", }, | |
{ name: "5.9", runs-on: "20.04", }, | |
{ name: "5.8", runs-on: "20.04", }, | |
{ name: "5.7", runs-on: "20.04", }, | |
{ name: "5.6", runs-on: "20.04", }, | |
{ name: "5.5", runs-on: "20.04", }, | |
{ name: "5.4", runs-on: "20.04", }, | |
{ name: "5.3", runs-on: "20.04", }, | |
] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set Environment (Release) | |
if: startsWith(matrix.release.name, 'net') != true | |
run: | | |
RELEASE="${{ matrix.release.name }}" | |
MAJOR="${RELEASE%.*}" | |
DIR="linux-$RELEASE" | |
echo "CACHE_ID=$RELEASE" >> $GITHUB_ENV | |
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV | |
echo "KERNEL_DIR=$UNPACKED/$DIR" >> $GITHUB_ENV | |
echo "REMOTE=$CDN/v$MAJOR.x/$DIR.tar.xz" >> $GITHUB_ENV | |
echo "TAR_FLAGS=-J" >> $GITHUB_ENV | |
- name: Set Environment (Development Tree) | |
if: startsWith(matrix.release.name, 'net') | |
run: | | |
TREE="${{ matrix.release.name }}" | |
COMMIT_ID="$(wget -q -O - https://$GITWEB/netdev/$TREE/p/main | sed -En 's/[^ ]* //; T; s/(.{12}).*/\1/; p; q')" | |
DIR="$TREE-main" | |
echo "REMOTE=$GITWEB/pub/scm/linux/kernel/git/netdev/$TREE.git/snapshot/$DIR.tar.gz" >> $GITHUB_ENV | |
echo "CACHE_ID=$COMMIT_ID" >> $GITHUB_ENV | |
echo "KERNEL_DIR=$UNPACKED/$DIR" >> $GITHUB_ENV | |
echo "TAR_FLAGS=-z" >> $GITHUB_ENV | |
- name: Cache Kernel Header Package | |
uses: actions/cache@v3 | |
id: header-cache | |
env: | |
cache-name: cache-headers-upstream | |
with: | |
path: ${{ env.UNPACKED }}/linux-headers-*.deb | |
# Need invalidate the cache when local_defconfig changes. | |
key: ${{ env.cache-name }}-${{ env.CACHE_ID }}-on-ubuntu-${{ hashFiles('./.github/data/local_defconfig') }} | |
- name: Set Environment (Not Cached) | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
run: | | |
EXTRA_DEP+=" libelf-dev" | |
EXTRA_DEP+=" debhelper" | |
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV | |
- name: Install Dependencies | |
if: env.EXTRA_DEP != '' | |
run: sudo apt-get -q=2 install ${{ env.EXTRA_DEP }} | |
- name: Download Kernel Source | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
uses: ./.github/actions/download | |
with: | |
output-path: "$DOWNLOAD" | |
url: "https://$REMOTE" | |
- name: Unpack Kernel Source | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p "$UNPACKED" | |
tar -C "$UNPACKED" "$TAR_FLAGS" -xf "$DOWNLOAD/$REMOTE" | |
- name: Configure Kernel | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
run: | | |
cp -p .github/data/local_defconfig "$KERNEL_DIR/arch/x86/configs/" | |
make -s -C "$KERNEL_DIR" local_defconfig | |
- name: Build Kernel Packages | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
run: | | |
make -s -j"$(nproc)" -C "$KERNEL_DIR" "$KERNEL_TARGET" | |
- name: List Kernel Header Packages | |
run: | | |
ls "$UNPACKED"/linux-headers-*.deb | |
- name: Unpack Kernel Headers | |
uses: ./.github/actions/unpack-deb | |
with: | |
input-path: ${{ env.UNPACKED }} | |
output-path: ${{ env.UNPACKED }} | |
- name: Build | |
uses: ./.github/actions/build | |
with: | |
search-path: "${{ env.UNPACKED }}/usr/src" | |
build-upstream-ubuntu-container: | |
name: 'Build-Upstream-Old: ${{matrix.release}}' | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 20 | |
env: | |
CDN: "cdn.kernel.org/pub/linux/kernel" | |
KERNEL_TARGET: "deb-pkg" | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
strategy: | |
matrix: | |
release: [ | |
"5.2", | |
"5.1", | |
"5.0", | |
"4.20", | |
"4.19", | |
"4.18", | |
"4.17", | |
"4.16", | |
"4.15", | |
"4.14", | |
"4.13", | |
"4.12", | |
"4.11", | |
] | |
container: | |
image: ubuntu:18.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set Environment (Release) | |
run: | | |
RELEASE="${{ matrix.release }}" | |
EXTRA_DEP="wget libelf-dev xz-utils make gcc flex bison bc libssl-dev dpkg-dev kmod cpio" | |
MAJOR="${RELEASE%.*}" | |
DIR="linux-$RELEASE" | |
echo "CACHE_ID=$RELEASE" >> $GITHUB_ENV | |
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV | |
echo "KERNEL_DIR=$UNPACKED/$DIR" >> $GITHUB_ENV | |
echo "REMOTE=$CDN/v$MAJOR.x/$DIR.tar.xz" >> $GITHUB_ENV | |
echo "TAR_FLAGS=-J" >> $GITHUB_ENV | |
- name: Cache Kernel Header Package | |
uses: actions/cache@v3 | |
id: header-cache | |
env: | |
cache-name: cache-headers-upstream | |
with: | |
path: ${{ env.UNPACKED }}/linux-headers-*.deb | |
# Need invalidate the cache when local_defconfig changes. | |
key: ${{ env.cache-name }}-${{ env.CACHE_ID }}-on-ubuntu-${{ hashFiles('./.github/data/local_defconfig') }} | |
- name: Install Dependencies | |
run: | | |
apt-get update | |
apt-get -q=2 install ${{ env.EXTRA_DEP }} | |
- name: Download Kernel Source | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
uses: ./.github/actions/download | |
with: | |
output-path: "$DOWNLOAD" | |
url: "https://$REMOTE" | |
- name: Unpack Kernel Source | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p "$UNPACKED" | |
tar -C "$UNPACKED" "$TAR_FLAGS" -xf "$DOWNLOAD/$REMOTE" | |
- name: Configure Kernel | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
run: | | |
cp -p .github/data/local_defconfig "$KERNEL_DIR/arch/x86/configs/" | |
make -s -C "$KERNEL_DIR" local_defconfig | |
- name: Build Kernel Packages | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
run: | | |
make -s -j"$(nproc)" -C "$KERNEL_DIR" "$KERNEL_TARGET" | |
- name: List Kernel Header Packages | |
run: | | |
ls "$UNPACKED"/linux-headers-*.deb | |
- name: Unpack Kernel Headers | |
uses: ./.github/actions/unpack-deb | |
with: | |
input-path: ${{ env.UNPACKED }} | |
output-path: ${{ env.UNPACKED }} | |
- name: Build | |
uses: ./.github/actions/build | |
with: | |
search-path: "${{ env.UNPACKED }}/usr/src" | |
build-upstream-centos-container: | |
name: 'Build-Really-Old: ${{matrix.release}}' | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 20 | |
env: | |
CDN: "cdn.kernel.org/pub/linux/kernel" | |
KERNEL_TARGET: "" | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
strategy: | |
matrix: | |
release: [ | |
"4.10", | |
"4.9", | |
"4.8", | |
"4.7", | |
"4.6", | |
"4.5", | |
"4.4", | |
"4.3", | |
"4.2", | |
"4.1", | |
"4.0", | |
"3.19", | |
"3.18", | |
"3.17", | |
"3.16", | |
"3.15", | |
"3.14", | |
"3.13", | |
"3.12", | |
"3.11", | |
"3.10", | |
"3.9", | |
"3.8", | |
] | |
container: | |
image: centos:7.5.1804 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set Environment (Release) | |
run: | | |
RELEASE="${{ matrix.release }}" | |
EXTRA_DEP+=" elfutils-libelf-devel" | |
EXTRA_DEP+=" gcc" | |
EXTRA_DEP+=" make" | |
EXTRA_DEP+=" wget" | |
EXTRA_DEP+=" rpm-build" | |
EXTRA_DEP+=" perl" | |
EXTRA_DEP+=" perl-devel" | |
EXTRA_DEP+=" bc" | |
EXTRA_DEP+=" ca-certificates" | |
MAJOR="${RELEASE%.*}" | |
DIR="linux-$RELEASE" | |
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV | |
echo "KERNEL_DIR=$UNPACKED/$DIR" >> $GITHUB_ENV | |
echo "REMOTE=$CDN/v$MAJOR.x/$DIR.tar.xz" >> $GITHUB_ENV | |
echo "TAR_FLAGS=-J" >> $GITHUB_ENV | |
- name: Fixup mirror for CentOS7 - Point to vault after EOL | |
run: | | |
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* | |
sed -i 's|#.*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* | |
- name: Install Dependencies | |
if: env.EXTRA_DEP != '' | |
run: yum -qy install ${{ env.EXTRA_DEP }} | |
- name: Download Kernel Source | |
uses: ./.github/actions/download | |
with: | |
output-path: "$DOWNLOAD" | |
url: "https://$REMOTE" | |
- name: Unpack Kernel Source | |
run: | | |
mkdir -p "$UNPACKED" | |
tar -C "$UNPACKED" "$TAR_FLAGS" -xf "$DOWNLOAD/$REMOTE" | |
- name: Patch Kernel Source | |
if: matrix.release.name == '3.8' | |
run: | | |
sed -i 's/if (!defined(@val))/if (!(@val))/' \ | |
"$KERNEL_DIR/kernel/timeconst.pl" | |
- name: Configure Kernel | |
run: | | |
cp -p .github/data/local_defconfig "$KERNEL_DIR/arch/x86/configs/" | |
make -s -C "$KERNEL_DIR" local_defconfig | |
- name: Build Kernel Packages | |
run: | | |
make -s -j $(nproc) -C "$KERNEL_DIR" | |
- name: Build | |
uses: ./.github/actions/build | |
with: | |
search-path: "$KERNEL_DIR/../" | |
search-pattern: "*${{ matrix.release.name }}*" |