ci: use ccache (#78)
This commit is contained in:
13
.github/workflows/build-WSA-5.10.117-kernel.yml
vendored
13
.github/workflows/build-WSA-5.10.117-kernel.yml
vendored
@@ -29,11 +29,20 @@ jobs:
|
||||
|
||||
name: Build WSA-Kernel-${{ matrix.version }}
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
|
||||
CCACHE_NOHASHDIR: "true"
|
||||
CCACHE_MAXSIZE: "2G"
|
||||
CCACHE_HARDLINK: "true"
|
||||
steps:
|
||||
- uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ccache-WSA-Kernel-${{ matrix.version }}
|
||||
append-timestamp: false
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: KernelSU
|
||||
|
||||
|
||||
- name: Install LLVM
|
||||
run: |
|
||||
sudo apt install -y --no-install-recommends bc bison build-essential ca-certificates flex git gnupg libelf-dev libssl-dev lsb-release software-properties-common wget libncurses-dev binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu nuget
|
||||
@@ -79,7 +88,7 @@ jobs:
|
||||
cp configs/wsa/${{ matrix.make_config }}-5.10 $KERNEL_ROOT/.config
|
||||
echo "[+] 复制配置文件 configs/wsa/${{ matrix.make_config }}-5.10 到 $KERNEL_ROOT/.config"
|
||||
echo "执行: make -j`nproc` LLVM=1 ${{ matrix.kernel_make_cmd }}"
|
||||
make -j`nproc` LLVM=1 ${{ matrix.kernel_make_cmd }}
|
||||
make -j`nproc` LLVM=1 ${{ matrix.kernel_make_cmd }} CCACHE="/usr/bin/ccache"
|
||||
|
||||
- name: Upload kernel-${{ matrix.arch }}-${{ matrix.version }}
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
12
.github/workflows/build-kernel-5.10.yml
vendored
12
.github/workflows/build-kernel-5.10.yml
vendored
@@ -37,11 +37,21 @@ jobs:
|
||||
|
||||
name: Build aarch64-${{ matrix.version }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
|
||||
CCACHE_NOHASHDIR: "true"
|
||||
CCACHE_MAXSIZE: "2G"
|
||||
CCACHE_HARDLINK: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: KernelSU
|
||||
fetch-depth: 0
|
||||
- uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ccache-aarch64-${{ matrix.version }}
|
||||
append-timestamp: false
|
||||
|
||||
- name: Setup need_upload
|
||||
id: need_upload
|
||||
run: |
|
||||
@@ -93,7 +103,7 @@ jobs:
|
||||
|
||||
- name: Build boot.img
|
||||
working-directory: android-kernel
|
||||
run: BUILD_BOOT_IMG=1 SKIP_VENDOR_BOOT=1 KERNEL_BINARY=Image GKI_RAMDISK_PREBUILT_BINARY=out/ramdisk AVB_SIGN_BOOT_IMG=1 AVB_BOOT_PARTITION_SIZE=$((64*1024*1024)) AVB_BOOT_ALGORITHM=SHA256_RSA2048 AVB_BOOT_KEY=prebuilts/kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem BOOT_IMAGE_HEADER_VERSION=4 LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
|
||||
run: CCACHE="/usr/bin/ccache" BUILD_BOOT_IMG=1 SKIP_VENDOR_BOOT=1 KERNEL_BINARY=Image GKI_RAMDISK_PREBUILT_BINARY=out/ramdisk AVB_SIGN_BOOT_IMG=1 AVB_BOOT_PARTITION_SIZE=$((64*1024*1024)) AVB_BOOT_ALGORITHM=SHA256_RSA2048 AVB_BOOT_KEY=prebuilts/kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem BOOT_IMAGE_HEADER_VERSION=4 LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
|
||||
|
||||
- name: Build boot-lz4.img
|
||||
working-directory: android-kernel
|
||||
|
||||
12
.github/workflows/build-kernel-5.15.yml
vendored
12
.github/workflows/build-kernel-5.15.yml
vendored
@@ -25,11 +25,21 @@ jobs:
|
||||
|
||||
name: Build aarch64-${{ matrix.version }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
|
||||
CCACHE_NOHASHDIR: "true"
|
||||
CCACHE_MAXSIZE: "2G"
|
||||
CCACHE_HARDLINK: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: KernelSU
|
||||
fetch-depth: 0
|
||||
- uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ccache-aarch64-${{ matrix.version }}
|
||||
append-timestamp: false
|
||||
|
||||
- name: Setup need_upload
|
||||
id: need_upload
|
||||
run: |
|
||||
@@ -81,7 +91,7 @@ jobs:
|
||||
|
||||
- name: Build boot.img
|
||||
working-directory: android-kernel
|
||||
run: BUILD_BOOT_IMG=1 SKIP_VENDOR_BOOT=1 KERNEL_BINARY=Image AVB_SIGN_BOOT_IMG=1 AVB_BOOT_PARTITION_SIZE=$((64*1024*1024)) AVB_BOOT_ALGORITHM=SHA256_RSA2048 AVB_BOOT_KEY=prebuilts/kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem BOOT_IMAGE_HEADER_VERSION=4 LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
|
||||
run: CCACHE="/usr/bin/ccache" BUILD_BOOT_IMG=1 SKIP_VENDOR_BOOT=1 KERNEL_BINARY=Image AVB_SIGN_BOOT_IMG=1 AVB_BOOT_PARTITION_SIZE=$((64*1024*1024)) AVB_BOOT_ALGORITHM=SHA256_RSA2048 AVB_BOOT_KEY=prebuilts/kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem BOOT_IMAGE_HEADER_VERSION=4 LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
|
||||
|
||||
- name: Upload boot.img
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
Reference in New Issue
Block a user