Skip to content

Commit

Permalink
aarch64/x86_64: build kernel with clang lto
Browse files Browse the repository at this point in the history
  • Loading branch information
pmkol authored May 7, 2024
1 parent c4c71b5 commit 6969444
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
fail-fast: false
matrix:
model:
- nanopi-r4s
- nanopi-r5s
- x86_64
tag:
- type: rc2
Expand Down Expand Up @@ -82,11 +84,12 @@ jobs:
run: |
export GITHUB_REPO=${{ github.repository }}
export PATH="/opt/clang/bin:$PATH"
export KERNEL_CLANG_LTO=y
BUILD_FAST=y ENABLE_UHTTPD=y ENABLE_LTO=y ENABLE_LRNG=y ENABLE_BPF=y USE_GCC15=y USE_MOLD=y bash <(curl -sS https://raw.githubusercontent.com/${{ github.repository }}/x86_64/openwrt/build.sh) ${{ matrix.tag.type }} ${{ matrix.model }}
[ "${{ matrix.model }}" != "netgear_r8500" ] && export KERNEL_CLANG_LTO=y
BUILD_FAST=y ENABLE_UHTTPD=y ENABLE_LTO=y ENABLE_LRNG=y ENABLE_BPF=y USE_GCC14=y USE_MOLD=y bash <(curl -sS https://raw.githubusercontent.com/${{ github.repository }}/master/openwrt/build.sh) ${{ matrix.tag.type }} ${{ matrix.model }}
cd openwrt
tags=$(git describe --abbrev=0 --tags)
echo "latest_release=$tags" >>$GITHUB_ENV
kernel=$(curl -s "https://raw.githubusercontent.com/${{ github.repository }}/master/tags/kernel-6.6" | awk -F"LINUX_KERNEL_HASH-| =" '/LINUX_KERNEL_HASH/{print $2}')
echo "latest_release=$tags-k$kernel" >>$GITHUB_ENV
- name: Extensive logs after a failed compilation
working-directory: /builder
Expand All @@ -113,7 +116,6 @@ jobs:
elif [ "${{ matrix.model }}" = "x86_64" ]; then
cp -a openwrt/bin/targets/x86/*/*-ext4-combined-efi.img.gz rom/
cp -a openwrt/bin/targets/x86/*/*-squashfs-combined-efi.img.gz rom/
cp -a openwrt/bin/targets/x86/*/*-generic-rootfs.tar.gz rom/
cp -a openwrt/bin/targets/x86/*/*-x86-64-generic.manifest info/manifest.txt
cp -a openwrt/bin/targets/x86/*/config.buildinfo info/config.buildinfo
cd rom && sha256sum *gz > ../info/sha256sums.txt
Expand All @@ -131,10 +133,9 @@ jobs:
with:
name: OpenWrt-${{ env.latest_release }}
allowUpdates: true
prerelease: true
tag: ${{ env.latest_release }}
body: OpenWrt 23.05 with Kernel 6.6
commit: x86_64
body: OpenWrt 23.05 with Kernel 6.6 Enhanced
commit: master
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: ${{ env.WORKDIR }}/rom/*

0 comments on commit 6969444

Please sign in to comment.