From 6424335e7c18324ac43a7095192ada7607521b0c Mon Sep 17 00:00:00 2001 From: Chia-Yu Chang Date: Wed, 8 May 2024 00:31:53 +0200 Subject: [PATCH] Update kernel.yml --- .github/workflows/kernel.yml | 95 ++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/kernel.yml diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml new file mode 100644 index 000000000000..6ba33afa3fa8 --- /dev/null +++ b/.github/workflows/kernel.yml @@ -0,0 +1,95 @@ +name: Build deb package +on: [push] +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download apt-get dependencies + env: + DEBIAN_FRONTEND: noninteractive + run: | + sudo apt-get -y purge unattended-upgrades + sudo apt-get -y update + sudo apt-get -y install git fakeroot \ + libelf-dev libssl-dev flex bison coreutils build-essential \ + xz-utils devscripts initramfs-tools wget debhelper linux-headers-6.5.0-18-generic + - name: Kernel config + run: | + cp /usr/src/linux-headers-6.5.0-18-generic/.config . + scripts/config --set-val CONFIG_FRAME_WARN 0 \ + --disable SYSTEM_TRUSTED_KEYS \ + --disable SYSTEM_REVOCATION_KEYS \ + --set-str CONFIG_SYSTEM_TRUSTED_KEYS "" \ + --set-str CONFIG_SYSTEM_REVOCATION_KEYS "" \ + --undefine DEBUG_INFO \ + --undefine DEBUG_INFO_COMPRESSED \ + --undefine DEBUG_INFO_REDUCED \ + --undefine DEBUG_INFO_SPLIT \ + --undefine GDB_SCRIPTS \ + --set-val DEBUG_INFO_DWARF5 n \ + --set-val DEBUG_INFO_NONE y \ + --disable DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \ + --module CONFIG_TCP_CONG_DCTCP \ + --module CONFIG_TCP_CONG_PRAGUE \ + --module CONFIG_TCP_CONG_BBR \ + --module CONFIG_NET_IPIP \ + --module CONFIG_NET_CLS_U32 \ + --module CONFIG_NET_SCH_DUALPI2 \ + --module CONFIG_NET_SCH_PIE \ + --module CONFIG_NET_SCH_FQ \ + --module CONFIG_NET_SCH_FQ_CODEL \ + --module CONFIG_NET_SCH_CODEL \ + --module CONFIG_NET_SCH_RED \ + --module CONFIG_NET_SCH_CAKE \ + --module CONFIG_NET_SCH_HTB \ + --module CONFIG_NET_SCH_NETEM \ + --module CONFIG_NET_SCH_INGRESS \ + --module CONFIG_NET_ACT_MIRRED \ + --module CONFIG_IFB \ + --module CONFIG_VETH \ + --module CONFIG_BRIDGE \ + --module CONFIG_INET_DIAG + make olddefconfig + - name: make-deb + run: make -j$(nproc) bindeb-pkg \ + LOCALVERSION=-$(git rev-parse --short HEAD)-net-next-${GITHUB_RUN_NUMBER} \ + KDEB_PKGVERSION=1 + - name: Move artifacts + run: | + mkdir -p debian_build + mv -t debian_build ../linux-*.deb + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: net-next-kernel + path: debian_build + + release: + name: Release build artifacts for the branch + runs-on: ubuntu-22.04 + needs: build + permissions: write-all + if: ${{ github.ref != 'refs/heads/main'}} + steps: + - name: Get artifact + uses: actions/download-artifact@v4 + with: + name: net-next-kernel + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + - name: Zip artifacts + run: | + mkdir debian_build + mv *.deb debian_build + zip -r l4s-${{ steps.extract_branch.outputs.branch }}.zip debian_build + - name: Release tip build + uses: pyTooling/Actions/releaser@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.extract_branch.outputs.branch }}-build + files: | + l4s-${{ steps.extract_branch.outputs.branch }}.zip