Build #811
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", "container": "ubuntu:24.04" }, | |
{ "name": "22.04", "kernel": "6.8", "container": "ubuntu:22.04", "hwe": "hwe" }, | |
{ "name": "22.04", "kernel": "5.15", "container": "ubuntu:22.04" }, | |
{ "name": "20.04", "kernel": "5.4", "container": "ubuntu:20.04" }, | |
{ "name": "20.04", "kernel": "5.15", "container": "ubuntu:20.04", "hwe": "hwe" }, | |
] | |
steps: | |
- name: Stop all previous docker containers | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true | |
- name: Set up docker environment | |
run: | | |
docker pull ${{ matrix.release.container }} | |
docker run -d \ | |
--name ci_drv_container \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /mnt/cloud:/mnt/cloud \ | |
-v /mnt/local:/mnt/local \ | |
-v /tmp/ccache:/tmp/ccache \ | |
-v /home/${USER}:/home/${USER} \ | |
-e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true \ | |
--workdir ${{ github.workspace }} \ | |
--entrypoint tail \ | |
${{ matrix.release.container }} -f /dev/null | |
- name: Set Environment (package dependencies) | |
run: | | |
EXTRA_DEP+=" libelf-dev" | |
EXTRA_DEP+=" gcc" | |
EXTRA_DEP+=" make" | |
EXTRA_DEP+=" wget" | |
EXTRA_DEP+=" perl" | |
EXTRA_DEP+=" libperl-dev" | |
EXTRA_DEP+=" bc" | |
EXTRA_DEP+=" ca-certificates" | |
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV | |
- name: Install Dependencies | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get -q=2 install ${{ env.EXTRA_DEP }} | |
- 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' | |
shell: docker exec ci_drv_container bash {0} | |
run: apt-get -q=2 install libelf-dev | |
- name: Install dependencies 22.04 | |
if: matrix.release.name == '22.04' | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
apt-get -q=2 install libelf-dev gcc-12 | |
- name: Set gcc-12 Environment (Ubuntu 22.04) | |
if: matrix.release.name == '22.04' | |
run: | | |
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 }}" | |
- name: Stop docker container environment | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true | |
build-centos: | |
name: 'Build-CentOS: ${{matrix.release.name}}' | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 90 | |
env: | |
KVER: "*" | |
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.5", "container": "rockylinux:9.0" }, | |
{ "name": "9-stream", "container": "rockylinux:9.0" }, | |
] | |
steps: | |
- name: Stop all previous docker containers | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true | |
- name: Set up docker environment | |
run: | | |
docker pull ${{ matrix.release.container }} | |
docker run -d \ | |
--name ci_drv_container \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /mnt/cloud:/mnt/cloud \ | |
-v /mnt/local:/mnt/local \ | |
-v /tmp/ccache:/tmp/ccache \ | |
-v /home/${USER}:/home/${USER} \ | |
-e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true \ | |
--workdir ${{ github.workspace }} \ | |
--entrypoint tail \ | |
${{ matrix.release.container }} -f /dev/null | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set Download Environment | |
env: | |
RELEASE_NAME: ${{ matrix.release.name }} | |
shell: bash | |
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-4]) MIRROR="dl.rockylinux.org/vault/rocky" ;; | |
9.[5-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') | |
shell: docker exec ci_drv_container bash {0} | |
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 | |
shell: docker exec ci_drv_container bash {0} | |
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') | |
shell: bash | |
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') | |
shell: bash | |
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" | |
- name: Stop docker container environment | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true | |
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.12", 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: Stop all previous docker containers | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true | |
- name: Set up docker environment | |
run: | | |
docker pull ubuntu:20.04 | |
docker run -d \ | |
--name ci_drv_container \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /mnt/cloud:/mnt/cloud \ | |
-v /mnt/local:/mnt/local \ | |
-v /tmp/ccache:/tmp/ccache \ | |
-v /home/${USER}:/home/${USER} \ | |
-e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true \ | |
--workdir ${{ github.workspace }} \ | |
--entrypoint tail \ | |
ubuntu:20.04 -f /dev/null | |
- 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=kernel.googlesource.com/pub/scm/linux/kernel/git/netdev/$TREE/+archive/refs/heads/main.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 packages to install | |
run: | | |
EXTRA_DEP+=" bc" | |
EXTRA_DEP+=" bison" | |
EXTRA_DEP+=" build-essential" | |
EXTRA_DEP+=" ca-certificates" | |
EXTRA_DEP+=" cpio" | |
EXTRA_DEP+=" debhelper" | |
EXTRA_DEP+=" dwarves" | |
EXTRA_DEP+=" flex" | |
EXTRA_DEP+=" gcc" | |
EXTRA_DEP+=" kmod" | |
EXTRA_DEP+=" libelf-dev" | |
EXTRA_DEP+=" libncurses-dev" | |
EXTRA_DEP+=" libperl-dev" | |
EXTRA_DEP+=" libssl-dev" | |
EXTRA_DEP+=" make" | |
EXTRA_DEP+=" perl" | |
EXTRA_DEP+=" python3" | |
EXTRA_DEP+=" rsync" | |
EXTRA_DEP+=" wget" | |
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV | |
- name: Install Dependencies | |
if: env.EXTRA_DEP != '' | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive 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: "${{ env.DOWNLOAD }}" | |
url: "https://${{ env.REMOTE }}" | |
- name: Unpack Kernel Source | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
run: | | |
case "${{ matrix.release.name }}" in | |
"net"*) | |
mkdir -p "${{ env.KERNEL_DIR }}"; | |
tar -C "${{ env.KERNEL_DIR }}" "${{ env.TAR_FLAGS }}" -xf "${{ env.DOWNLOAD }}/${{ env.REMOTE }}";; | |
*) | |
mkdir -p "${{ env.UNPACKED }}"; | |
tar -C "${{ env.UNPACKED }}" "${{ env.TAR_FLAGS }}" -xf "${{ env.DOWNLOAD }}/${{ env.REMOTE }}";; | |
esac | |
- name: Configure Kernel | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
cp -p .github/data/local_defconfig "${{env.KERNEL_DIR}}/arch/x86/configs/" | |
make -s -C "${{ env.KERNEL_DIR }}" local_defconfig | |
- name: Build Kernel Packages | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
make -s -j $(nproc) -C ${{ env.KERNEL_DIR }} ${{ env.KERNEL_TARGET }} | |
- name: List Kernel Header Packages | |
run: | | |
ls "${{ env.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" | |
- name: Stop docker container environment | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true | |
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" | |
EXTRA_DEP: "" | |
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", | |
] | |
steps: | |
- name: Stop all previous docker containers | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true | |
- name: Set up docker environment | |
run: | | |
docker pull ubuntu:18.04 | |
docker run -d \ | |
--name ci_drv_container \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /mnt/cloud:/mnt/cloud \ | |
-v /mnt/local:/mnt/local \ | |
-v /tmp/ccache:/tmp/ccache \ | |
-v /home/${USER}:/home/${USER} \ | |
-e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true \ | |
--workdir ${{ github.workspace }} \ | |
--entrypoint tail \ | |
ubuntu:18.04 -f /dev/null | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set Environment (Release) | |
shell: bash | |
run: | | |
RELEASE="${{ matrix.release }}" | |
MAJOR="${RELEASE%.*}" | |
DIR="linux-$RELEASE" | |
EXTRA_DEP+=" bc" | |
EXTRA_DEP+=" bison" | |
EXTRA_DEP+=" build-essential" | |
EXTRA_DEP+=" ca-certificates" | |
EXTRA_DEP+=" cpio" | |
EXTRA_DEP+=" debhelper" | |
EXTRA_DEP+=" dpkg-dev" | |
EXTRA_DEP+=" dwarves" | |
EXTRA_DEP+=" flex" | |
EXTRA_DEP+=" gcc" | |
EXTRA_DEP+=" kmod" | |
EXTRA_DEP+=" libelf-dev" | |
EXTRA_DEP+=" libncurses-dev" | |
EXTRA_DEP+=" libperl-dev" | |
EXTRA_DEP+=" libssl-dev" | |
EXTRA_DEP+=" make" | |
EXTRA_DEP+=" perl" | |
EXTRA_DEP+=" rsync" | |
EXTRA_DEP+=" wget" | |
EXTRA_DEP+=" xz-utils" | |
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 | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive 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: "${{ env.DOWNLOAD }}" | |
url: "https://${{ env.REMOTE }}" | |
- name: Unpack Kernel Source | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
mkdir -p "${{ env.UNPACKED }}" | |
tar -C "${{ env.UNPACKED }}" "${{ env.TAR_FLAGS }}" -xf "${{ env.DOWNLOAD }}/${{ env.REMOTE }}" | |
- name: Configure Kernel | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
cp -p .github/data/local_defconfig "${{ env.KERNEL_DIR }}/arch/x86/configs/" | |
make -s -C "${{ env.KERNEL_DIR }}" local_defconfig | |
- name: Build Kernel Packages | |
if: steps.header-cache.outputs.cache-hit != 'true' | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
make -s -j $(nproc) -C "${{ env.KERNEL_DIR }}" "${{ env.KERNEL_TARGET}}" | |
- name: List Kernel Header Packages | |
shell: bash | |
run: | | |
ls "${{ env.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" | |
- name: Stop docker container environment | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true | |
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: "" | |
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", | |
] | |
steps: | |
- name: Stop all previous docker containers | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true | |
- name: Set up docker environment | |
run: | | |
docker pull centos:7.5.1804 | |
docker run -d \ | |
--name ci_drv_container \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /mnt/cloud:/mnt/cloud \ | |
-v /mnt/local:/mnt/local \ | |
-v /tmp/ccache:/tmp/ccache \ | |
-v /home/${USER}:/home/${USER} \ | |
-e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true \ | |
--workdir ${{ github.workspace }} \ | |
--entrypoint tail \ | |
centos:7.5.1804 -f /dev/null | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set Environment (Release) | |
shell: bash | |
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 | |
shell: docker exec ci_drv_container bash {0} | |
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 | |
shell: docker exec ci_drv_container bash {0} | |
run: yum -qy install ${{ env.EXTRA_DEP }} | |
- name: Download Kernel Source | |
uses: ./.github/actions/download | |
with: | |
output-path: "${{ env.DOWNLOAD }}" | |
url: "https://${{ env.REMOTE }}" | |
- name: Unpack Kernel Source | |
shell: bash | |
run: | | |
mkdir -p "${{ env.UNPACKED }}" | |
tar -C "${{ env.UNPACKED }}" "${{ env.TAR_FLAGS }}" -xf "${{ env.DOWNLOAD }}/${{ env.REMOTE }}" | |
- name: Patch Kernel Source | |
if: matrix.release.name == '3.8' | |
shell: bash | |
run: | | |
sed -i 's/if (!defined(@val))/if (!(@val))/' \ | |
"${{ env.KERNEL_DIR }}/kernel/timeconst.pl" | |
- name: Configure Kernel | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
cp -p .github/data/local_defconfig "${{ env.KERNEL_DIR }}/arch/x86/configs/" | |
make -s -C "${{ env.KERNEL_DIR }}" local_defconfig | |
- name: Build Kernel Packages | |
shell: docker exec ci_drv_container bash {0} | |
run: | | |
make -s -j $(nproc) -C "${{ env.KERNEL_DIR }}" | |
- name: Build | |
uses: ./.github/actions/build | |
with: | |
search-path: "${{ env.KERNEL_DIR }}/../" | |
search-pattern: "*${{ matrix.release.name }}*" | |
- name: Stop docker container environment | |
if: always() | |
run: | | |
docker stop ci_drv_container | |
docker rm -f ci_drv_container | |
continue-on-error: true |