Skip to content

Commit

Permalink
[CI] Switch to Cachyos-v3 & Fix ccache (Locietta#77)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Andarwinux and Andarwinux authored Nov 15, 2024
1 parent c9be74d commit f5088cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit f5088cb

Please sign in to comment.