From f5088cb94721f5a2cfa03c24d72c23f8ccd98f51 Mon Sep 17 00:00:00 2001 From: Andarwinux <144242044+Andarwinux@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:22:41 +0000 Subject: [PATCH] [CI] Switch to Cachyos-v3 & Fix ccache (#77) * ci: switch base container to cachyos-v3 image The cachyos-v3 packages is baselined on x86-64-v3 and built with LTO+O3, which makes it faster than archlinux Also install mimalloc and enable THP to speed up thinlto Somehow Kernel LTO only utilizes one thread most of the time, even if it's thinlto, so the expected gain is small, but still better than nothing * ci: fix ccache ccache has been broken for a while, fortunately relaxed preprocessor checks can fix it The new action also removes stale caches --------- Co-authored-by: Andarwinux --- .github/workflows/build-lts.yml | 6 ++++-- .github/workflows/build.yml | 19 ++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-lts.yml b/.github/workflows/build-lts.yml index a7e75a8..05201d9 100644 --- a/.github/workflows/build-lts.yml +++ b/.github/workflows/build-lts.yml @@ -12,11 +12,12 @@ on: env: IS_LTS: YES + MIMALLOC_ALLOW_LARGE_OS_PAGES: 1 jobs: build: runs-on: ubuntu-latest - container: archlinux/archlinux:base-devel + container: cachyos/cachyos-v3:latest outputs: current_version: ${{ steps.out.outputs.current_version }} release_version: ${{ steps.out.outputs.release_version }} @@ -42,10 +43,11 @@ jobs: - name: Install dependencies id: dep run: | - pacman -Syu --noconfirm pahole xmlto inetutils bc cpio jq ccache git python go + pacman -Syu --noconfirm pahole xmlto inetutils bc cpio jq ccache git python go mimalloc GOBIN=/usr/bin go install go.chromium.org/luci/cipd/client/cmd/...@latest cipd install fuchsia/third_party/clang/linux-amd64 latest -root /usr/local/fuchsia-clang echo "PATH=/usr/local/fuchsia-clang/bin:$PATH" >> $GITHUB_ENV + echo "/usr/lib/libmimalloc.so" > /etc/ld.so.preload - name: Trust this directory run: git config --global --add safe.directory '*' # v2.35.3 or later diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1d768f..9006959 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,11 +12,12 @@ on: env: IS_LTS: NO + MIMALLOC_ALLOW_LARGE_OS_PAGES: 1 jobs: build: runs-on: ubuntu-latest - container: archlinux/archlinux:base-devel + container: cachyos/cachyos-v3:latest outputs: current_version: ${{ steps.out.outputs.current_version }} release_version: ${{ steps.out.outputs.release_version }} @@ -42,10 +43,11 @@ jobs: - name: Install dependencies id: dep run: | - pacman -Syu --noconfirm pahole xmlto inetutils bc cpio jq ccache git python go + pacman -Syu --noconfirm pahole xmlto inetutils bc cpio jq ccache git python go mimalloc GOBIN=/usr/bin go install go.chromium.org/luci/cipd/client/cmd/...@latest cipd install fuchsia/third_party/clang/linux-amd64 latest -root /usr/local/fuchsia-clang echo "PATH=/usr/local/fuchsia-clang/bin:$PATH" >> $GITHUB_ENV + echo "/usr/lib/libmimalloc.so" > /etc/ld.so.preload - name: Trust this directory run: git config --global --add safe.directory '*' # v2.35.3 or later @@ -82,11 +84,18 @@ jobs: fi - name: Initialize ccache - uses: hendrikmuhs/ccache-action@v1.2 + uses: Chocobo1/setup-ccache-action@master if: ${{ env.REBUILD_FLAG }} with: - max-size: 2048M - key: ${{ github.job }}-${{ matrix.arch }} + prepend_symlinks_to_path: false + update_packager_index: false + install_ccache: false + override_cache_key: ${{ github.job }}-${{ matrix.arch }} + ccache_options: | + max_size=2G + compiler_check=none + compression=false + sloppiness=locale,time_macros,pch_defines - name: Build kernel if: ${{ env.REBUILD_FLAG }}